Mercurial > repos > iuc > nanocomp
changeset 0:53440b7599a2 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/nanocomp/ commit 31eda859c4e23cd76d1e30824cc6899e8fc1e16a
| author | iuc |
|---|---|
| date | Wed, 21 May 2025 21:08:34 +0000 |
| parents | |
| children | d4f671d70a65 |
| files | nanocomp.xml test-data/in1.fastq.gz test-data/in2.fastq.gz test-data/in3.fastq.gz test-data/in4.bam test-data/in5.bam |
| diffstat | 6 files changed, 258 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nanocomp.xml Wed May 21 21:08:34 2025 +0000 @@ -0,0 +1,258 @@ +<tool id="nanocomp" name="NanoComp" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.2"> + <description>Compare multiple runs of long read sequencing data and alignments.</description> + <macros> + <token name="@TOOL_VERSION@">1.25.2</token> + <token name="@VERSION_SUFFIX@">0</token> + </macros> + <xrefs> + <xref type="bio.tools">nanocomp</xref> + </xrefs> + <requirements> + <requirement type="package" version="@TOOL_VERSION@">nanocomp</requirement> + </requirements> + <version_command>NanoComp -v</version_command> + <command detect_errors="exit_code"><![CDATA[ + #import re + ##link input file with names + #for $file in $inputs.input_type.input_data + #if '.' in str($file.name) + #set $in_name = re.sub('[\-\:\s]', '_', str($file.name)) + #else + #set $in_name = re.sub('[\-\:\s]', '_', str($file.name)) + "." + $file.ext + #end if + ln -sf $file $in_name && + #end for + + ##run nanocomp + NanoComp + + ##no need for the static images (becomes deprecated) + --make_no_static + + ## Compute options + --threads \${GALAXY_SLOTS:-4} + + ##add input files + #if $inputs.input_type.input_type_selector == "fastq" + --fastq + #else if $inputs.input_type.input_type_selector == "fastq_r" + --fastq_rich + #else if $inputs.input_type.input_type_selector == "fasta" + --fasta + #else if $inputs.input_type.input_type_selector == "bam" + --bam + #else if $inputs.input_type.input_type_selector == "ubam" + --ubam + #else if $inputs.input_type.input_type_selector == "cram" + --cram + #else if $inputs.input_type.input_type_selector == "pickle" + --pickle + #else if $inputs.input_type.input_type_selector == "arrow" + --arrow + #end if + + #for $file in $inputs.input_type.input_data + #if '.' in str($file.name) + #set $in_name = re.sub('[\-\:\s]', '_', str($file.name)) + #else + #set $in_name = re.sub('[\-\:\s]', '_', str($file.name)) + "." + $file.ext + #end if + $in_name + #end for + + ##Filter options + #if $filters.maxlength + --maxlength $filters.maxlength + #end if + #if $filters.minlength + --minlength $filters.minlength + #end if + + ##Plot options + #if $plot_options.plot + --plot $plot_options.plot + #end if + + #if $plot_options.title + --title "$plot_options.title" + #end if + + #if $plot_options.names + --names $plot_options.names + #end if + + #if $plot_options.colors + --colors $plot_options.colors + #end if + + ##Output options + #if $output_options.tsv_stats + $output_options.tsv_stats + #end if + + --verbose + >& $out_log + +]]></command> + <inputs> + <section name="inputs" title="Input data" expanded="True"> + <conditional name="input_type"> + <param name="input_type_selector" type="select" label="Choose Input Format and Files"> + <option value="fastq" selected="true">FASTQ files</option> + <option value="fastq_r">FASTQ-rich files</option> + <option value="fasta">FASTA files</option> + <option value="bam">BAM files</option> + <option value="ubam">uBAM files</option> + <option value="cram">CRAM files</option> + <option value="pickle">PICKLE files</option> + <option value="arrow">ARROW files</option> + </param> + <when value="fastq"> + <param name="input_data" type="data" format="fastq,fastq.gz" multiple="true" label="FASTQ input files" help="Data is in (compressed) fastq format" /> + </when> + <when value="fastq_r"> + <param name="input_data" type="data" format="fastq,fastq.gz" multiple="true" label="FASTQ input files" help="Data is in one or more fastq file(s) generated by MinKNOW or guppy with additional information concerning channel and time" /> + </when> + <when value="fasta"> + <param name="input_data" type="data" format="fasta,fasta.gz" multiple="true" label="FASTA input files" help="Data is in (compressed) fasta format" /> + </when> + <when value="bam"> + <param name="input_data" type="data" format="bam" multiple="true" label="BAM input files" help="Data is in sorted bam files." /> + </when> + <when value="ubam"> + <param name="input_data" type="data" format="bam" multiple="true" label="Unmapped BAM input files" help="Data is in one or more unmapped bam files." /> + </when> + <when value="cram"> + <param name="input_data" type="data" format="cram" multiple="true" label="CRAM input files" help="Data is in sorted cram files." /> + </when> + <when value="pickle"> + <param name="input_data" type="data" format="binary" multiple="true" label="PICKLE input files" help="Data is in one or more pickle file(s) from using NanoComp/NanoPlot." /> + </when> + <when value="arrow"> + <param name="input_data" type="data" format="binary" multiple="true" label="ARROW input files" help="Data is in one or more feather/arrow file(s)." /> + </when> + </conditional> + </section> + + <section name="filters" title="Filtering Input Prior To Plotting" expanded="false"> + <param argument="--maxlength" type="integer" optional="true" label="Max read length filtering" help="Drop reads longer than length specified." /> + <param argument="--minlength" type="integer" optional="true" label="Min read length filtering" help="Drop reads shorter than length specified." /> + </section> + + <section name="plot_options" title="Plot Customization Options" expanded="false"> + <param argument="--plot" type="select" label="Plot Type" help="Specify the type of plot to be used."> + <option value="box">Box plot</option> + <option value="violin" selected="true">Violin plot</option> + <option value="ridge">Ridge (joyplot) plot</option> + <option value="not">No plot</option> + </param> + <param argument="--title" type="text" label="Custom plot titles" help="Add a title to all plots." /> + <param argument="--names" type="text" label="Custom names" help="Specify the names (space seperated, respective to input) to be used for the datasets." /> + <param argument="--colors" type="text" label="Custom colors" help="Specify the colors (space seperated, respective to input) to be used for each the datasets. Can be any valid Matplotlib color: Named, HEX-string, RGB, ... " /> + </section> + + <section name="output_options" title="Output Options" expanded="false"> + <param argument="--tsv_stats" type="boolean" truevalue="--tsv_stats" falsevalue="" optional="true" checked="false" label="TSV Output Format" help="Output the statistics file as properly formatted TSV."/> + </section> + + </inputs> + + + <outputs> + <data name="out_log" format="txt" label="${tool.name} on ${on_string}: Log file"/> + <data name="stats_file" format="txt" from_work_dir="NanoStats.txt" label="${tool.name} on ${on_string}: Statistics file"/> + <data name="html_report" format="html" from_work_dir="NanoComp-report.html" label="${tool.name} on ${on_string}: Html Report"/> + </outputs> + <tests> + <test expect_num_outputs="3"> + <section name="inputs"> + <conditional name="input_type"> + <param name="input_type_selector" value="fastq" /> + <param name="input_data" value="in1.fastq.gz,in2.fastq.gz,in3.fastq.gz" /> + </conditional> + </section> + <output name="stats_file" > + <assert_contents> + <has_text text="General summary" /> + </assert_contents> + </output> + <output name="html_report"> + <assert_contents> + <has_text text="html"/> + <has_text text="Summary statistics"/> + </assert_contents> + </output> + </test> + <test expect_num_outputs="3"> + <section name="inputs"> + <conditional name="input_type"> + <param name="input_type_selector" value="bam" /> + <param name="input_data" value="in4.bam,in5.bam" /> + </conditional> + </section> + <section name="filters" > + <param name="maxlength" value="15000"/> + <param name="minlength" value="500"/> + </section> + <output name="html_report"> + <assert_contents> + <has_text text="html"/> + <has_text text="Summary statistics"/> + </assert_contents> + </output> + </test> + <test expect_num_outputs="3"> + <section name="inputs"> + <conditional name="input_type"> + <param name="input_type_selector" value="fastq" /> + <param name="input_data" value="in1.fastq.gz,in3.fastq.gz" /> + </conditional> + </section> + <section name="output_options"> + <param name="tsv_stats" value="true"/> + </section> + <output name="stats_file" > + <assert_contents> + <has_text text="Metrics" /> + </assert_contents> + </output> + </test> + <test expect_num_outputs="3"> + <section name="inputs"> + <conditional name="input_type"> + <param name="input_type_selector" value="bam" /> + <param name="input_data" value="in4.bam,in5.bam" /> + </conditional> + </section> + <section name="plot_options" > + <param name="plot" value="box"/> + </section> + <output name="html_report"> + <assert_contents> + <has_text text="html"/> + <has_text text="Plots"/> + </assert_contents> + </output> + </test> + </tests> + <help>< +]]></help> + <citations> + <citation type="doi">10.1093/bioinformatics/btad311</citation> + </citations> +</tool>
