Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • fonda_a6/popins4snake
1 result
Show changes
Commits on Source (4)
......@@ -18,7 +18,7 @@ TOOLS=-DSAMTOOLS=\"$(SAMTOOLS)\" -DBWA=\"$(BWA)\" -DSICKLE=\"$(SICKLE)\" -DVELVE
# Date and version number from git
DATE := on $(shell git log --pretty=format:"%cd" --date=iso | cut -f 1,2 -d " " | head -n 1)
VERSION := 0.0.4-snake-$(shell git log --pretty=format:"%h" --date=iso | head -n 1)
VERSION := 0.0.6-snake-$(shell git log --pretty=format:"%h" --date=iso | head -n 1)
CXXFLAGS += -DDATE=\""$(DATE)"\" -DVERSION=\""$(VERSION)"\"
# Compiler flags
......
......@@ -243,6 +243,7 @@ struct FindLocationsOptions {
CharString prefix;
CharString sampleID;
CharString referenceFile;
CharString non_ref_bam;
int maxInsertSize;
bool deleteNonRefNew;
......@@ -251,6 +252,7 @@ struct FindLocationsOptions {
prefix("."),
sampleID(""),
referenceFile("genome.fa"),
non_ref_bam("non_ref.bam"),
maxInsertSize(800),
deleteNonRefNew(false)
{}
......@@ -568,6 +570,8 @@ bool getOptionValues(FindLocationsOptions &options, seqan::ArgumentParser &parse
getOptionValue(options.prefix, parser, "prefix");
if (isSet(parser, "reference"))
getOptionValue(options.referenceFile, parser, "reference");
if (isSet(parser, "non-ref"))
getOptionValue(options.non_ref_bam, parser, "non-ref");
if (isSet(parser, "maxInsertSize"))
getOptionValue(options.maxInsertSize, parser, "maxInsertSize");
if (isSet(parser, "delNonRefNew"))
......@@ -1123,6 +1127,7 @@ void setupParser(seqan::ArgumentParser &parser, FindLocationsOptions &options){
addSection(parser, "Input/output options");
addOption(parser, ArgParseOption("p", "prefix", "Path to the sample directories.", ArgParseArgument::STRING, "PATH"));
addOption(parser, ArgParseOption("r", "reference", "Name of reference genome file.", ArgParseArgument::INPUT_FILE, "FASTA_FILE"));
addOption(parser, ArgParseOption("n", "non-ref", "Non-reference reads alignment file name.", ArgParseArgument::INPUT_FILE, "BAM FILE"));
addSection(parser, "Algorithm options");
addOption(parser, ArgParseOption("e", "maxInsertSize", "The maximum expected insert size of the read pairs.", ArgParseArgument::INTEGER, "INT"));
......@@ -1134,6 +1139,7 @@ void setupParser(seqan::ArgumentParser &parser, FindLocationsOptions &options){
// Set default values.
setDefaultValue(parser, "prefix", "\'.\'");
setDefaultValue(parser, "reference", options.referenceFile);
setDefaultValue(parser, "non-ref", options.non_ref_bam);
setDefaultValue(parser, "maxInsertSize", options.maxInsertSize);
setDefaultValue(parser, "delNonRefNew", "false");
......@@ -1578,6 +1584,11 @@ ArgumentParser::ParseResult checkInput(FindLocationsOptions &options){
res = ArgumentParser::PARSE_ERROR;
}
//if (!exists(options.non_ref_bam)){
// std::cerr << "ERROR: Non-reference reads input file \'" << options.non_ref_bam << "\' does not exist." << std::endl;
// res = ArgumentParser::PARSE_ERROR;
//}
return res;
}
......@@ -1758,15 +1769,16 @@ void printMultikOptions(const MultikOptions &options){
void printFindLocationsOptions(const FindLocationsOptions &options){
cout << "=========================================================" << endl;
cout << "popins version : " << VERSION << endl;
cout << "PARAMETER ======== : VALUE ==============================" << endl;
cout << "prefix : " << options.prefix << endl;
cout << "sample ID : " << options.sampleID << endl;
cout << "reference file : " << options.referenceFile << endl;
cout << "max insert size : " << options.maxInsertSize << endl;
cout << "delete non_ref_new : " << options.deleteNonRefNew << endl;
cout << "=========================================================" << endl;
cout << "==========================================================" << endl;
cout << "popins version : " << VERSION << endl;
cout << "PARAMETER ========= : VALUE ==============================" << endl;
cout << "prefix : " << options.prefix << endl;
cout << "sample ID : " << options.sampleID << endl;
cout << "reference file : " << options.referenceFile << endl;
cout << "non-reference reads : " << options.non_ref_bam << endl;
cout << "max insert size : " << options.maxInsertSize << endl;
cout << "delete non_ref_new : " << options.deleteNonRefNew << endl;
cout << "==========================================================" << endl;
}
......
......@@ -141,7 +141,7 @@ int popins_find_locations(int argc, char const ** argv){
//CharString fastqFirst = getFileName(workingDirectory, "paired.1.fastq");
//CharString fastqSecond = getFileName(workingDirectory, "paired.2.fastq");
//CharString fastqSingle = getFileName(workingDirectory, "single.fastq");
CharString nonRefBam = getFileName(workingDirectory, "non_ref.bam");
CharString nonRefBam = getFileName(workingDirectory, options.non_ref_bam);
CharString nonRefNew = getFileName(workingDirectory, "non_ref_new.bam");
CharString locationsFile = getFileName(workingDirectory, "locations.txt");
......