Mercurial > repos > iuc > getorganelle
changeset 3:611219887a48 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/getorganelle commit 00cf5ce77b828bd4cfb45df86a7334855c413497
author | iuc |
---|---|
date | Tue, 16 May 2023 09:45:40 +0000 |
parents | 06bcf65179fb |
children | 7348b69e5109 |
files | get_organelle_from_reads.xml macros.xml |
diffstat | 2 files changed, 72 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/get_organelle_from_reads.xml Thu Feb 23 17:06:37 2023 +0000 +++ b/get_organelle_from_reads.xml Tue May 16 09:45:40 2023 +0000 @@ -1,4 +1,4 @@ -<tool id="get_organelle_from_reads" name="Get organelle from reads" version="@TOOL_VERSION@"> +<tool id="get_organelle_from_reads" name="Get organelle from reads" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"> <macros> <import>macros.xml</import> <xml name="seed_and_genes" tokens="optional"> @@ -16,47 +16,47 @@ ## Link input files #import re #set ext = '.fastq' - #if str($fastq_input.fastq_input_selector) == 'single': + #if $fastq_input.fastq_input_selector == 'single': #if $fastq_input.fastq_input1.ext.endswith('.gz'): #set ext = '.fastq.gz' #end if #set $in1 = $fastq_input.fastq_input1 - #set $in1_name = re.sub('[^\w\-\.]', '_', str($fastq_input.fastq_input1.name)) + $ext + #set $in1_name = re.sub('[^\w\-\.]', '_', str($fastq_input.fastq_input1.element_identifier)) + $ext ln -s '$in1' '$in1_name' && - #else if str($fastq_input.fastq_input_selector) == 'paired': + #else if $fastq_input.fastq_input_selector == 'paired': #if $fastq_input.fastq_input1.ext.endswith('.gz'): #set ext = '.fastq.gz' #end if #set $in1 = $fastq_input.fastq_input1 #set $in2 = $fastq_input.fastq_input2 - #set $in1_name = re.sub('[^\w\-\.]', '_', str($fastq_input.fastq_input1.name)) + $ext - #set $in2_name = re.sub('[^\w\-\.]', '_', str($fastq_input.fastq_input2.name)) + $ext + #set $in1_name = re.sub('[^\w\-\.]', '_', str($fastq_input.fastq_input1.element_identifier)) + $ext + #set $in2_name = re.sub('[^\w\-\.]', '_', str($fastq_input.fastq_input2.element_identifier)) + $ext ln -s '$in1' '$in1_name' && ln -s '$in2' '$in2_name' && - #else if str($fastq_input.fastq_input_selector) == 'paired_collection': + #else if $fastq_input.fastq_input_selector == 'paired_collection': #if $fastq_input.paired_input.forward.ext.endswith('.gz'): #set ext = '.fastq.gz' #end if #set $in1 = $fastq_input.paired_input.forward #set $in2 = $fastq_input.paired_input.reverse - #set $in1_name = re.sub('[^\w\-\.]', '_', str($fastq_input.paired_input.name)) + $ext - #set $in2_name = re.sub('[^\w\-\.]', '_', str("%s_%s" % ($fastq_input.paired_input.name, "R2"))) + $ext + #set $in1_name = "%s_R1%s" % (re.sub('[^\w\-\.]', '_', str($fastq_input.paired_input.element_identifier)),$ext) + #set $in2_name = "%s_R2%s" % (re.sub('[^\w\-\.]', '_', str($fastq_input.paired_input.element_identifier)),$ext) ln -s '$in1' '$in1_name' && ln -s '$in2' '$in2_name' && #end if ## GetOrganelle cmd get_organelle_from_reads.py #if str($fastq_input.fastq_input_selector) == "single": - -u '${$in1_name}' + -u '$in1_name' #end if #if str($fastq_input.fastq_input_selector) == "paired": - -1 '${$in1_name}' -2 '${$in2_name}' + -1 '$in1_name' -2 '$in2_name' #end if #if str($fastq_input.fastq_input_selector) == "paired_collection": - -1 '${$in1_name1}' -2 '${$in2_name}' + -1 '$in1_name' -2 '$in2_name' #end if -o results_directory - #if str($organelle_type_input.F) == "anonym": + #if $organelle_type_input.F == "anonym": -F '$organelle_type_input.F' -s '$organelle_type_input.s' --genes '$organelle_type_input.genes' @@ -130,7 +130,7 @@ <param type="data" name="fastq_input2" format="fastqsanger,fastqsanger.gz" label="Reverse fastq"/> </when> <when value="paired_collection"> - <param type="data_collection" collection_type="paired" name="fastq_input1" format="fastqsanger,fastqsanger.gz" label="Paired collection fastq"/> + <param type="data_collection" collection_type="paired" name="paired_input" format="fastqsanger,fastqsanger.gz" label="Paired collection fastq"/> </when> </conditional> <conditional name="organelle_type_input"> @@ -232,9 +232,11 @@ <tests> <test expect_num_outputs="8"> <param name="config_dir" value="getorganelle_refdata"/> - <param name="fastq_input_selector" value="paired"/> - <param name="fastq_input1" value="Arabidopsis_simulated.10k.1.fq.gz" ftype="fastqsanger.gz"/> - <param name="fastq_input2" value="Arabidopsis_simulated.10k.2.fq.gz" ftype="fastqsanger.gz"/> + <conditional name="fastq_input"> + <param name="fastq_input_selector" value="paired"/> + <param name="fastq_input1" value="Arabidopsis_simulated.10k.1.fq.gz" ftype="fastqsanger.gz"/> + <param name="fastq_input2" value="Arabidopsis_simulated.10k.2.fq.gz" ftype="fastqsanger.gz"/> + </conditional> <param name="F" value="embplant_pt" /> <param name="advanced" value="advanced" /> <param name="out" value="raw_assembly_graph,simplified_graph,contig_labels,seed_fastq,seed_sam" /> @@ -246,7 +248,18 @@ <has_text text="Thank you!" /> </assert_contents> </output> - <output_collection name="path_sequence_list" type="list" count="2" /> + <output_collection name="path_sequence_list" type="list" count="2"> + <element name="embplant_pt.K115.complete.graph1.1" ftype="fasta"> + <assert_contents> + <has_n_lines n="2"/> + </assert_contents> + </element> + <element name="embplant_pt.K115.complete.graph1.2" ftype="fasta"> + <assert_contents> + <has_n_lines n="2"/> + </assert_contents> + </element> + </output_collection> <output name="selected_graph" > <assert_contents> <has_n_lines n="7" /> @@ -278,6 +291,46 @@ </assert_contents> </output> </test> + <!-- Ensure paired collection works; also check output filters --> + <test expect_num_outputs="3"> + <param name="config_dir" value="getorganelle_refdata"/> + <conditional name="fastq_input"> + <param name="fastq_input_selector" value="paired_collection"/> + <param name="paired_input"> + <collection type="paired"> + <element name="forward" value="Arabidopsis_simulated.10k.1.fq.gz" ftype="fastqsanger.gz" /> + <element name="reverse" value="Arabidopsis_simulated.10k.2.fq.gz" ftype="fastqsanger.gz" /> + </collection> + </param> + </conditional> + <param name="F" value="embplant_pt" /> + <param name="advanced" value="simple" /> + <assert_stdout> + <has_text text="Thank you!" /> + </assert_stdout> + <output name="logfile" > + <assert_contents> + <has_text text="Thank you!" /> + </assert_contents> + </output> + <output_collection name="path_sequence_list" type="list" count="2"> + <element name="embplant_pt.K115.complete.graph1.1" ftype="fasta"> + <assert_contents> + <has_n_lines n="2"/> + </assert_contents> + </element> + <element name="embplant_pt.K115.complete.graph1.2" ftype="fasta"> + <assert_contents> + <has_n_lines n="2"/> + </assert_contents> + </element> + </output_collection> + <output name="selected_graph" > + <assert_contents> + <has_n_lines n="7" /> + </assert_contents> + </output> + </test> </tests> <help><![CDATA[ GetOrganelle assembles organelle genomes from genome skimming data.