annotate sambamba_filter.xml @ 0:e3cbb848d8f7 draft

"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
author artbio
date Thu, 21 May 2020 09:51:19 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
1 <tool id="sambamba_sample_or_filter" name="Sample or Filter BAM" version="0.4">
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
2 <description>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
3 on flags, fields, and tags using Sambamba
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
4 </description>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
5 <requirements>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
6 <requirement type="package" version="0.7.1">sambamba</requirement>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
7 </requirements>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
8 <stdio>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
9 <exit_code range="1:" level="fatal" description="Error occured" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
10 </stdio>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
11 <!-- <version_command>sambamba 2>&amp;1 | grep "sambamba v" | sed 's/^sambamba v\(.*\)/\1/'</version_command> -->
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
12 <command detect_errors="exit_code"><![CDATA[
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
13 ln -s $input input.bam &&
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
14 ln -s $input.metadata.bam_index input.bai &&
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
15 #if $sambamba_options.selector == 'filter'
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
16 sambamba view -h -t \${GALAXY_SLOTS:-4}
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
17 #if $sambamba_options.query != '':
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
18 --filter='$sambamba_options.query'
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
19 -f '$format' -o $outfile input.bam $sambamba_options.region
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
20 #end if
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
21 #else
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
22 sambamba view -h -t \${GALAXY_SLOTS:-4} -f '$format'
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
23 --subsampling-seed='$sambamba_options.seed'
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
24 -s '$sambamba_options.fraction' -o '$outfile' input.bam
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
25 #end if
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
26 ]]></command>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
27 <inputs>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
28 <param name="input" type="data" format="bam" label="BAM or SAM file to filter"/>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
29 <param name="format" type="select" label="format of the tool output">
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
30 <option value="bam">BAM</option>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
31 <option value="sam">SAM</option>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
32 </param>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
33 <conditional name="sambamba_options">
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
34 <param name="selector" type="select" label="Filter or Down-sample alignments">
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
35 <option value="sample">Down-sample bam or sam alignments</option>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
36 <option value="filter" selected="true">Filter bam or sam alignements</option>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
37 </param>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
38 <when value="filter">
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
39 <param name="query" type="text" size="80">
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
40 <sanitizer invalid_char="X">
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
41 <valid initial="string.ascii_letters,string.digits, string.punctuation">
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
42 <add value=" " />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
43 </valid>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
44 </sanitizer>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
45 <label>Filter expression</label>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
46 <help>See below for query syntax.</help>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
47 </param>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
48 <param name="region" type="text" size="40" label="Region in format chr:beg-end">
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
49 <help>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
50 Regions can be specified as 'chr2' (the whole chr2), 'chr2:1000000'
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
51 (region starting from 1,000,000bp) or 'chr2:1,000,000-2,000,000'
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
52 (region between 1,000,000 and 2,000,000bp including the end points).
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
53 The coordinates are 1-based.
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
54 </help>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
55 </param>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
56 </when>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
57 <when value="sample">
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
58 <param name="seed" type="integer" value="123" size="10">
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
59 <label>Seed value for randomisation</label>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
60 <help>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
61 Be careful at selecting different seed values if you
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
62 re-subsample a subsample output of this tool
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
63 </help>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
64 </param>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
65 <param name="fraction" type="float" value="0.1" max="1" size="10" label="fraction to retrieve after subsampling">
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
66 <help>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
67 Use a real number between 0 and 1 to indicate the relative size of
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
68 the fraction you wish to retrieve
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
69 </help>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
70 </param>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
71 </when>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
72 </conditional>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
73 </inputs>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
74 <outputs>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
75 <data name="outfile" format="bam">
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
76 <change_format>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
77 <when input="format" value="sam" format="sam" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
78 </change_format>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
79 </data>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
80 </outputs>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
81 <tests>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
82 <test>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
83 <param name="input" value="ex1_header.sam" ftype="sam" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
84 <param name="selector" value="filter" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
85 <param name="query" value="[H0] == 1 and read_name =~ /^EAS51_62/" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
86 <param name="format" value="bam" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
87 <param name="region" value="" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
88 <output name="outfile" file="ex1_header_filtered.bam" ftype="bam" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
89 </test>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
90 <test>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
91 <param name="input" value="c1215_fixmate.bam" ftype="bam" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
92 <param name="selector" value="filter" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
93 <param name="query" value="[MD] =~ /^\d+T\d+A\d+/ and first_of_pair" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
94 <param name="format" value="sam" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
95 <param name="region" value="AL096846:1000-5000" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
96 <output name="outfile" file="c1215_fixmate_filtered.sam" ftype="sam" lines_diff="2"/>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
97 </test>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
98 <test>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
99 <param name="input" value="ex1_header.sam" ftype="sam" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
100 <param name="selector" value="sample" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
101 <param name="seed" value="123" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
102 <param name="fraction" value="0.1" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
103 <param name="format" value="bam" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
104 <output name="outfile" file="ex1_header_sampled.bam" ftype="bam" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
105 </test>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
106 <test>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
107 <param name="input" value="c1215_fixmate.bam" ftype="bam" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
108 <param name="selector" value="sample" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
109 <param name="seed" value="123" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
110 <param name="fraction" value="0.1" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
111 <param name="format" value="sam" />
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
112 <output name="outfile" file="c1215_fixmate_sampled.sam" ftype="sam" lines_diff="2"/>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
113 </test>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
114 </tests>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
115 <help>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
116 Sambamba Filter Overview
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
117 ========================
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
118
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
119 This tool uses the sambamba_ ``view`` command to filter BAM/SAM on flags, fields, tags, and region. Input is SAM or BAM file.
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
120
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
121
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
122 Filter Syntax
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
123 =============
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
124
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
125 A *filter expression* is a number of *basic conditions* linked by ``and``, ``or``, ``not`` logical operators, and enclosed in parentheses where needed.
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
126
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
127 *Basic condition* is a one for a single record field, tag, or flag.
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
128
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
129 You can use ``==,`` ``!=,`` ``&gt;``, ``&lt;``, ``&gt;=``, ``&lt;=`` comparison operators for both integers and strings.
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
130
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
131 Strings are delimited by single quotes, if you need a single quote inside a string, escape it with ``\\``.
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
132
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
133 Examples of filter expressions
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
134 ------------------------------
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
135
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
136 ::
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
137
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
138 mapping_quality >= 30 and ([RG] =~ /^abcd/ or [NM] == 7)
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
139 read_name == 'abc\'def'
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
140
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
141 Basic conditions for flags
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
142 --------------------------
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
143
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
144 The following flag names are recognized:
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
145 * paired
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
146 * proper_pair
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
147 * unmapped
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
148 * mate_is_unmapped
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
149 * reverse_strand
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
150 * mate_is_reverse_strand
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
151 * first_of_pair
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
152 * second_of_pair
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
153 * secondary_alignment
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
154 * failed_quality_control
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
155 * duplicate
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
156
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
157 Example
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
158 ~~~~~~~
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
159
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
160 ::
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
161
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
162 not (unmapped or mate_is_unmapped) and first_of_pair
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
163
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
164 Basic conditions for fields
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
165 ---------------------------
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
166
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
167 Conditions for integer and string fields are supported.
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
168
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
169 List of integer fields:
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
170 * ref_id
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
171 * position
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
172 * mapping_quality
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
173 * sequence_length
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
174 * mate_ref_id
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
175 * mate_position
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
176 * template_length
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
177
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
178
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
179 List of string fields:
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
180 * read_name
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
181 * sequence
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
182 * cigar
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
183
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
184
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
185 Example
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
186 ~~~~~~~
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
187
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
188 ::
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
189
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
190 ref_id == 3 and mapping_quality >= 50 and sequence_length >= 80
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
191
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
192 Basic conditions for tags
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
193 -------------------------
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
194
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
195 Tags are denoted by their names in square brackets, for instance, ``[RG]`` or ``[Q2].`` They support conditions for both integers and strings, i.e. the tag must also hold value of the corresponding type.
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
196
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
197 In order to do filtering based on the presence of a particular tag, you can use special ``null`` value.
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
198
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
199 Example
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
200 ~~~~~~~
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
201
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
202 ::
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
203
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
204 [RG] != null and [AM] == 37
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
205
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
206 Down-sampling
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
207 =============
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
208
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
209 The tool is using the following sambamba command line for sampling:
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
210
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
211 ::
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
212
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
213 sambamba view -h -t &lt;number of Galaxy threads configured in job_conf.xml&gt; -f &lt;bam or sam&gt;
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
214 --subsampling-seed=&lt;an integer&gt;
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
215 -s &lt;a real number between 0 and 1&gt; -o &lt;bam or sam output&gt; input_file
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
216
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
217 Warnings
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
218 --------
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
219
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
220 The tool does not down-sample at a user given **number of lines**, because sambamba does not
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
221 expose this functionality. For tool performances, we decided not to add it in this wrapper.
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
222
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
223 If you down-sample a dataset that has been *already down-sampled* with this tool, it is
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
224 important that you choose **another seed** for randomisation. Otherwise, the new subsampling
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
225 was reported not to conform the indicated fraction.
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
226
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
227
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
228 .. _sambamba: http://github.com/lomereiter/sambamba
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
229
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
230 </help>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
231 <citations>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
232 <citation type="doi">10.1093/bioinformatics/btv098</citation>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
233 </citations>
e3cbb848d8f7 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sambamba commit 1ff1d6786536e134d019c6d6d12ee9885f44b601"
artbio
parents:
diff changeset
234 </tool>