Mercurial > repos > iuc > nanoplot
changeset 3:645159bcee2d draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/nanoplot/ commit 6afb87d2f226ac2fb61255b89dd9c36940b482c9
author | iuc |
---|---|
date | Fri, 21 Jun 2019 19:13:55 -0400 |
parents | acd337269171 |
children | edbb6c5028f5 |
files | nanoplot.xml |
diffstat | 1 files changed, 147 insertions(+), 122 deletions(-) [+] |
line wrap: on
line diff
--- a/nanoplot.xml Thu Jun 20 10:18:48 2019 -0400 +++ b/nanoplot.xml Fri Jun 21 19:13:55 2019 -0400 @@ -1,4 +1,4 @@ -<tool id="nanoplot" name="NanoPlot" version="@TOOL_VERSION@+galaxy0"> +<tool id="nanoplot" name="NanoPlot" version="@TOOL_VERSION@+galaxy1"> <description>Plotting suite for Oxford Nanopore sequencing data and alignments</description> <macros> <token name="@TOOL_VERSION@">1.25.0</token> @@ -7,123 +7,139 @@ <requirement type="package" version="@TOOL_VERSION@">nanoplot</requirement> </requirements> <version_command>NanoPlot --version</version_command> - <command detect_errors="exit_code"> - <![CDATA[ + <command detect_errors="exit_code"><![CDATA[ +#set $myfiles = $mode.reads.files - #set reads_temp = [] - #for $i, $f in enumerate($reads.files) +#set reads_temp = [] +#if $mode.choice == 'combined': + #for $i, $f in enumerate($myfiles) + #if $f.ext == "fastqsanger": + #set $extension = 'fastq' + #else #set $extension = $f.ext - #if $extension == 'fastqsanger' - #set $extension = 'fastq' - #end if - ln -s '$f' './read_${i}.$extension' && - $reads_temp.append("read_" + str($i) + "." + str($extension)) - #end for - - NanoPlot - --threads \${GALAXY_SLOTS:-4} - --$reads.type ${' '.join($reads_temp)} + #end if + ln -s '$f' './read_${i}.$extension' && + $reads_temp.append("read_" + str($i) + "." + str($extension)) + #end for +#else + #if $myfiles.ext == "fastqsanger": + #set $extension = 'fastq' + #else + #set $extension = $myfiles.ext + #end if + ln -s '$mode.reads.files' './read.$extension' && + $reads_temp.append("read." + str($extension)) +#end if - #if $filter.maxlength - --maxlength $filter.maxlength - #end if - #if $filter.minlength - --minlength $filter.minlength - #end if - #if $filter.downsample - --downsample $filter.downsample - #end if - #if $filter.minqual - --minqual $filter.minqual - #end if - #if $filter.readtype - --readtype $filter.readtype - #end if - #if $customization.color - --color $customization.color - #end if - #if $customization.format - --format $customization.format - #end if - #if $customization.plots - --plots ${str($customization.plots).replace(',', ' ')} - #end if - $filter.drop_outliers - $filter.loglength - $filter.percentqual - $filter.alength - $filter.barcoded - $customization.noN50 - $customization.N50 - -o '.' - ]]> - </command> +NanoPlot + --threads \${GALAXY_SLOTS:-4} + --$mode.reads.type ${' '.join($reads_temp)} + #if $filter.maxlength + --maxlength $filter.maxlength + #end if + #if $filter.minlength + --minlength $filter.minlength + #end if + #if $filter.downsample + --downsample $filter.downsample + #end if + #if $filter.minqual + --minqual $filter.minqual + #end if + #if $filter.readtype + --readtype $filter.readtype + #end if + #if $customization.color + --color $customization.color + #end if + #if $customization.format + --format $customization.format + #end if + #if $customization.plots + --plots ${str($customization.plots).replace(',', ' ')} + #end if + $filter.drop_outliers + $filter.loglength + $filter.percentqual + $filter.alength + $filter.barcoded + $customization.noN50 + $customization.N50 + -o '.' + ]]></command> <inputs> - <conditional name="reads"> - <param name="type" type="select" label="Type of the file(s) to work on"> - <option value="fastq" selected="true">fastq</option> - <option value="fasta">fasta</option> - <option value="fastq_rich">fastq_rich</option> - <option value="fastq_minimal">fastq_minimal</option> - <option value="summary">summary</option> - <option value="bam">bam</option> - <option value="cram">cram</option> + <conditional name="mode"> + <param name="choice" type="select" label="Select multifile mode" help="When supplying multiple files, batch mode will run NanoPlot on each file separately, while combined mode will run NanoPlot once on all the reads together. When only supplying a single input file, this setting does not matter."> + <option value="batch" selected="true">batch</option> + <option value="combined">combined</option> </param> - <when value="fastq"> - <param - type="data" - argument="--fastq" - name="files" - format="fastq,fastq.gz,fastq.bz2,vcf_bgzip" - multiple="true"/> - </when> - <when value="fasta"> - <param - type="data" - argument="--fasta" - name="files" - format="fasta,fasta.gz,vcf_bgzip" - multiple="true"/> + <when value="batch"> + <conditional name="reads"> + <param name="type" type="select" label="Type of the file(s) to work on"> + <option value="fastq" selected="true">fastq</option> + <option value="fasta">fasta</option> + <option value="fastq_rich">fastq_rich</option> + <option value="fastq_minimal">fastq_minimal</option> + <option value="summary">summary</option> + <option value="bam">bam</option> + <option value="cram">cram</option> + </param> + <when value="fastq"> + <param type="data" argument="--fastq" name="files" format="fastq,fastq.gz,fastq.bz2,vcf_bgzip"/> + </when> + <when value="fasta"> + <param type="data" argument="--fasta" name="files" format="fasta,fasta.gz,vcf_bgzip"/> + </when> + <when value="fastq_rich"> + <param type="data" argument="--fastq_rich" name="files" format="fastq,fastq.gz,fastq.bz2,vcf_bgzip"/> + </when> + <when value="fastq_minimal"> + <param type="data" argument="--fastq_minimal" name="files" format="fastq,fastq.gz,fastq.bz2,vcf_bgzip"/> + </when> + <when value="summary"> + <param type="data" argument="--summary" name="files" format="txt,zip"/> + </when> + <when value="bam"> + <param type="data" argument="--bam" name="files" format="bam"/> + </when> + <when value="cram"> + <param type="data" argument="--cram" name="files" format="cram"/> + </when> + </conditional> </when> - <when value="fastq_rich"> - <param - type="data" - argument="--fastq_rich" - name="files" - format="fastq,fastq.gz,fastq.bz2,vcf_bgzip" - multiple="true"/> - </when> - <when value="fastq_minimal"> - <param - type="data" - argument="--fastq_minimal" - name="files" - format="fastq,fastq.gz,fastq.bz2,vcf_bgzip" - multiple="true"/> - </when> - <when value="summary"> - <param - type="data" - argument="--summary" - name="files" - format="txt,zip" - multiple="true"/> - </when> - <when value="bam"> - <param - type="data" - argument="--bam" - name="files" - format="bam" - multiple="true"/> - </when> - <when value="cram"> - <param - type="data" - argument="--cram" - name="files" - format="cram" - multiple="true"/> + <when value="combined"> + <conditional name="reads"> + <param name="type" type="select" label="Type of the file(s) to work on"> + <option value="fastq" selected="true">fastq</option> + <option value="fasta">fasta</option> + <option value="fastq_rich">fastq_rich</option> + <option value="fastq_minimal">fastq_minimal</option> + <option value="summary">summary</option> + <option value="bam">bam</option> + <option value="cram">cram</option> + </param> + <when value="fastq"> + <param type="data" argument="--fastq" name="files" format="fastq,fastq.gz,fastq.bz2,vcf_bgzip" multiple="true"/> + </when> + <when value="fasta"> + <param type="data" argument="--fasta" name="files" format="fasta,fasta.gz,vcf_bgzip" multiple="true"/> + </when> + <when value="fastq_rich"> + <param type="data" argument="--fastq_rich" name="files" format="fastq,fastq.gz,fastq.bz2,vcf_bgzip" multiple="true"/> + </when> + <when value="fastq_minimal"> + <param type="data" argument="--fastq_minimal" name="files" format="fastq,fastq.gz,fastq.bz2,vcf_bgzip" multiple="true"/> + </when> + <when value="summary"> + <param type="data" argument="--summary" name="files" format="txt,zip" multiple="true"/> + </when> + <when value="bam"> + <param type="data" argument="--bam" name="files" format="bam" multiple="true"/> + </when> + <when value="cram"> + <param type="data" argument="--cram" name="files" format="cram" multiple="true"/> + </when> + </conditional> </when> </conditional> <section @@ -399,9 +415,12 @@ </outputs> <tests> <test> - <conditional name="reads"> - <param name="type" value="fastq_rich"/> - <param name="files" value="reads.fastq.gz" ftype="fastq.gz"/> + <conditional name="mode"> + <param name="choice" value="batch"/> + <conditional name="reads"> + <param name="type" value="fastq_rich"/> + <param name="files" value="reads.fastq.gz" ftype="fastq.gz"/> + </conditional> </conditional> <section name="filter"> <param name="downsample" value="800"/> @@ -415,9 +434,12 @@ <output name="read_length" file="HistogramReadlength.png" ftype="png" compare="sim_size" delta="3000"/> </test> <test> - <conditional name="reads"> - <param name="type" value="bam"/> - <param name="files" value="alignment.bam" ftype="bam"/> + <conditional name="mode"> + <param name="choice" value="combined"/> + <conditional name="reads"> + <param name="type" value="bam"/> + <param name="files" value="alignment.bam" ftype="bam"/> + </conditional> </conditional> <section name="filter"> <param name="maxlength" value="2000"/> @@ -437,15 +459,18 @@ <output name="read_length" file="bam-LogTransformed_HistogramReadlength.svg" ftype="svg" compare="sim_size"/> </test> <test><!-- test with multiple input files --> - <conditional name="reads"> - <param name="type" value="fasta"/> - <param name="files" ftype="fasta" value="reads1.fasta,reads2.fasta" /> + <conditional name="mode"> + <param name="choice" value="combined"/> + <conditional name="reads"> + <param name="type" value="fasta"/> + <param name="files" ftype="fasta" value="reads1.fasta,reads2.fasta" /> + </conditional> </conditional> <output name="output_html" ftype="html"> <assert_contents> <has_text text="html"/> <not_has_text text="Aligned read length vs Percent identity plot using dots"/> <!-- bam report specific --> - <has_text text="<td>9.0</td>"/> <!--check both files used 4+5 reads --> + <has_text text="<td>9.0</td>"/> <!--check both files were used 4+5 reads --> </assert_contents> </output> </test>