Skip to content

Commit

Permalink
Change LDS format from string to number, change delimiter for LDS fro…
Browse files Browse the repository at this point in the history
…m vertical slash to comma
  • Loading branch information
yukt committed Aug 17, 2021
1 parent ebbe6bd commit 8498da5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ bool Analysis::OpenStreamOutputFiles()
ifprintf(vcfLoodosepartial,"##contig=<ID=%s>\n",referencePanel.finChromosome.c_str());
ifprintf(vcfLoodosepartial,"##INFO=<ID=TYPED,Number=0,Type=Flag,Description=\"Marker was genotyped AND imputed\">\n");
ifprintf(vcfLoodosepartial,"##FORMAT=<ID=GT,Number=1,Type=String,Description=\"Genotyped alleles from Array\">\n");
ifprintf(vcfLoodosepartial,"##FORMAT=<ID=LDS,Number=1,Type=String,Description=\"Leave-one-out Imputed Dosage : Estimated Haploid Alternate Allele Dosage assuming site was NOT genotyped \">\n");
ifprintf(vcfLoodosepartial,"##FORMAT=<ID=LDS,Number=2,Type=Float,Description=\"Leave-one-out Imputed Dosage : Estimated Haploid Alternate Allele Dosage assuming site was NOT genotyped \">\n");
ifprintf(vcfLoodosepartial,"##minimac4_Command=%s\n",MyAllVariables->myOutFormat.CommandLine.c_str());
ifprintf(vcfLoodosepartial,"#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT");

Expand Down
4 changes: 2 additions & 2 deletions src/DosageData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ void DosageData::PrintDiploidLooDosage(float &x, float &y, AlleleType a, AlleleT
PrintEmpStringLength+=sprintf(PrintEmpStringPointer+PrintEmpStringLength,"\t");
PrintEmpStringLength+=sprintf(PrintEmpStringPointer+PrintEmpStringLength,"%c|%c",a,b);
PrintEmpStringLength+=sprintf(PrintEmpStringPointer+PrintEmpStringLength,":");
PrintEmpStringLength+=sprintf(PrintEmpStringPointer+PrintEmpStringLength,"%.3f|%.3f",x , y);
PrintEmpStringLength+=sprintf(PrintEmpStringPointer+PrintEmpStringLength,"%.3f,%.3f",x , y);
}


Expand Down Expand Up @@ -342,7 +342,7 @@ void DosageData::PrintDosageForVcfOutputForID(int MarkerIndex)
if( tHapFull->MissingSampleUnscaffolded[gwasHapIndex][TypedMarkerIndex] =='1'
|| tHapFull->MissingSampleUnscaffolded[gwasHapIndex+1][TypedMarkerIndex]=='1')
{
PrintEmpStringLength+=sprintf(PrintEmpStringPointer+PrintEmpStringLength,"\t.|.:.|.");
PrintEmpStringLength+=sprintf(PrintEmpStringPointer+PrintEmpStringLength,"\t.|.:.,.");
}
else
{
Expand Down

0 comments on commit 8498da5

Please sign in to comment.