Skip to content

Commit

Permalink
fixed dp as dot
Browse files Browse the repository at this point in the history
  • Loading branch information
grenaud committed Mar 20, 2018
1 parent df0fa30 commit 75b24cf
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions SimpleVCF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void SimpleVCF::init2(){
observedGL=false;
haploidCall=false;
for(unsigned int i=0;i<formatFieldNames->size();i++){
// cerr<<"formatFieldNames["<<i<<"] "<<formatFieldNames[i]<<" = "<<formatFieldValues[i]<<endl;
//cerr<<"formatFieldNames["<<i<<"] "<<formatFieldNames->at(i)<<" = "<<formatFieldValues[i]<<endl;
if(formatFieldNames->at(i) == "GT"){
indexGenotype =i;
formatFieldGT= formatFieldValues[i];
Expand Down Expand Up @@ -206,11 +206,16 @@ void SimpleVCF::init2(){
continue; }

if(formatFieldNames->at(i) == "DP"){
indexDepth =i;
if(!formatFieldValues[i].empty())
formatFieldDP=destringify<int> (formatFieldValues[i]);
else
indexDepth =i;

if(formatFieldValues[i] == "."){
formatFieldDP=-1;//if the DP field is missing
}else{
if(!formatFieldValues[i].empty())
formatFieldDP=destringify<int> (formatFieldValues[i]);
else
formatFieldDP=-1;//if the DP field is missing
}
continue;
}

Expand Down

0 comments on commit 75b24cf

Please sign in to comment.