diff --git a/crisp/crisp_header_options.c b/crisp/crisp_header_options.c index 92dab0a..95b556d 100644 --- a/crisp/crisp_header_options.c +++ b/crisp/crisp_header_options.c @@ -48,7 +48,7 @@ void print_crispheader(struct OPTIONS* options) fprintf(vfile,"##FILTER=20 percent of reads have mapping quality score less than 20\">\n"); fprintf(vfile,"##FILTER=10 percent of reads have mapping quality score less than 20\">\n"); fprintf(vfile,"##FORMAT=\n"); - fprintf(vfile,"##FORMAT=\n"); + fprintf(vfile,"##FORMAT=\n"); fprintf(vfile,"##FORMAT=\n"); //fprintf(vfile,"##FORMAT=\n"); fprintf(vfile,"##FORMAT=\n"); diff --git a/crisp/newcrispprint.c b/crisp/newcrispprint.c index e83a9db..b9a4b6b 100644 --- a/crisp/newcrispprint.c +++ b/crisp/newcrispprint.c @@ -137,12 +137,12 @@ void print_VCF_genotypes_diploid(struct VARIANT* variant, FILE* vfile) if (variant->counts[variant->refbase+2*maxalleles] + variant->counts[variant->alleles[0]+2*maxalleles] >= 2) bidir = 1; //if (bidir == 1) - fprintf(vfile,"\tGT:GQ:DP:ADf:ADr:ADb\t"); + fprintf(vfile,"\tGT:GQ:DP:ADf:ADr:ADb"); //else fprintf(vfile,"\tGT:GQ:DP:ADf:ADr\t"); - for (i=0;isamples;i++) { + fprintf(vfile,"\t"); if ((double)variant->readdepths[i]/variant->ploidy[i] <= 1) fprintf(vfile,"./.:."); else if (variant->varalleles ==1) // print genotypes for bi-allelic variants { @@ -176,7 +176,6 @@ void print_VCF_genotypes_diploid(struct VARIANT* variant, FILE* vfile) for (j=0;jvaralleles;j++) fprintf(vfile,",%d",variant->indcounts[i][variant->alleles[j]+2*maxalleles]); } else { fprintf(vfile,":0"); for (j=0;jvaralleles;j++) fprintf(vfile,",0"); } - fprintf(vfile,"\t"); } fprintf(vfile,"\n"); @@ -188,7 +187,7 @@ void print_VCF_genotypes_pooled_full(struct VARIANT* variant,FILE* vfile) int i=0,j=0,k=0,coverage=0,bidir=0; if (variant->counts[variant->refbase+2*maxalleles] + variant->counts[variant->alleles[0]+2*maxalleles] >= 2) bidir = 1; //if (bidir == 1) fprintf(vfile,"\tGT:GQ:AC:DP:ADf:ADr:ADb\t"); else fprintf(vfile,"\tGT:GQ:AC:DP:ADf:ADr\t"); - fprintf(vfile,"\tGT:GQ:AC:DP:ADf:ADr:ADb\t"); + fprintf(vfile,"\tGT:GQ:AC:DP:ADf:ADr:ADb"); int AC1 = 0, AC2 = 0; int printflag = 0; for (i=0;isamples;i++) @@ -200,6 +199,7 @@ void print_VCF_genotypes_pooled_full(struct VARIANT* variant,FILE* vfile) for (i=0;isamples;i++) { + fprintf(vfile,"\t"); if ((double)variant->readdepths[i]/variant->ploidy[i] <= 1) { for (j=0;jploidy[i];j++) fprintf(vfile,"./"); fprintf(vfile,".:0:."); @@ -240,7 +240,6 @@ void print_VCF_genotypes_pooled_full(struct VARIANT* variant,FILE* vfile) } else { fprintf(vfile,":0"); for (j=0;jvaralleles;j++) fprintf(vfile,",0"); } //if (variant->crispvar[0].AC[i] > 0) fprintf(vfile,":="); else fprintf(vfile,":."); - fprintf(vfile,"\t"); } fprintf(vfile,"\n"); } @@ -250,9 +249,10 @@ void print_VCF_genotypes_pooled(struct VARIANT* variant,FILE* vfile) { int i=0,j=0,k=0,coverage=0,bidir=0; if (variant->counts[variant->refbase+2*maxalleles] + variant->counts[variant->alleles[0]+2*maxalleles] >= 2) bidir = 1; - fprintf(vfile,"\tAC:GQ:DP:ADf:ADr:ADb\t"); //else fprintf(vfile,"\tMLAC:GQ:DP:ADf:ADr\t"); + fprintf(vfile,"\tAC:GQ:DP:ADf:ADr:ADb"); //else fprintf(vfile,"\tMLAC:GQ:DP:ADf:ADr\t"); for (i=0;isamples;i++) { + fprintf(vfile,"\t"); if ((double)variant->readdepths[i]/variant->ploidy[i] <= 1) fprintf(vfile,"."); else if (variant->ploidy[0] > 2 && variant->varpoolsize > 0) // print reference allele count as well. { @@ -294,7 +294,6 @@ void print_VCF_genotypes_pooled(struct VARIANT* variant,FILE* vfile) } else { fprintf(vfile,":0"); for (j=0;jvaralleles;j++) fprintf(vfile,",0"); } //if (variant->crispvar[0].AC[i] > 0) fprintf(vfile,":="); else fprintf(vfile,":."); - fprintf(vfile,"\t"); } fprintf(vfile,"\n"); }