comparison probecoverage.xml @ 0:3c0451ca266e draft

"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/probecoverage commit 62a8b073b9ac98b0231641e5266768e7f8b80b89"
author artbio
date Tue, 07 Jan 2020 11:08:31 +0000
parents
children 9eb4a7000c1e
comparison
equal deleted inserted replaced
-1:000000000000 0:3c0451ca266e
1 <tool id="probecoverage" name="Probe Coverage" version="0.6.0">
2 <description></description>
3 <requirements>
4 <requirement type="package" version="1.10=h9402c20_2">samtools</requirement>
5 <requirement type="package" version="2.29.2=hc088bd4_0">bedtools</requirement>
6 <requirement type="package" version="1.6.4=r36h6115d3f_0">r-optparse</requirement>
7 <requirement type="package" version="3.2.1=r36h6115d3f_0">r-ggplot2</requirement>
8 <requirement type="package" version="1.17.3=py37h95a1406_0">numpy</requirement>
9 <requirement type="package" version="0.15.3=py37hbcae180_3">pysam</requirement>
10 </requirements>
11 <stdio>
12 <exit_code range="1:" level="fatal" description="Tool exception" />
13 </stdio>
14 <command detect_errors="exit_code"><![CDATA[
15 #for $file in $inputs
16 samtools index '$file' &&
17 #end for
18 #if $method == 'pysam':
19 python $__tool_directory__/multicov.py
20 #else:
21 bedtools multicov
22 #end if
23 -bams
24 #for $file in $inputs
25 '$file'
26 #end for
27 -bed '$bed' > $coverage_dataframe &&
28 Rscript '$__tool_directory__'/probecoverage.r
29 --method '$method'
30 --input '$coverage_dataframe'
31 --title 'Probe coverage depth (cumulative distribution)'
32 --xlab
33 #if $method == 'pysam':
34 'Depth (pysam method)'
35 #else:
36 'Depth (bedtools muticov method)'
37 #end if
38 --ylab 'Fraction of covered regions with coverage >= Depth'
39 --output '$distribution'
40 --sample "
41 #for $file in $inputs
42 $file.element_identifier,
43 #end for
44 "
45
46 ]]></command>
47 <inputs>
48 <param name="inputs" type="data" format="bam" label="Select multiple Bam alignments to parse" multiple="True"/>
49 <param name="bed" type="data" format="bed" label="Select a bed file describing the genomic regions to analyze" />
50 <param name="method" type="boolean" falsevalue="bedtools" checked="false" truevalue="pysam"
51 help="coverage is computed using bedtools multicov (default) or pysam module"
52 label="Compute coverage with pysam (bedtools by default)" />
53 </inputs>
54
55 <outputs>
56 <data format="tabular" name="coverage_dataframe" label="coverage table" />
57 <data format="pdf" name="distribution" label="Cumulative distribution of region coverages" />
58 </outputs>
59
60 <tests>
61 <test>
62 <param name="inputs" value="sample1,sample2,sample3" ftype="bam"/>
63 <param name="bed" value="probes.bed" ftype="bed"/>
64 <param name="method" value="bedtools" />
65 <output file="coverage.tab" name="coverage_dataframe" />
66 <output file="graph.pdf" name="distribution" />
67 </test>
68 <test>
69 <param name="inputs" value="sample1,sample2,sample3" ftype="bam"/>
70 <param name="bed" value="probes.bed" ftype="bed"/>
71 <param name="method" value="pysam" />
72 <output file="coverage_pysam.tab" name="coverage_dataframe" />
73 <output file="graph_pysam.pdf" name="distribution" />
74 </test>
75 </tests>
76
77
78 <help>
79
80 **What it does**
81
82 Generates counts of alignments from multiple position-sorted BAM files
83 that overlap intervals in a BED file.
84
85 Shows data as a cumulative plot of numbers of regions with coverage > x.
86
87 **Inputs**
88
89 bam alignment files that must be
90
91 - sorted
92 - mapped to the same reference
93
94 **Output**
95
96 A data frame of computed counts
97
98 A pdf file generated by R
99
100 </help>
101
102 <citations>
103 <citation type="doi">10.1093/bioinformatics/btq033</citation>
104 </citations>
105 </tool>
106