Skip to content

Loading…

added prefix for fm-merge #42

Merged
merged 1 commit into from

2 participants

@idot

fm-merge does not accept the prefix option

@jts
Owner

Hi,

Thanks for submitting the patch. FM-merge currently does not use -p because the output file can be specified in full using -o. I just want to check whether you considered using -o to specify the output file. If you think it is worth having -p as well let me know and I will merge the patch.

Cheers,
Jared

@idot
@jts
Owner

Ah, I see now, thanks for clarifying.

@jts jts merged commit aa7e5e1 into jts:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 12, 2013
  1. @idot

    added prefix for fm-merge

    idot committed
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/SGA/fm-merge.cpp
View
12 src/SGA/fm-merge.cpp
@@ -43,6 +43,7 @@ static const char *FMMERGE_USAGE_MESSAGE =
"\n"
" --help display this help and exit\n"
" -v, --verbose display verbose output\n"
+" -p, --prefix=PREFIX use PREFIX for the names of the index files (default: prefix of the input file)\n"
" -t, --threads=NUM use NUM worker threads (default: no threading)\n"
" -m, --min-overlap=LEN minimum overlap required between two reads to merge (default: 45)\n"
" -o, --outfile=FILE write the merged sequences to FILE (default: basename.merged.fa)\n"
@@ -66,6 +67,7 @@ static const char* shortopts = "p:m:d:e:t:l:s:o:vix";
enum { OPT_HELP = 1, OPT_VERSION };
static const struct option longopts[] = {
+ { "prefix", required_argument, NULL, 'p' },
{ "verbose", no_argument, NULL, 'v' },
{ "threads", required_argument, NULL, 't' },
{ "min-overlap", required_argument, NULL, 'm' },
@@ -204,8 +206,16 @@ void parseFMMergeOptions(int argc, char** argv)
// Parse the input filenames
opt::readsFile = argv[optind++];
- opt::prefix = stripFilename(opt::readsFile);
+
+ if(opt::prefix.empty())
+ {
+ opt::prefix = stripFilename(opt::readsFile);
+ }
if(opt::outFile.empty())
+ {
opt::outFile = opt::prefix + ".merged.fa";
+ }
+
}
+
Something went wrong with that request. Please try again.