Mercurial > repos > iuc > kraken2
diff kraken2.xml @ 1:d4bb87ca916d draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/blob/master/tool_collections/kraken2/kraken2/ commit 0f261b78ab60702ecbb81abfeb91dd27c01ecf15
author | iuc |
---|---|
date | Wed, 10 Apr 2019 13:56:57 -0400 |
parents | 0968856c687c |
children | 4a9da2b6c2e3 |
line wrap: on
line diff
--- a/kraken2.xml Thu Mar 14 05:16:48 2019 -0400 +++ b/kraken2.xml Wed Apr 10 13:56:57 2019 -0400 @@ -12,6 +12,25 @@ <version_command>kraken2 --version</version_command> <command detect_errors="exit_code"> <![CDATA[ + + #def get_type($data) + #if $data.is_of_type('fastq'): + #return 'fastq' + #elif $data.is_of_type('fasta'): + #return 'fasta' + #elif $data.is_of_type('fastqsanger'): + #return 'fastqsanger' + #elif $data.is_of_type('fasta.gz'): + #return 'fasta.gz' + #elif $data.is_of_type('fasta.bz2'): + #return 'fasta.bz2' + #elif $data.is_of_type('fastq.gz'): + #return 'fastq.gz' + #elif $data.is_of_type('fastq.bz2'): + #return 'fastq.bz2' + #end if + #end def + kraken2 --threads \${GALAXY_SLOTS:-1} --db '${kraken2_database.fields.path}' @@ -20,21 +39,29 @@ --quick #end if - #if $single_paired.single_paired_selector == 'yes' - --paired + #if $single_paired.single_paired_selector == "yes" + --paired '${single_paired.forward_input}' '${single_paired.reverse_input}' #elif $single_paired.single_paired_selector == "collection": + --paired '${single_paired.input_pair.forward}' '${single_paired.input_pair.reverse}' #else: '${single_paired.input_sequences}' #end if #if $split_reads: - --classified-out '${classified_out}' --unclassified-out '${unclassified_out}' + #if $single_paired.single_paired_selector == "no": + --classified-out '${classified_out_s}' --unclassified-out '${unclassified_out_s}' + #elif $single_paired.single_paired_selector == "yes": + #set $result = $get_type($single_paired.forward_input) + --unclassified-out 'un_out#.${result}' --classified-out 'cl_out#.${result}' + #else: + #set $result = $get_type($single_paired.input_pair.forward) + --unclassified-out 'un_out#.${result}' --classified-out 'cl_out#.${result}' + #end if #end if --confidence '${confidence}' - --minimum-base-quality '${min_base_quality}' #if $use_names: @@ -56,7 +83,7 @@ <inputs> <conditional name="single_paired"> <param name="single_paired_selector" type="select" label="Single or paired reads" help="--paired"> - <option value="collection">Collection</option> + <option value="collection">Paired Collection</option> <option value="yes">Paired</option> <option selected="True" value="no">Single</option> </param> @@ -71,43 +98,63 @@ <param format="@INTYPES@" label="Input sequences" name="input_sequences" type="data"/> </when> </conditional> - - <param name="use_names" type="boolean" label="Print scientific names instead of just taxids"/> - - <param name="confidence" type="float" label="Confidence" value="0.0" help="Confidence score threshold. Must be in [0, 1]"> - <validator type="in_range" min="0.0" max="1.0" message="Confidence score threshold should be between 0 and 1" /> - </param> - - <param name="min_base_quality" type="integer" label="Minimum Base Quality" value="0" help="Minimum base quality used in classification (only effective with FASTQ input)"/> - - <param name="quick" type="boolean" label="Enable quick operation" help="Quick operation (use first hit)"/> + <param name="use_names" type="boolean" label="Print scientific names instead of just taxids"/> + <param name="confidence" type="float" label="Confidence" value="0.0" help="Confidence score threshold. Must be in [0, 1]"> + <validator type="in_range" min="0.0" max="1.0" message="Confidence score threshold should be between 0 and 1" /> + </param> + <param name="min_base_quality" type="integer" label="Minimum Base Quality" value="0" help="Minimum base quality used in classification (only effective with FASTQ input)"/> + <param name="quick" type="boolean" label="Enable quick operation" help="Quick operation (use first hit)"/> + <param name="split_reads" type="boolean" label="Split classified and unclassified outputs?" help="Sets --unclassified-out and --classified-out"/> - <param name="split_reads" type="boolean" label="Split classified and unclassified outputs?" help="Sets --unclassified-out and --classified-out"/> + <section name="report" title="Create Report" expanded="false"> + <param name="create_report" type="boolean" label="Print a report with aggregrate counts/clade to file" help="--report" optional="true"/> + <param name="use_mpa_style" type="boolean" label="Format report output like Kraken 1's kraken-mpa-report" help="--use-mpa-style" optional="true"/> + <param name="report_zero_counts" type="boolean" label="Report counts for ALL taxa, even if counts are zero" help="--report-zero-counts" optional="true"/> + </section> - <section name="report" title="Create Report" expanded="false"> - <param name="create_report" type="boolean" label="Print a report with aggregrate counts/clade to file" help="--report" optional="true"/> - <param name="use_mpa_style" type="boolean" label="Format report output like Kraken 1's kraken-mpa-report" help="--use-mpa-style" optional="true"/> - <param name="report_zero_counts" type="boolean" label="Report counts for ALL taxa, even if counts are zero" help="--report-zero-counts" optional="true"/> - </section> - - <expand macro="input_database"/> - + <expand macro="input_database"/> </inputs> <outputs> - <data name="classified_out" format_source="input_sequences" label="${tool.name} on ${on_string}: Classified reads"> - <filter>(split_reads)</filter> + <data name="classified_out_s" format_source="input_sequences" label="${tool.name} on ${on_string}: Classified reads"> + <filter>(split_reads and ('no' in single_paired['single_paired_selector']))</filter> + </data> + <data name="unclassified_out_s" format_source="input_sequences" label="${tool.name} on ${on_string}: Unclassified reads"> + <filter>(split_reads and ('no' in single_paired['single_paired_selector']))</filter> + </data> + <data name="report_output" format="tabular" label="Report: ${tool.name} on ${on_string}"> + <filter>(report['create_report'])</filter> + </data> + + <data name="out1" format_source="forward_input" label="Unclassified forward" from_work_dir="un_out_1.*"> + <filter>(split_reads and ("yes" in single_paired['single_paired_selector']))</filter> + </data> + <data name="out2" format_source="forward_input" label="Unclassified reverse" from_work_dir="un_out_2.*"> + <filter>(split_reads and ("yes" in single_paired['single_paired_selector']))</filter> </data> - <data name="unclassified_out" format_source="input_sequences" label="${tool.name} on ${on_string}: Unclassified reads"> - <filter>(split_reads)</filter> + <data name="out3" format_source="forward_input" label="Classified forward" from_work_dir="cl_out_1.*"> + <filter>(split_reads and ("yes" in single_paired['single_paired_selector']))</filter> + </data> + <data name="out4" format_source="forward_input" label="Classified reverse" from_work_dir="cl_out_2.*"> + <filter>(split_reads and ("yes" in single_paired['single_paired_selector']))</filter> + </data> + + <data name="out1.1" format_source="input_pair['forward']" label="Unclassified forward" from_work_dir="un_out_1.*"> + <filter>(split_reads and ("collection" in single_paired['single_paired_selector']))</filter> </data> - <data name="report_output" format_source="text" label="Report: ${tool.name} on ${on_string}"> - <filter>(report['create_report'])</filter> - </data> + <data name="out2.1" format_source="input_pair['forward']" label="Unclassified reverse" from_work_dir="un_out_2.*"> + <filter>(split_reads and ("collection" in single_paired['single_paired_selector']))</filter> + </data> + <data name="out3.1" format_source="input_pair['forward']" label="Classified forward" from_work_dir="cl_out_1.*"> + <filter>(split_reads and ("collection" in single_paired['single_paired_selector']))</filter> + </data> + <data name="out4.1" format_source="input_pair['forward']" label="Classified reverse" from_work_dir="cl_out_2.*"> + <filter>(split_reads and ("collection" in single_paired['single_paired_selector']))</filter> + </data> + <data name="output" format="tabular" label="${tool.name} on ${on_string}: Classification"/> <!--<data format="tabular" label="${tool.name} on ${on_string}: Translated classification" name="translated" />--> </outputs> - - <tests> + <tests> <test> <param name="single_paired_selector" value="no"/> <param name="input_sequences" value="kraken_test1.fa" ftype="fasta"/> @@ -118,6 +165,21 @@ <param name="kraken2_database" value="test_entry"/> <output name="output" file="kraken_test1_output.tab" ftype="tabular"/> </test> + <test> + <param name="single_paired_selector" value="yes"/> + <param name="forward_input" value="kraken_test2_R1.fastq" ftype="fastq"/> + <param name="reverse_input" value="kraken_test2_R2.fastq" ftype="fastq"/> + <param name="split_reads" value="true"/> + <param name="quick" value="no"/> + <param name="confidence" value="0"/> + <param name="only-classified-output" value="false"/> + <param name="kraken2_database" value="test_entry"/> + <output name="out1" file="un_test2_output_1.fastq" ftype="fastq"/> + <output name="out2" file="un_test2_output_2.fastq" ftype="fastq"/> + <output name="out3" file="cl_test2_output_1.fastq" ftype="fastq"/> + <output name="out4" file="cl_test2_output_2.fastq" ftype="fastq"/> + <output name="output" file="kraken_test2_output.tab" ftype="tabular"/> + </test> </tests> <help> <![CDATA[