Skip to content
Snippets Groups Projects

crop-unmapped with even more flexibility of the input parameters, se, pe1, pe2

Merged Thomas Krannich requested to merge fix-crop-unmapped-io into main
Compare and
3 files
+ 29
4
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 22
0
@@ -58,6 +58,9 @@ struct AssemblyOptions {
struct CropUnmappedOptions {
CharString outputFile;
CharString pe1;
CharString pe2;
CharString se;
CharString mappingFile;
CharString matepairFile;
@@ -79,6 +82,9 @@ struct CropUnmappedOptions {
CropUnmappedOptions () :
outputFile("mates.bam"),
pe1("paired.1.fastq"),
pe2("paired.2.fastq"),
se("single.fastq"),
matepairFile(""),
referenceFile(""),
prefix("."),
@@ -366,6 +372,13 @@ bool getOptionValues(CropUnmappedOptions & options, ArgumentParser const & parse
if (isSet(parser, "output"))
getOptionValue(options.outputFile, parser, "output");
if (isSet(parser, "paired1"))
getOptionValue(options.pe1, parser, "paired1");
if (isSet(parser, "paired2"))
getOptionValue(options.pe2, parser, "paired2");
if (isSet(parser, "single"))
getOptionValue(options.se, parser, "single");
if (isSet(parser, "prefix"))
getOptionValue(options.prefix, parser, "prefix");
if (isSet(parser, "sample"))
@@ -828,6 +841,9 @@ void setupParser(ArgumentParser & parser, CropUnmappedOptions & options){
// Setup the options.
addSection(parser, "Input/output options");
addOption(parser, ArgParseOption("o", "output", "File name for the output BAM file.", ArgParseArgument::OUTPUT_FILE, "BAM FILE"));
addOption(parser, ArgParseOption("pe1", "paired1", "File name for the first reads file.", ArgParseArgument::INPUT_FILE, "FASTQ FILE"));
addOption(parser, ArgParseOption("pe2", "paired2", "File name for the second reads file.", ArgParseArgument::INPUT_FILE, "FASTQ FILE"));
addOption(parser, ArgParseOption("se", "single", "File name for the single reads file.", ArgParseArgument::INPUT_FILE, "FASTQ FILE"));
addOption(parser, ArgParseOption("p", "prefix", "Path to the sample directories.", ArgParseArgument::STRING, "PATH"));
addOption(parser, ArgParseOption("s", "sample", "An ID for the sample.", ArgParseArgument::STRING, "SAMPLE_ID"));
addOption(parser, ArgParseOption("mp", "matePair", "(Currently only available for Velvet.)", ArgParseArgument::INPUT_FILE, "BAM FILE"));
@@ -848,6 +864,12 @@ void setupParser(ArgumentParser & parser, CropUnmappedOptions & options){
setValidValues(parser, "adapters", "HiSeq HiSeqX");
setValidValues(parser, "reference", "fa fna fasta gz");
setDefaultValue(parser, "output", options.outputFile);
setDefaultValue(parser, "paired1", options.pe1);
setValidValues(parser, "paired1", "fq fastq gz");
setDefaultValue(parser, "paired2", options.pe2);
setValidValues(parser, "paired2", "fq fastq gz");
setDefaultValue(parser, "single", options.se);
setValidValues(parser, "single", "fq fastq gz");
setDefaultValue(parser, "prefix", "\'.\'");
setDefaultValue(parser, "sample", "retrieval from BAM file header");
setDefaultValue(parser, "kmerLength", options.kmerLength);