Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,15 +384,18 @@ int main(int argc, char *argv[])
cout << "..since you mateFile is not in SAMtools pileup format, the BAF values will not be calculated\n";
has_BAF=false;
}
string SNPinfoFile = std::string(cf.Value("BAF","SNPfile",""));

if (makePileup != "false" && SNPinfoFile=="") {
if (makePileup.substr(makePileup.size()-3,3)=="vcf" || makePileup.substr(makePileup.size()-6,6)=="vcf.gz") {
SNPinfoFile=makePileup;
} else {
cerr << "Warning: you have to provide a filename with the \"SNPfile\" option if you wish to calculate BAF profiles\n";
cerr << "SNPfile can be in .txt, .txt.gz, .vcf. or .vcf.gz format\n";
}
string SNPinfoFile = std::string(cf.Value("BAF","SNPfile",""));
if (SNPinfoFile == "" && makePileup != "false") {
SNPinfoFile = makePileup;
}
if (SNPinfoFile != ""
&& SNPinfoFile.substr(SNPinfoFile.size() - 3, 3) != "vcf"
&& SNPinfoFile.substr(SNPinfoFile.size() - 6, 6) != "vcf.gz"
&& SNPinfoFile.substr(SNPinfoFile.size() - 3, 3) != "txt"
&& SNPinfoFile.substr(SNPinfoFile.size() - 6, 6) != "txt.gz") {
cerr << "Warning: you have to provide a filename with the \"SNPfile\" or \"makePileup\" option if you wish to calculate BAF profiles\n";
cerr << "SNPfile can be in .txt, .txt.gz, .vcf. or .vcf.gz format\n";
}

std::string targetBed = std::string(cf.Value("target","captureRegions",""));
Expand Down