Mercurial > repos > iuc > nanoplot
view nanoplot.xml @ 6:0f1c34698076 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/nanoplot/ commit 80c665b4e4435959b468c6f65a4fb8dcc7e178d0
author | iuc |
---|---|
date | Fri, 24 Feb 2023 08:38:52 +0000 |
parents | a3c4fe6f49ab |
children | 7b379e98b9a9 |
line wrap: on
line source
<tool id="nanoplot" name="NanoPlot" version="@TOOL_VERSION@+galaxy0" profile="20.05"> <description>Plotting suite for Oxford Nanopore sequencing data and alignments</description> <macros> <token name="@TOOL_VERSION@">1.41.0</token> </macros> <requirements> <requirement type="package" version="@TOOL_VERSION@">nanoplot</requirement> </requirements> <stdio> <regex match="kaleido problem" source="stderr" level="fatal" description="No static plots are saved due to some kaleido problem" /> </stdio> <version_command>NanoPlot --version</version_command> <command detect_errors="exit_code"><![CDATA[ ## set TMPDIR if not already set by admin ## otherwise kalleido fails with `Less than 64MB of free space in temporary directory for shared memory files: 0` ## export TMPDIR=\${TMPDIR:-\$_GALAXY_JOB_TMP_DIR}; #set $myfiles = $mode.reads.files #set reads_temp = [] #if $mode.choice == 'combined': #for $i, $f in enumerate($myfiles) #if $f.ext.startswith("fastq"): #set $extension = 'fastq' #else #set $extension = $f.ext #end if #if $f.ext.endswith(".gz"): #set $f = $extension + ".gz" #else if $f.ext.endswith(".bz"): #set $extension = $extension + "bz2" #end if ln -s '$f' './read_${i}.$extension' && #if "bam" in $extension ln -s '$f.metadata.bam_index' './read_${i}.${extension}.bai' && #end if $reads_temp.append("read_" + str($i) + "." + str($extension)) #end for #else #if $myfiles.ext.startswith("fastq"): #set $extension = 'fastq' #else #set $extension = $myfiles.ext #end if #if $myfiles.ext.endswith(".gz"): #set $extension = $extension + ".gz" #else if $myfiles.ext.endswith(".bz"): #set $extension = $extension + "bz2" #end if ln -s '$myfiles' './read.$extension' && #if "bam" in $extension ln -s '$myfiles.metadata.bam_index' './read.${extension}.bai' && #end if $reads_temp.append("read." + str($extension)) #end if NanoPlot --threads \${GALAXY_SLOTS:-4} --tsv_stats --$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.runtime_until -- $filter.runtime_until #end if #if $filter.readtype --readtype $filter.readtype #end if #if $customization.color --color $customization.color #end if #if $customization.plots --plots ${str($customization.plots).replace(',', ' ')} #end if $filter.drop_outliers $filter.loglength $filter.percentqual $filter.alength $filter.barcoded $filter.no_supplementary $customization.N50 -o '.' && >&2 cat *log ]]></command> <inputs> <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="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="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 name="filter" title="Options for filtering or transforming input prior to plotting" expanded="false"> <param type="integer" argument="--maxlength" optional="true" label="Drop reads longer than length specified."/> <param type="integer" argument="--minlength" optional="true" label="Drop reads shorter than length specified."/> <param type="boolean" argument="--drop_outliers" truevalue="--drop_outliers" falsevalue="" label="Drop outlier reads with extreme long length."/> <param type="integer" argument="--downsample" optional="true" label="Reduce dataset to N reads by random sampling."/> <param type="boolean" argument="--loglength" truevalue="--loglength" falsevalue="" label="Logarithmic scaling of lengths in plots."/> <param type="boolean" argument="--percentqual" truevalue="--percentqual" falsevalue="" label="Use qualities as theoretical percent identities."/> <param type="boolean" argument="--alength" truevalue="--alength" falsevalue="" label="Use aligned read lengths rather than sequenced length (bam mode)."/> <param type="integer" argument="--minqual" optional="true" label="Drop reads with an average quality lower than specified."/> <param type="integer" argument="--runtime_until" optional="true" label="Only take the N first hours of a run"/> <param type="select" argument="--readtype" optional="true" label="Which read type to extract information about from summary."> <option value="1D">1D</option> <option value="2D">2D</option> <option value="1D2">1D2</option> </param> <param type="boolean" argument="--barcoded" truevalue="--barcoded" falsevalue="" label="Use if you want to split the summary file by barcode."/> <param type="boolean" argument="--no_supplementary" truevalue="--no_supplementary" falsevalue="" label="Use if you want to remove supplementary alignments"/> </section> <section name="customization" title="Options for customizing the plots created" expanded="false"> <param type="select" argument="--color" optional="true" label="Specify a color for the plots."> <option value="aliceblue">aliceblue</option> <option value="antiquewhite">antiquewhite</option> <option value="aqua">aqua</option> <option value="aquamarine">aquamarine</option> <option value="azure">azure</option> <option value="beige">beige</option> <option value="bisque">bisque</option> <option value="black">black</option> <option value="blanchedalmond">blanchedalmond</option> <option value="blue">blue</option> <option value="blueviolet">blueviolet</option> <option value="brown">brown</option> <option value="burlywood">burlywood</option> <option value="cadetblue">cadetblue</option> <option value="chartreuse">chartreuse</option> <option value="chocolate">chocolate</option> <option value="coral">coral</option> <option value="cornflowerblue">cornflowerblue</option> <option value="cornsilk">cornsilk</option> <option value="crimson">crimson</option> <option value="cyan">cyan</option> <option value="darkblue">darkblue</option> <option value="darkcyan">darkcyan</option> <option value="darkgoldenrod">darkgoldenrod</option> <option value="darkgray">darkgray</option> <option value="darkgreen">darkgreen</option> <option value="darkgrey">darkgrey</option> <option value="darkkhaki">darkkhaki</option> <option value="darkmagenta">darkmagenta</option> <option value="darkolivegreen">darkolivegreen</option> <option value="darkorange">darkorange</option> <option value="darkorchid">darkorchid</option> <option value="darkred">darkred</option> <option value="darksalmon">darksalmon</option> <option value="darkseagreen">darkseagreen</option> <option value="darkslateblue">darkslateblue</option> <option value="darkslategray">darkslategray</option> <option value="darkslategrey">darkslategrey</option> <option value="darkturquoise">darkturquoise</option> <option value="darkviolet">darkviolet</option> <option value="deeppink">deeppink</option> <option value="deepskyblue">deepskyblue</option> <option value="dimgray">dimgray</option> <option value="dimgrey">dimgrey</option> <option value="dodgerblue">dodgerblue</option> <option value="firebrick">firebrick</option> <option value="floralwhite">floralwhite</option> <option value="forestgreen">forestgreen</option> <option value="fuchsia">fuchsia</option> <option value="gainsboro">gainsboro</option> <option value="ghostwhite">ghostwhite</option> <option value="goldenrod">goldenrod</option> <option value="gold">gold</option> <option value="gray">gray</option> <option value="green">green</option> <option value="greenyellow">greenyellow</option> <option value="grey">grey</option> <option value="honeydew">honeydew</option> <option value="hotpink">hotpink</option> <option value="indianred">indianred</option> <option value="indigo">indigo</option> <option value="ivory">ivory</option> <option value="khaki">khaki</option> <option value="lavenderblush">lavenderblush</option> <option value="lavender">lavender</option> <option value="lawngreen">lawngreen</option> <option value="lemonchiffon">lemonchiffon</option> <option value="lightblue">lightblue</option> <option value="lightcoral">lightcoral</option> <option value="lightcyan">lightcyan</option> <option value="lightgoldenrodyellow">lightgoldenrodyellow</option> <option value="lightgray">lightgray</option> <option value="lightgreen">lightgreen</option> <option value="lightgrey">lightgrey</option> <option value="lightpink">lightpink</option> <option value="lightsalmon">lightsalmon</option> <option value="lightseagreen">lightseagreen</option> <option value="lightskyblue">lightskyblue</option> <option value="lightslategray">lightslategray</option> <option value="lightslategrey">lightslategrey</option> <option value="lightsteelblue">lightsteelblue</option> <option value="lightyellow">lightyellow</option> <option value="limegreen">limegreen</option> <option value="lime">lime</option> <option value="linen">linen</option> <option value="magenta">magenta</option> <option value="maroon">maroon</option> <option value="mediumaquamarine">mediumaquamarine</option> <option value="mediumblue">mediumblue</option> <option value="mediumorchid">mediumorchid</option> <option value="mediumpurple">mediumpurple</option> <option value="mediumseagreen">mediumseagreen</option> <option value="mediumslateblue">mediumslateblue</option> <option value="mediumspringgreen">mediumspringgreen</option> <option value="mediumturquoise">mediumturquoise</option> <option value="mediumvioletred">mediumvioletred</option> <option value="midnightblue">midnightblue</option> <option value="mintcream">mintcream</option> <option value="mistyrose">mistyrose</option> <option value="moccasin">moccasin</option> <option value="navajowhite">navajowhite</option> <option value="navy">navy</option> <option value="oldlace">oldlace</option> <option value="olivedrab">olivedrab</option> <option value="olive">olive</option> <option value="orange">orange</option> <option value="orangered">orangered</option> <option value="orchid">orchid</option> <option value="palegoldenrod">palegoldenrod</option> <option value="palegreen">palegreen</option> <option value="paleturquoise">paleturquoise</option> <option value="palevioletred">palevioletred</option> <option value="papayawhip">papayawhip</option> <option value="peachpuff">peachpuff</option> <option value="peru">peru</option> <option value="pink">pink</option> <option value="plum">plum</option> <option value="powderblue">powderblue</option> <option value="purple">purple</option> <option value="rebeccapurple">rebeccapurple</option> <option value="red">red</option> <option value="rosybrown">rosybrown</option> <option value="royalblue">royalblue</option> <option value="saddlebrown">saddlebrown</option> <option value="salmon">salmon</option> <option value="sandybrown">sandybrown</option> <option value="seagreen">seagreen</option> <option value="seashell">seashell</option> <option value="sienna">sienna</option> <option value="silver">silver</option> <option value="skyblue">skyblue</option> <option value="slateblue">slateblue</option> <option value="slategray">slategray</option> <option value="slategrey">slategrey</option> <option value="snow">snow</option> <option value="springgreen">springgreen</option> <option value="steelblue">steelblue</option> <option value="tan">tan</option> <option value="teal">teal</option> <option value="thistle">thistle</option> <option value="tomato">tomato</option> <option value="turquoise">turquoise</option> <option value="violet">violet</option> <option value="wheat">wheat</option> <option value="whitesmoke">whitesmoke</option> <option value="white">white</option> <option value="yellowgreen">yellowgreen</option> <option value="yellow">yellow</option> </param> <param type="select" argument="--plots" optional="true" multiple="true" display="checkboxes" label="Specify the bivariate format of the plots."> <option value="kde">kernel density estimation (kde)</option> <option value="dot">dots (dot)</option> </param> <param type="boolean" argument="--N50" truevalue="--N50" falsevalue="" label="Show the N50 mark in the read length histogram."/> </section> </inputs> <outputs> <data name="output_html" format="html" from_work_dir="NanoPlot-report.html" label="${tool.name} on ${on_string}: HTML report"/> <data name="nanostats" format="tabular" from_work_dir="NanoStats.txt" label="${tool.name} on ${on_string}: NanoStats"/> <data name="nanostats_post_filtering" format="tabular" from_work_dir="NanoStats_post_filtering.txt" label="${tool.name} on ${on_string}: NanoStats post filtering" /> <data name="read_length" format="png" from_work_dir="Non_weightedHistogramReadlength.png" label="${tool.name} on ${on_string}: Histogram Read Length"/> <data name="log_read_length" format="png" from_work_dir="Non_weightedLogTransformed_HistogramReadlength.png" label="${tool.name} on ${on_string}: Log Transformed Histogram Read Length"/> </outputs> <tests> <test> <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="fastqsanger.gz"/> </conditional> </conditional> <section name="filter"> <param name="downsample" value="800"/> </section> <section name="customization"> <param name="plots" value="kde"/> </section> <output name="output_html" ftype="html"> <assert_contents> <has_text text="html"/> <has_text text="mean_qual"/> </assert_contents> </output> <output name="nanostats" file="NanoStats.txt" ftype="tabular"/> <output name="nanostats_post_filtering" file="NanoStats_post_filtering.txt" ftype="tabular"/> <output name="read_length" ftype="png" file="HistogramReadlength.png" compare="sim_size"> </output> <output name="log_read_length" ftype="png"> <assert_contents> <has_text text="PNG"/> </assert_contents> </output> </test> <test> <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"/> <param name="minlenght" value="1000"/> </section> <section name="customization"> <param name="color" value="yellow"/> </section> <output name="output_html" ftype="html"> <assert_contents> <has_text text="html"/> <has_text text="Aligned read length vs Percent identity plot using dots"/> <!-- bam report specific --> </assert_contents> </output> <output name="read_length" ftype="png"> <assert_contents> <has_text text="PNG"/> </assert_contents> </output> </test> <test><!-- test with multiple input files --> <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"/> <has_text text="<td>9</td>"/> <!--check both files were used 4+5 reads --> </assert_contents> </output> </test> </tests> <help> <![CDATA[ **What it does** NanoPlot_ is a plotting tool for long read sequencing data and alignments written by `Wouter De Coster`_ .. _NanoPlot: https://github.com/wdecoster/NanoPlot .. _`Wouter De Coster`: https://github.com/wdecoster **Input** NanoPlot requires 1 or more files as input. They can either be fastq (can be generated by albacore, guppy or MinKNOW containing additional information), fasta, sorted bam, sorted cram or sequencing summary. **Output** NanoPlot produces different number of plots depending on the data and customizations. A detailed view can be seen on here_. Additionally a file showing the statistics is generated. .. _here: https://github.com/wdecoster/NanoPlot#plots-generated ]]> </help> <citations> <citation type="bibtex"> @misc{githubnanoplot, author = {De Coster, Wouter}, year = {2018}, title = {NanoPlot}, publisher = {GitHub}, journal = {GitHub repository}, url = {https://github.com/wdecoster/NanoPlot}, }</citation> <citation type="doi">10.1093/bioinformatics/bty149</citation> </citations> </tool>