# HG changeset patch # User iuc # Date 1527200648 14400 # Node ID 78e1cf88d133c512ae0eaa68d25acc4ab562c256 # Parent 8665bcc8b84748dcabea15b4452bd4d145d9d6a8 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cutadapt commit 195c6112eff237b20a6744e82e2c4e7641f7c488 diff -r 8665bcc8b847 -r 78e1cf88d133 cutadapt.xml --- a/cutadapt.xml Mon Mar 05 11:02:48 2018 -0500 +++ b/cutadapt.xml Thu May 24 18:24:08 2018 -0400 @@ -1,4 +1,4 @@ - + Remove adapter sequences from Fastq/Fasta macros.xml @@ -13,107 +13,62 @@ ## Link in the input and output files, so Cutadapt can tell their type - #set compressed="False" + #import re #set format = "fastq" - - #if str($library.type) == 'paired': + #set read1 = "input_f" + #set read2 = "input_r" + #set paired = False + #set library_type = str($library.type) + #if $library_type == 'paired': + #set paired = True + #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.element_identifier)) + #set read2 = re.sub('[^\w\-\s]', '_', str($library.input_2.element_identifier)) + #set input_1 = $library.input_1 + #set input_2 = $library.input_2 + #else if $library_type == 'paired_collection' + #set paired = True + #set input_1 = $library.input_1.forward + #set input_2 = $library.input_1.reverse + #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.name)) + #else + #set input_1 = $library.input_1 + #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.element_identifier)) + #end if - #if $library.input_1.is_of_type("fastq.gz", "fastqsanger.gz"): - #set read1 = "input_f.fastq.gz" - #set compressed = "GZ" - #set out1 = "out1.gz" - #else if $library.input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"): - #set read1 = "input_f.fastq.bz2" - #set compressed = "BZ2" - #set out1 = "out1.bz2" - #else if $library.input_1.is_of_type('fasta'): + #if $input_1.is_of_type("fastq.gz", "fastqsanger.gz"): + #set read1 = $read1 + ".fq.gz" + #set out1 = "out1.gz" + #else if $input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"): + #set read1 = $read1 + ".fq.bz2" + #set out1 = "out1.bz2" + #else if $input_1.is_of_type('fasta'): + #set format = "fasta" + #set read1 = $read1 + ".fa" + #set out1 = "out1.fa" + #else: + #set read1 = $read1 + ".fq" + #set out1 = "out1.fq" + #end if + ln -f -s '${input_1}' '$read1' && + + #if $paired: + #if $input_2.is_of_type("fastq.gz", "fastqsanger.gz"): + #set read2 = $read2 + ".fq.gz" + #set out2 = "out2.gz" + #else if $input_2.is_of_type("fastq.bz2", "fastqsanger.bz2"): + #set read2 = $read2 + ".fq.bz2" + #set out2 = "out2.bz2" + #else if $input_2.is_of_type('fasta'): #set format = "fasta" - #set read1 = "input_f.fasta" - #set out1 = "out1.fa" + #set read2 = $read2 + ".fa" + #set out2 = "out2.fa" #else: - #set read1 = "input_f.fastq" - #set out1 = "out1.fq" - #end if - ln -f -s '${library.input_1}' ${read1} && - - #if $library.input_2.is_of_type("fastq.gz", "fastqsanger.gz"): - #set read2 = "input_r.fastq.gz" - #set compressed = "GZ" - #set out2 = "out2.gz" - #else if $library.input_2.is_of_type("fastq.bz2", "fastqsanger.bz2"): - #set read2 = "input_r.fastq.bz2" - #set compressed = "BZ2" - #set out2 = "out2.bz2" - #else if $library.input_2.is_of_type('fasta'): - #set read2 = "input_r.fasta" - #set out2 = "out2.fa" - #set format = "fasta" - #else: - #set read2 = "input_r.fastq" + #set read2 = $read2 + ".fq" #set out2 = "out2.fq" #end if - ln -f -s '${library.input_2}' ${read2} && - - - #else if str($library.type) == 'paired_collection': - - #if $library.input_1.forward.is_of_type("fastq.gz", "fastqsanger.gz"): - #set read1 = "input_f.fastq.gz" - #set compressed = "GZ" - #set out1 = "out1.gz" - #else if $library.input_1.forward.is_of_type("fastq.bz2", "fastqsanger.bz2"): - #set read1 = "input_f.fastq.bz2" - #set compressed = "BZ2" - #set out1 = "out1.bz2" - #else if $library.input_1.forward.is_of_type('fasta'): - #set format = "fasta" - #set read1 = "input_f.fasta" - #set out1 = "out1.fa" - #else: - #set read1 = "input_f.fastq" - #set out1 = "out1.fq" - #end if - ln -s '${library.input_1.forward}' ${read1} && - - #if $library.input_1.reverse.is_of_type("fastq.gz", "fastqsanger.gz"): - #set read2 = "input_r.fastq.gz" - #set compressed = "GZ" - #set out1 = "out2.gz" - #else if $library.input_1.reverse.is_of_type("fastq.bz2", "fastqsanger.bz2"): - #set read2 = "input_r.fastq.bz2" - #set compressed = "BZ2" - #set out2 = "out2.bz2" - #else if $library.input_1.reverse.is_of_type("fasta"): - #set format = "fasta" - #set read2 = "input_r.fasta" - #set out2 = "out2.fa" - #else: - #set read2 = "input_r.fastq" - #set out2 = "out2.fq" - #end if - ln -s '${library.input_1.reverse}' ${read2} && - - #else: - #if $library.input_1.is_of_type("fastq.gz", "fastqsanger.gz"): - #set read1 = "input_f.fastq.gz" - #set compressed = "GZ" - #set out1 = "out1.gz" - #else if $library.input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"): - #set read1 = "input_f.fastq.bz2" - #set compressed = "BZ2" - #set out1 = "out1.bz2" - #else if $library.input_1.is_of_type('fasta'): - #set format = "fasta" - #set read1 = "input_f.fasta" - #set out1 = "out1.fa" - #else: - #set read1 = "input_f.fastq" - #set out1 = "out1.fq" - #end if - ln -f -s '${library.input_1}' ${read1} && + ln -f -s '${input_2}' '$read2' && #end if - ## Run Cutadapt cutadapt @@ -179,19 +134,15 @@ --length-tag="$read_mod_options.length_tag" #end if - #if str( $library.type ) == "single": - '${read1}' - #else: - '${read1}' + '${read1}' + #if $paired: '${read2}' #end if #if $output_options.report: > report.txt #end if - ]]> - @@ -217,6 +168,7 @@ + @@ -261,7 +213,7 @@
- + @@ -273,49 +225,59 @@ - - + + + + (library['type'] == 'paired' or library['type'] == 'paired_collection') + (output_options['report'] is True) - + (output_options['info_file'] is True) - + (output_options['rest_file'] is True) + - + (output_options['wildcard_file'] is True) - + (output_options['untrimmed_file'] is True) + - + (library['type'] == 'paired' or library['type'] == 'paired_collection') (output_options['untrimmed_file'] is True) + - + (output_options['too_short_file'] is True) + - + (library['type'] == 'paired' or library['type'] == 'paired_collection') (output_options['too_short_file'] is True) + - + (output_options['too_long_file'] is True) + - + (library['type'] == 'paired' or library['type'] == 'paired_collection') (output_options['too_long_file'] is True) + @@ -326,7 +288,7 @@ - + @@ -334,7 +296,7 @@ - + @@ -345,8 +307,24 @@ - - + + + + + + + + + + + + + + + + + + @@ -354,7 +332,7 @@ - + @@ -365,7 +343,7 @@ - + @@ -376,8 +354,8 @@ - - + + @@ -387,7 +365,7 @@ - + @@ -397,13 +375,13 @@ - + - + diff -r 8665bcc8b847 -r 78e1cf88d133 macros.xml --- a/macros.xml Mon Mar 05 11:02:48 2018 -0500 +++ b/macros.xml Thu May 24 18:24:08 2018 -0400 @@ -261,4 +261,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file