comparison ivar_removereads.xml @ 4:ee2beb764a7b draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 693df287d23b0fd9dfd134b41d401a438c3f5ad6"
author iuc
date Mon, 22 Jun 2020 07:29:10 -0400
parents bd2a7d1316b9
children 75c279fa403a
comparison
equal deleted inserted replaced
3:3d18f8c3c0f6 4:ee2beb764a7b
1 <tool id="ivar_removereads" name="ivar removereads" version="@VERSION@+galaxy0"> 1 <tool id="ivar_removereads" name="ivar removereads" version="@VERSION@+galaxy1">
2 <description>Remove reads from trimmed BAM file</description> 2 <description>Remove reads from trimmed BAM file</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements" /> 6 <expand macro="requirements">
7 <requirement type="package" version="3.8.1">python</requirement>
8 </expand>
7 <expand macro="version_command" /> 9 <expand macro="version_command" />
8 <command detect_errors="exit_code"><![CDATA[ 10 <command detect_errors="exit_code"><![CDATA[
11 cp '$input_bed' binding_sites.bed &&
12 python '$__tool_directory__/sanitize_bed.py' binding_sites.bed &&
13
14 ivar getmasked
15 -i '$variants_tsv' -b binding_sites.bed -f '$amplicon_info' -p masked_primers &&
16
17 python '$__tool_directory__/completemask.py' masked_primers.txt '$amplicon_info' &&
9 ln -s '$input_bam' sorted.bam && 18 ln -s '$input_bam' sorted.bam &&
10 ln -s '$primer_index' primers.txt && 19 ln -s '${input_bam.metadata.bam_index}' sorted.bam.bai &&
11 ln -s '$input_bed' bed.bed && 20
12 ivar removereads 21 ivar removereads
13 -i sorted.bam 22 -i sorted.bam
23 -b binding_sites.bed
14 -p removed_reads.bam 24 -p removed_reads.bam
15 -t primers.txt 25 -t masked_primers.txt
16 -b bed.bed 26 ]]></command>
17 ]]> </command>
18 <inputs> 27 <inputs>
19 <param name="input_bam" argument="-i" type="data" format="bam" label="Bam file" help="Aligned reads, to trim primers and quality"/> 28 <param name="input_bam" argument="-i" type="data" format="bam"
20 <param name="primer_index" argument="-t" type="data" format="txt" label="Text file with primer indices separated by spaces" help="This is the output of getmasked command"/> 29 label="Bam input"
21 <param name="input_bed" argument="-b" type="data" format="bed" label="BED file with primer sequences and positions"/> 30 help="BAM dataset, preprocessed with ivar trim, to remove reads from" />
31 <param name="variants_tsv" type="data" format="tabular"
32 label="Variants input"
33 help="This dataset will be scanned for variants that affect primer binding sites and needs to be in tabular format with affected chromosome names in the first, and positions in the second column. If there is a header line, the name of the second column should be POS." />
34 <param name="input_bed" argument="-b" type="data" format="bed" label="Primer binding sites information"
35 help="The same six-column BED dataset that served as input to ivar trim"/>
36 <param name="amplicon_info" type="data" format="tabular"
37 label="Primer to amplicon assignment info"
38 help="This input should consist of one line per amplicon with the tab-separated names of all primers used to generate that amplicon."/>
22 </inputs> 39 </inputs>
23 <outputs> 40 <outputs>
24 <data name="output_bam" format="bam" label="${tool.name} on ${on_string}" from_work_dir="removed_reads.bam"/> 41 <data name="output_bam" format="bam" label="${tool.name} on ${on_string}" from_work_dir="removed_reads.bam"/>
25 </outputs> 42 </outputs>
26 <tests> 43 <tests>
27 <test> 44 <test>
28 <param name="input_bam" value="zika/Z52_a.trimmed.sorted.bam"/> 45 <param name="input_bam" value="zika/Z52_a.trimmed.sorted.bam"/>
29 <param name="primer_index" value="zika/primer_mismatchers_indices.txt"/> 46 <param name="variants_tsv" value="zika/primers_Z52_consensus.tsv"/>
30 <param name="input_bed" value="zika/db/zika_primers.bed"/> 47 <param name="input_bed" value="zika/db/zika_primers_consensus.bed"/>
48 <param name="amplicon_info" value="zika/db/pair_information.tsv"/>
31 <output name="output_bam" file="zika/Z52_a.masked.bam" compare="sim_size" delta="100000" /> 49 <output name="output_bam" file="zika/Z52_a.masked.bam" compare="sim_size" delta="100000" />
32 </test> 50 </test>
33 </tests> 51 </tests>
34 <help><![CDATA[ 52 <help><![CDATA[
35 This command accepts an aligned and sorted BAM file trimmed using ivar trim 53 This Galaxy tool combines the functionality of ``ivar getmasked`` and
36 and removes the reads corresponding to the supplied primer indices, which is 54 ``ivar removereads``. No separate ``ivar getmasked`` step is required when
37 the output of ivar getmasked command. Under the hood, ivar trim adds the 55 using this tool.
38 zero based primer index (based on the BED file) to the BAM auxillary data for 56
39 every read. Hence, ivar removereads will only work on BAM files that have 57 The wrapper takes as input a BAM dataset of aligned and sorted reads, from
40 been trimmed using ivar trim. 58 which the primers listed in the primer binding sites BED input have been
59 trimmed with ``ivar trim``.
60
61 From this input it will remove reads that come from amplicons that have been
62 generated with one or more primers that may have been affected in their binding
63 by variants listed in the variants input file.
64
65 .. class:: Warning mark
66
67 Preprocessing of the BAM input with ivar trim is essential for this tool to
68 work because only ``ivar trim`` can add required primer information to the
69 BAM auxillary data of every read.
41 70
42 Documentation can be found at `<https://andersen-lab.github.io/ivar/html/manualpage.html>`_. 71 ivar documentation can be found at `<https://andersen-lab.github.io/ivar/html/manualpage.html>`__.
43 ]]> </help> 72 ]]></help>
44 <expand macro="citations" /> 73 <expand macro="citations" />
45 </tool> 74 </tool>