Mercurial > repos > iuc > dada2_plotqualityprofile
comparison dada2_plotQualityProfile.xml @ 0:944958061b0f draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
| author | iuc |
|---|---|
| date | Fri, 08 Nov 2019 18:46:40 -0500 |
| parents | |
| children | 73c03d6288f1 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:944958061b0f |
|---|---|
| 1 <tool id="dada2_plotQualityProfile" name="dada2: plotQualityProfile" version="@DADA2_VERSION@+galaxy@WRAPPER_VERSION@" profile="19.09"> | |
| 2 <description>plot a visual summary of the quality scores</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="requirements"/> | |
| 7 <expand macro="stdio"/> | |
| 8 <expand macro="version_command"/> | |
| 9 <command detect_errors="exit_code"><![CDATA[ | |
| 10 ##name files by linking | |
| 11 #import re | |
| 12 mkdir forward && | |
| 13 #if $batch_cond.paired_cond.paired_select != "single" | |
| 14 mkdir reverse && | |
| 15 #end if | |
| 16 | |
| 17 #if $batch_cond.batch_select == "batch": | |
| 18 #set elid = re.sub('[^\w\-\.]', '_', str($batch_cond.paired_cond.reads.element_identifier)) | |
| 19 #if $batch_cond.paired_cond.paired_select != "paired" | |
| 20 ln -s '$batch_cond.paired_cond.reads' forward/'$elid' && | |
| 21 #else | |
| 22 ln -s '$batch_cond.paired_cond.reads.forward' forward/'$elid' && | |
| 23 ln -s '$batch_cond.paired_cond.reads.reverse' reverse/'$elid' && | |
| 24 #end if | |
| 25 #if $batch_cond.paired_cond.paired_select == "separate" | |
| 26 ln -s '$batch_cond.paired_cond.sdaer' reverse/'$elid' && | |
| 27 #end if | |
| 28 #else | |
| 29 #for $read in $batch_cond.paired_cond.reads: | |
| 30 #set elid = re.sub('[^\w\-\.]', '_', str($read.element_identifier)) | |
| 31 #if $batch_cond.paired_cond.paired_select != "paired" | |
| 32 ln -s '$read' forward/'$elid' && | |
| 33 #else | |
| 34 ln -s '$read.forward' forward/'$elid' && | |
| 35 ln -s '$read.reverse' reverse/'$elid' && | |
| 36 #end if | |
| 37 #end for | |
| 38 #if $batch_cond.paired_cond.paired_select == "separate" | |
| 39 #for $read in $batch_cond.paired_cond.sdaer: | |
| 40 #set elid = re.sub('[^\w\-\.]', '_', str($read.element_identifier)) | |
| 41 ln -s '$read' reverse/'$elid' && | |
| 42 #end for | |
| 43 #end if | |
| 44 #end if | |
| 45 | |
| 46 Rscript --slave '$dada2_script' | |
| 47 ]]></command> | |
| 48 <configfiles> | |
| 49 <configfile name="dada2_script"><![CDATA[ | |
| 50 #import re | |
| 51 library(ggplot2, quietly=T) | |
| 52 library(dada2, quietly=T) | |
| 53 | |
| 54 #if $batch_cond.batch_select != "batch" | |
| 55 agg = $batch_cond.aggregate | |
| 56 #else | |
| 57 agg = FALSE | |
| 58 #end if | |
| 59 | |
| 60 fwd_files = list.files("forward", full.names=T) | |
| 61 qp <- plotQualityProfile(fwd_files, n=$n, aggregate = agg) | |
| 62 ggsave('output.pdf', qp, width = 20,height = 15,units = c("cm")) | |
| 63 | |
| 64 #if $batch_cond.paired_cond.paired_select != "single" | |
| 65 rev_files = list.files("reverse", full.names=T) | |
| 66 qp <- plotQualityProfile(rev_files, n=$n, aggregate = agg) | |
| 67 ggsave('output_rev.pdf', qp, width = 20,height = 15,units = c("cm")) | |
| 68 #end if | |
| 69 ]]></configfile> | |
| 70 </configfiles> | |
| 71 <inputs> | |
| 72 <conditional name="batch_cond"> | |
| 73 <param name="batch_select" type="select" label="Processing mode" help="Joint processing processes all reads at once in a single job creating a single output (two in the case of paired data). Batch processes the samples in separate jobs and creates separate output for each"> | |
| 74 <option value="joint">Joint</option> | |
| 75 <option value="batch">Batch</option> | |
| 76 </param> | |
| 77 <when value="joint"> | |
| 78 <expand macro="fastq_input" multiple="True" collection_type="list:paired" argument_fwd="fl" argument_rev="fl"/> | |
| 79 <param argument="aggregate" type="boolean" label="Aggregate data" checked="True" truevalue="TRUE" falsevalue="FALSE" help="Create a single plot for all data sets (default) or a separate plot for each data set"/> | |
| 80 </when> | |
| 81 <when value="batch"> | |
| 82 <expand macro="fastq_input" multiple="False" collection_type="paired" argument_fwd="fl" argument_rev="fl"/> | |
| 83 </when> | |
| 84 </conditional> | |
| 85 <param argument="n" type="integer" value="500000" label="sample number" help="number of records to sample from the fastq file"/> | |
| 86 </inputs> | |
| 87 <outputs> | |
| 88 <data name="output" format="pdf" from_work_dir="output.pdf"> | |
| 89 <filter>batch_cond['paired_cond']['paired_select'] == "single"</filter> | |
| 90 </data> | |
| 91 <data name="output_fwd" format="pdf" from_work_dir="output.pdf" label="${tool.name} on ${on_string}: forward reads"> | |
| 92 <filter>batch_cond['paired_cond']['paired_select'] != "single"</filter> | |
| 93 </data> | |
| 94 <data name="output_rev" format="pdf" from_work_dir="output_rev.pdf" label="${tool.name} on ${on_string}: reverse reads"> | |
| 95 <filter>batch_cond['paired_cond']['paired_select'] != "single"</filter> | |
| 96 </data> | |
| 97 </outputs> | |
| 98 <tests> | |
| 99 <!-- all tests are against the same file using a delta that should ensure that the pdf contains a plot --> | |
| 100 <!-- paired joint, no-aggregate --> | |
| 101 <test expect_num_outputs="2"> | |
| 102 <param name="batch_cond|batch_select" value="joint"/> | |
| 103 <param name="batch_cond|paired_cond|paired_select" value="paired"/> | |
| 104 <param name="batch_cond|paired_cond|reads"> | |
| 105 <collection type="list:paired"> | |
| 106 <element name="F3D0_S188_L001"> | |
| 107 <collection type="paired"> | |
| 108 <element name="forward" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/> | |
| 109 <element name="reverse" value="F3D0_S188_L001_R2_001.fastq.gz" ftype="fastqsanger.gz"/> | |
| 110 </collection> | |
| 111 </element> | |
| 112 </collection> | |
| 113 </param> | |
| 114 <param name="batch_cond|aggregate" value="FALSE"/> | |
| 115 <output name="output_fwd" value="qualityProfile.pdf" ftype="pdf" compare="sim_size" delta="15000"/> | |
| 116 <output name="output_rev" value="qualityProfile.pdf" ftype="pdf" compare="sim_size" delta="15000"/> | |
| 117 </test> | |
| 118 <!-- paired-separate joint, no-aggregate (sim_size because element ids differ) --> | |
| 119 <test expect_num_outputs="2"> | |
| 120 <param name="batch_cond|batch_select" value="joint"/> | |
| 121 <param name="batch_cond|paired_cond|paired_select" value="separate"/> | |
| 122 <param name="batch_cond|paired_cond|reads" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/> | |
| 123 <param name="batch_cond|paired_cond|sdaer" value="F3D0_S188_L001_R2_001.fastq.gz" ftype="fastqsanger.gz"/> | |
| 124 <param name="batch_cond|aggregate" value="FALSE"/> | |
| 125 <output name="output_fwd" value="qualityProfile.pdf" ftype="pdf" compare="sim_size" delta="15000"/> | |
| 126 <output name="output_rev" value="qualityProfile.pdf" ftype="pdf" compare="sim_size" delta="15000"/> | |
| 127 </test> | |
| 128 <!-- single, non-batch, aggregate, small sample --> | |
| 129 <test expect_num_outputs="1"> | |
| 130 <param name="batch_cond|batch_select" value="joint"/> | |
| 131 <param name="batch_cond|paired_cond|paired_select" value="single"/> | |
| 132 <param name="batch_cond|paired_cond|reads" value="F3D0_S188_L001_R1_001.fastq.gz,F3D0_S188_L001_R2_001.fastq.gz" ftype="fastqsanger.gz"/> | |
| 133 <param name="n" value="10000"/> | |
| 134 <param name="batch_cond|aggregate" value="TRUE"/> | |
| 135 <output name="output" value="qualityProfile.pdf" ftype="pdf" compare="sim_size" delta="15000"/> | |
| 136 </test> | |
| 137 | |
| 138 <!-- paired, batch --> | |
| 139 <test expect_num_outputs="2"> | |
| 140 <param name="batch_cond|batch_select" value="batch"/> | |
| 141 <param name="batch_cond|paired_cond|paired_select" value="paired"/> | |
| 142 <param name="batch_cond|paired_cond|reads"> | |
| 143 <collection type="paired"> | |
| 144 <element name="forward" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/> | |
| 145 <element name="reverse" value="F3D0_S188_L001_R2_001.fastq.gz" ftype="fastqsanger.gz"/> | |
| 146 </collection> | |
| 147 </param> | |
| 148 <output name="output_fwd" value="qualityProfile.pdf" ftype="pdf" compare="sim_size" delta="15000"/> | |
| 149 <output name="output_rev" value="qualityProfile.pdf" ftype="pdf" compare="sim_size" delta="15000"/> | |
| 150 </test> | |
| 151 <!-- paired-separate batch (sim_size because element ids differ)--> | |
| 152 <test expect_num_outputs="2"> | |
| 153 <param name="batch_cond|batch_select" value="batch"/> | |
| 154 <param name="batch_cond|paired_cond|paired_select" value="separate"/> | |
| 155 <param name="batch_cond|paired_cond|reads" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/> | |
| 156 <param name="batch_cond|paired_cond|sdaer" value="F3D0_S188_L001_R2_001.fastq.gz" ftype="fastqsanger.gz"/> | |
| 157 <output name="output_fwd" value="qualityProfile.pdf" ftype="pdf" compare="sim_size" delta="15000"/> | |
| 158 <output name="output_rev" value="qualityProfile.pdf" ftype="pdf" compare="sim_size" delta="15000"/> | |
| 159 </test> | |
| 160 <!-- single, batch --> | |
| 161 <test expect_num_outputs="1"> | |
| 162 <param name="batch_cond|batch_select" value="batch"/> | |
| 163 <param name="batch_cond|paired_cond|paired_select" value="single"/> | |
| 164 <param name="batch_cond|paired_cond|reads" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/> | |
| 165 <param name="n" value="10000"/> | |
| 166 <output name="output" value="qualityProfile.pdf" ftype="pdf" compare="sim_size" delta="15000"/> | |
| 167 </test> | |
| 168 </tests> | |
| 169 <help><![CDATA[ | |
| 170 Summary | |
| 171 ....... | |
| 172 | |
| 173 This function plots a visual summary of the distribution of quality scores as a function of sequence position for the input fastq datasets. | |
| 174 | |
| 175 Details | |
| 176 ....... | |
| 177 | |
| 178 The distribution of quality scores at each position is shown as a grey-scale heat map, with dark colors corresponding to higher frequency. The plotted lines show positional summary statistics: green is the mean, orange is the median, and the dashed orange lines are the 25th and 75th quantiles. If the sequences vary in length, a red line will be plotted showing the percentage of reads that extend | |
| 179 to at least that position. | |
| 180 | |
| 181 @HELP_OVERVIEW@ | |
| 182 ]]></help> | |
| 183 <expand macro="citations"/> | |
| 184 </tool> |
