comparison ivar_removereads.xml @ 8:28a6f1908fcc draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 6dae6f97a45a61b1f10be4227d978584624c3b3d"
author iuc
date Thu, 05 Aug 2021 12:44:59 +0000
parents 75c279fa403a
children 8d36959b000d
comparison
equal deleted inserted replaced
7:43aac8d29685 8:28a6f1908fcc
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">
8 </expand> 8 </expand>
9 <expand macro="version_command" /> 9 <expand macro="version_command" />
10 <command detect_errors="exit_code"><![CDATA[ 10 <command detect_errors="exit_code"><![CDATA[
11 cp '$input_bed' binding_sites.bed && 11 cp '$input_bed' binding_sites.bed &&
12 python '$__tool_directory__/sanitize_bed.py' binding_sites.bed && 12 python '$__tool_directory__/sanitize_bed.py' binding_sites.bed &&
13 #if $amplicons.computed == "yes"
14 python '$__tool_directory__/write_amplicon_info_file.py' binding_sites.bed amplicon_info.tsv &&
15 #else
16 ln -s '$amplicon_info' amplicon_info.tsv &&
17 #end if
18 ivar getmasked
19 -i '$variants_tsv' -b binding_sites.bed -f amplicon_info.tsv -p masked_primers &&
13 20
14 ivar getmasked 21 python '$__tool_directory__/completemask.py' masked_primers.txt amplicon_info.tsv &&
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' &&
18 ln -s '$input_bam' sorted.bam && 22 ln -s '$input_bam' sorted.bam &&
19 ln -s '${input_bam.metadata.bam_index}' sorted.bam.bai && 23 ln -s '${input_bam.metadata.bam_index}' sorted.bam.bai &&
20 24
21 ivar removereads 25 ivar removereads
22 -i sorted.bam 26 -i sorted.bam
31 <param name="variants_tsv" type="data" format="tabular" 35 <param name="variants_tsv" type="data" format="tabular"
32 label="Variants input" 36 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." /> 37 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" 38 <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"/> 39 help="The same six-column BED dataset that served as input to ivar trim"/>
36 <param name="amplicon_info" type="data" format="tabular" 40 <conditional name="amplicons">
37 label="Primer to amplicon assignment info" 41 <param name="computed" type="select" label="Compute amplicon info from BED file" help="Compute the amplicon info file from the primer BED file">
38 help="This input should consist of one line per amplicon with the tab-separated names of all primers used to generate that amplicon."/> 42 <option value="yes" selected="true">Yes</option>
43 <option value="no">No</option>
44 </param>
45 <when value="yes" />
46 <when value="no">
47 <param name="amplicon_info" type="data" format="tabular"
48 label="Primer to amplicon assignment info"
49 help="This input should consist of one line per amplicon with the tab-separated names of all primers used to generate that amplicon."/>
50 </when>
51 </conditional>
39 </inputs> 52 </inputs>
40 <outputs> 53 <outputs>
41 <data name="output_bam" format="bam" label="${tool.name} on ${on_string}" from_work_dir="removed_reads.bam"/> 54 <data name="output_bam" format="bam" label="${tool.name} on ${on_string}" from_work_dir="removed_reads.bam"/>
42 </outputs> 55 </outputs>
43 <tests> 56 <tests>
44 <test> 57 <test>
45 <param name="input_bam" value="zika/Z52_a.trimmed.sorted.bam"/> 58 <param name="input_bam" value="zika/Z52_a.trimmed.sorted.bam"/>
46 <param name="variants_tsv" value="zika/primers_Z52_consensus.tsv"/> 59 <param name="variants_tsv" value="zika/primers_Z52_consensus.tsv"/>
47 <param name="input_bed" value="zika/db/zika_primers_consensus.bed"/> 60 <param name="input_bed" value="zika/db/zika_primers_consensus.bed"/>
48 <param name="amplicon_info" value="zika/db/pair_information.tsv"/> 61 <conditional name="amplicons">
62 <param name="computed" value="no" />
63 <param name="amplicon_info" value="zika/db/pair_information.tsv"/>
64 </conditional>
65 <output name="output_bam" file="zika/Z52_a.masked.bam" compare="sim_size" delta="100000" />
66 </test>
67 <test>
68 <param name="input_bam" value="zika/Z52_a.trimmed.sorted.bam"/>
69 <param name="variants_tsv" value="zika/primers_Z52_consensus.tsv"/>
70 <param name="input_bed" value="zika/db/zika_primers_consensus.bed"/>
71 <conditional name="amplicons">
72 <param name="computed" value="yes" />
73 </conditional>
49 <output name="output_bam" file="zika/Z52_a.masked.bam" compare="sim_size" delta="100000" /> 74 <output name="output_bam" file="zika/Z52_a.masked.bam" compare="sim_size" delta="100000" />
50 </test> 75 </test>
51 </tests> 76 </tests>
52 <help><![CDATA[ 77 <help><![CDATA[
53 This Galaxy tool combines the functionality of ``ivar getmasked`` and 78 This Galaxy tool combines the functionality of ``ivar getmasked`` and