diff --git a/src/pindel2vcf.cpp b/src/pindel2vcf.cpp index ad93df9b..7dccfddc 100644 --- a/src/pindel2vcf.cpp +++ b/src/pindel2vcf.cpp @@ -7,6 +7,7 @@ e.m.w.lameijer@gmail.com +31(0)71-5 125 831 + Version 0.6.4 [December 19th, 2017] Add more fields to INFO column, SAF and SAR Version 0.6.3 [February 19th, 2014] Clearer text on usage of -P option Version 0.6.2 [December 12th, 2014] Now robust against fasta files that have non-standard line lengths (C++'s getline does not work well on lines of over a million characters) Version 0.6.1 [December 12th, 2014] Now has special code to recognize lines that contain SV-data, instead of relying on indirect establishment of their identity from context @@ -773,6 +774,8 @@ void createHeader(ofstream &outFile, const string& sourceProgram, const string& } outFile << "##FORMAT=" << endl; + outFile << "##FORMAT=" << endl; + outFile << "##FORMAT=" << endl; // headers of columns outFile << "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO"; if (samples.size()>0) { @@ -847,7 +850,9 @@ class Genotype return d_totalRefSupport; } const string getGTRDAD() const; + const string getGTRDADSAFSAR() const; const string getGTAD() const; + const string getGTADSAFSAR() const; private: int d_readDepthPlus; @@ -981,6 +986,13 @@ const string Genotype::getGTnew() const return deriveGenotype( *this ); } +const string Genotype::getGTRDADSAFSAR() const +{ + stringstream ss; + ss << getGTnew() << ":" << getTotalRefSupport() << "," << getTotalReads() << ":" << getReadDepthPlus() << ":" << getReadDepthMinus(); + return ss.str(); +} + const string Genotype::getGTRDAD() const { stringstream ss; @@ -995,6 +1007,13 @@ const string Genotype::getGTAD() const return ss.str(); } +const string Genotype::getGTADSAFSAR() const +{ + stringstream ss; + ss << getGTold() << ":" << getTotalReads() << ":" << getReadDepthPlus() << ":" << getReadDepthMinus(); + return ss.str(); +} + /* 'SVData' stores the data of a certain structural variant. */ class SVData @@ -1577,17 +1596,17 @@ ostream& operator<<(ostream& os, const SVData& svd) if (pindel024uOrLater && svd.getAlternative()!="") { - os << "\tGT:AD"; + os << "\tGT:AD:SAF:SAR"; } else { - os << "\tGT:AD"; + os << "\tGT:AD:SAF:SAR"; } for (int counter=0; counter" << endl; + outFile << "##FORMAT=" << endl; + outFile << "##FORMAT=" << endl; //outFile << "##INFO=" << endl; //outFile << "##INFO=" << endl; @@ -883,6 +886,7 @@ class Genotype } const string getSampleDataOfEvent() const; const string getGTAD() const; + const string getGTADSAFSAR() const; private: int d_readDepthPlus; @@ -1025,7 +1029,8 @@ const string Genotype::getSampleDataOfEvent() const << getTotalRefSupport() + getTotalReads() << ":" // DP << "." << ":" // BQ (TODO) << 2 << ":" // SS (TODO) - << getTotalRefSupport() << "," << getTotalReads(); // AD + << getTotalRefSupport() << "," << getTotalReads() // AD + << getReadDepthPlus() << ":" << getReadDepthMinus(); // SAF:SAR return ss.str(); } @@ -1036,6 +1041,13 @@ const string Genotype::getGTAD() const return ss.str(); } +const string Genotype::getGTADSAFSAR() const +{ + stringstream ss; + ss << getGTold() << ":" << getTotalReads() << ":" << getReadDepthPlus() << ":" << getReadDepthMinus(); + return ss.str(); +} + /* 'SVData' stores the data of a certain structural variant. */ class SVData @@ -1617,14 +1629,14 @@ ostream& operator<<(ostream& os, const SVData& svd) os << ";" << somatic_p_value; } - os << "\tGT:DP:BQ:SS:AD"; + os << "\tGT:DP:BQ:SS:AD:SAF:SAR"; for (int counter=0; counter