comparison artbio_bam_cleaning.xml @ 8:b12e50bcddd2 draft

"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/artbio_bam_cleaning commit 710fd3796d363d7c1b2bf87793b0c31de62e8d71"
author artbio
date Thu, 30 Dec 2021 19:53:07 +0000
parents 745f529127b8
children cb94e94e0f4e
comparison
equal deleted inserted replaced
7:745f529127b8 8:b12e50bcddd2
1 <tool id="artbio_bam_cleaning" name="ARTbio bam cleaning" version="1.7+galaxy0"> 1 <tool id="artbio_bam_cleaning" name="ARTbio bam cleaning" version="1.7+galaxy1">
2 <description> 2 <description>
3 on flags and PCR Duplicates and MD recalibration 3 on flags and PCR Duplicates and MD recalibration
4 </description> 4 </description>
5 <macros> 5 <macros>
6 <import>macro.xml</import> 6 <import>macro.xml</import>
20 ln -f -s $input_bam.metadata.bam_index input.bam.bai && 20 ln -f -s $input_bam.metadata.bam_index input.bam.bai &&
21 ln -s $input_bam input.bam && 21 ln -s $input_bam input.bam &&
22 sambamba view -h -t \${GALAXY_SLOTS:-2} --filter="mapping_quality >= 1 and not(unmapped) and not(mate_is_unmapped) and not(duplicate)" -f "bam" ${input_base}".bam" 22 sambamba view -h -t \${GALAXY_SLOTS:-2} --filter="mapping_quality >= 1 and not(unmapped) and not(mate_is_unmapped) and not(duplicate)" -f "bam" ${input_base}".bam"
23 | bamleftalign --fasta-reference reference.fa -c --max-iterations "5" - 23 | bamleftalign --fasta-reference reference.fa -c --max-iterations "5" -
24 | samtools calmd -C 50 -b -@ \${GALAXY_SLOTS:-2} - reference.fa 24 | samtools calmd -C 50 -b -@ \${GALAXY_SLOTS:-2} - reference.fa
25 #if $filter_MQ_255 == 'no': 25 #if $specify_outputs == 'just_calMD':
26 > $calmd 26 > $calmd
27 #else if $filter_MQ_255 == 'yes': 27 #else if $specify_outputs == 'calMDandMQ' or $specify_outputs == 'both':
28 | tee $calmd 28 | tee $calmd
29 | sambamba view -h -t \${GALAXY_SLOTS:-2} --filter='mapping_quality <= 254' -f 'bam' /dev/stdin > $fullfilter 29 | sambamba view -h -t \${GALAXY_SLOTS:-2} --filter='mapping_quality <= 254' -f 'bam' /dev/stdin > $fullfilter
30 #end if 30 #end if
31 ]]></command> 31 ]]></command>
32 <inputs> 32 <inputs>
33 <expand macro="reference_source_conditional" /> 33 <expand macro="reference_source_conditional" />
34 <param name="input_bam" type="data" format="bam" label="BAM or SAM file to process"/> 34 <param name="input_bam" type="data" format="bam" label="BAM or SAM file to process"/>
35 <param name="filter_MQ_255" type="select" label="Discard alignments with mapping quality &gt; 254" 35 <param name="specify_outputs" type="select" label="specify cleaned output(s)"
36 display="radio" 36 display="radio"
37 help="If `No`, generates the calMD output without discarding aberrant MQs 37 help="The tool first generates MD-recalibrated alignements, then discards
38 generated by the step. Useful if you need to keep split reads that 38 aberrant Mapping Quality alignements generated by calMD recalibration.
39 we be eliminated if `Yes`"> 39 One, the other, or both types of outputs can be retained by the tool">
40 <option value="yes" selected="true">Yes</option> 40 <option value="just_calMD">Alignments are only MD-recalibrated (for split or discordant read aware variant callers)</option>
41 <option value="no">No</option> 41 <option value="calMDandMQ" selected="true">Alignments are MD-recalibrated AND mapping quality &gt; 254 are discarded (for snv and small indel callers)</option>
42 <option value="both">Both types of outputs are retained</option>
42 </param> 43 </param>
43 </inputs> 44 </inputs>
44 <outputs> 45 <outputs>
45 <data name="calmd" format="bam" label="CalMD filter (for lumpy-smoove)" /> 46 <data name="calmd" format="bam" label="CalMD filter (for lumpy-smoove)">
47 <filter>specify_outputs == 'just_calMD' or specify_outputs == 'both'</filter>
48 </data>
46 <data name="fullfilter" format="bam" label="Full filtering (for somatic-varscan)"> 49 <data name="fullfilter" format="bam" label="Full filtering (for somatic-varscan)">
47 <filter>filter_MQ_255 == "yes"</filter> 50 <filter>specify_outputs == 'calMDandMQ' or specify_outputs == 'both'</filter>
48 </data> 51 </data>
49 </outputs> 52 </outputs>
50 <tests> 53 <tests>
51 <test> 54 <test>
52 <param name="input_bam" value="chr22_sample.bam" ftype="bam" /> 55 <param name="input_bam" value="chr22_sample.bam" ftype="bam" />
53 <param name="reference_source_selector" value="history" /> 56 <param name="reference_source_selector" value="history" />
57 <param name="specify_outputs" value="calMDandMQ" />
54 <param name="ref_file" value="chr22.fa" /> 58 <param name="ref_file" value="chr22.fa" />
59 <output name="fullfilter" file="full.bam" ftype="bam" />
60 </test>
61 <test>
62 <param name="input_bam" value="chr22_sample.bam" ftype="bam" />
63 <param name="reference_source_selector" value="history" />
64 <param name="ref_file" value="chr22.fa" />
65 <param name="specify_outputs" value="both" />
55 <output name="calmd" file="calmd.bam" ftype="bam" /> 66 <output name="calmd" file="calmd.bam" ftype="bam" />
56 <output name="fullfilter" file="full.bam" ftype="bam" /> 67 <output name="fullfilter" file="full.bam" ftype="bam" />
57 </test> 68 </test>
58 <test> 69 <test>
59 <param name="input_bam" value="chr22_sample.bam" ftype="bam" /> 70 <param name="input_bam" value="chr22_sample.bam" ftype="bam" />
60 <param name="reference_source_selector" value="history" /> 71 <param name="reference_source_selector" value="history" />
61 <param name="filter_MQ_255" value="yes" /> 72 <param name="specify_outputs" value="just_calMD" />
62 <param name="ref_file" value="chr22.fa" /> 73 <param name="ref_file" value="chr22.fa" />
63 <output name="calmd" file="calmd.bam" ftype="bam" /> 74 <output name="calmd" file="calmd.bam" ftype="bam" />
64 </test> 75 </test>
65 </tests> 76 </tests>
66 <help> 77 <help>