From 93485b7e9ffa0089d0bd32c066362d8bc31c06f5 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Wed, 18 Jun 2014 15:39:44 -0400 Subject: add force flag for filename --- src/c/quikr_train.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/c/quikr_train.c b/src/c/quikr_train.c index 08a1f0a..1260b86 100644 --- a/src/c/quikr_train.c +++ b/src/c/quikr_train.c @@ -34,7 +34,7 @@ int main(int argc, char **argv) { unsigned long long position = 0; int verbose = 0; - + int force_name = 0; char *fasta_filename = NULL; char *output_file = NULL; @@ -45,6 +45,7 @@ int main(int argc, char **argv) { while (1) { static struct option long_options[] = { {"verbose", no_argument, 0, 'v'}, + {"force_name", no_argument, 0, 'f'}, {"help", no_argument, 0, 'h'}, {"version", no_argument, 0, 'V'}, {"input", required_argument, 0, 'i'}, @@ -55,7 +56,7 @@ int main(int argc, char **argv) { int option_index = 0; - c = getopt_long (argc, argv, "i:o:k:hvV", long_options, &option_index); + c = getopt_long (argc, argv, "i:o:k:fhvV", long_options, &option_index); if (c == -1) break; @@ -73,6 +74,9 @@ int main(int argc, char **argv) { case 'v': verbose = 1; break; + case 'f': + force_name = 1; + break; case 'V': printf("%s\n", VERSION); exit(EXIT_SUCCESS); @@ -117,7 +121,7 @@ int main(int argc, char **argv) { exit(EXIT_FAILURE); } - if(strcmp(&output_file[strlen(output_file) - 3], ".gz") != 0) { + if(strcmp(&output_file[strlen(output_file) - 3], ".gz") != 0 && !force_name) { char *temp = malloc(strlen(output_file) + 4); if(temp == NULL) { fprintf(stderr, "Could not allocate enough memory\n"); -- cgit v1.2.3 From 620e12d364148a0fbe8c60820a3c0a0f7c1561b9 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Thu, 19 Jun 2014 10:41:38 -0400 Subject: working multifasta2otu --- src/galaxy/multifasta2otu.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/galaxy/multifasta2otu.xml b/src/galaxy/multifasta2otu.xml index b80f8b2..eebe246 100644 --- a/src/galaxy/multifasta2otu.xml +++ b/src/galaxy/multifasta2otu.xml @@ -1,10 +1,10 @@ Get Abundances on Multiple Files - multifasta_to_otu -k $kmer -s $db -f <( echo + bash -c "multifasta_to_otu -k $kmer -s $db -f <( echo #for $input in $inputs: -"${input}" +${input} #end for - | xargs -n 1 ) -o $output + | xargs -n 1 ) -o $output" -- cgit v1.2.3 From 62067f0ca6db19fcdedc84476e68ba3864062f54 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Thu, 19 Jun 2014 11:05:42 -0400 Subject: remove help flags --- src/galaxy/quikr.xml | 20 ++------------------ src/galaxy/quikr_train.xml | 18 ------------------ 2 files changed, 2 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/galaxy/quikr.xml b/src/galaxy/quikr.xml index 89729be..65d604b 100644 --- a/src/galaxy/quikr.xml +++ b/src/galaxy/quikr.xml @@ -11,23 +11,7 @@ -**What it does** - -This tool counts the length of each fasta sequence in the file. The output file has two columns per line (separated by tab): fasta titles and lengths of the sequences. The option *How many characters to keep?* allows to select a specified number of letters from the beginning of each FASTA entry. - ------ - -**Example** - -Suppose you have the following FASTA formatted sequences from a Roche (454) FLX sequencing run:: - - >EYKX4VC02EQLO5 length=108 xy=1826_0455 region=2 run=R_2007_11_07_16_15_57_ TCCGCGCCGAGCATGCCCATCTTGGATTCCGGCGCGATGACCATCGCCCGCTCCACCACG TTCGGCCGGCCCTTCTCGTCGAGGAATGACACCAGCGCTTCGCCCACG >EYKX4VC02D4GS2 length=60 xy=1573_3972 region=2 run=R_2007_11_07_16_15_57_ AATAAAACTAAATCAGCAAAGACTGGCAAATACTCACAGGCTTATACAATACAAATGTAAfa - -Running this tool while setting **How many characters to keep?** to **14** will produce this:: - - EYKX4VC02EQLO5 108 - EYKX4VC02D4GS2 60 - - + + diff --git a/src/galaxy/quikr_train.xml b/src/galaxy/quikr_train.xml index b5f5291..a33d866 100644 --- a/src/galaxy/quikr_train.xml +++ b/src/galaxy/quikr_train.xml @@ -9,23 +9,5 @@ -**What it does** - -This tool counts the length of each fasta sequence in the file. The output file has two columns per line (separated by tab): fasta titles and lengths of the sequences. The option *How many characters to keep?* allows to select a specified number of letters from the beginning of each FASTA entry. - ------ - -**Example** - -Suppose you have the following FASTA formatted sequences from a Roche (454) FLX sequencing run:: - - >EYKX4VC02EQLO5 length=108 xy=1826_0455 region=2 run=R_2007_11_07_16_15_57_ TCCGCGCCGAGCATGCCCATCTTGGATTCCGGCGCGATGACCATCGCCCGCTCCACCACG TTCGGCCGGCCCTTCTCGTCGAGGAATGACACCAGCGCTTCGCCCACG >EYKX4VC02D4GS2 length=60 xy=1573_3972 region=2 run=R_2007_11_07_16_15_57_ AATAAAACTAAATCAGCAAAGACTGGCAAATACTCACAGGCTTATACAATACAAATGTAAfa - -Running this tool while setting **How many characters to keep?** to **14** will produce this:: - - EYKX4VC02EQLO5 108 - EYKX4VC02D4GS2 60 - - -- cgit v1.2.3