Mercurial > repos > artbio > artbio_bam_cleaning
comparison artbio_bam_cleaning.xml @ 1:b550841f568b draft
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/artbio_bam_cleaning commit 2d441fd84bf17c0899d0b57ea35c84cb83b77119"
author | artbio |
---|---|
date | Thu, 08 Oct 2020 14:55:04 +0000 |
parents | 65d6d2b554b3 |
children | c973ff00c785 |
comparison
equal
deleted
inserted
replaced
0:65d6d2b554b3 | 1:b550841f568b |
---|---|
1 <tool id="artbio_bam_cleaning" name="ARTbio bam cleaning" version="1.6+galaxy0"> | 1 <tool id="artbio_bam_cleaning" name="ARTbio bam cleaning" version="1.6+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> |
17 @pipefail@ | 17 @pipefail@ |
18 @set_fasta_index@ | 18 @set_fasta_index@ |
19 #set input_base = 'input' | 19 #set input_base = 'input' |
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 8 --filter='mapping_quality >= 1 and not(unmapped) and not(mate_is_unmapped)' -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)' -f 'bam' $input_base".bam" |
23 | samtools rmdup - - | 23 | samtools rmdup - - |
24 |tee $input_base".filt1.dedup.bam"| bamleftalign --fasta-reference reference.fa -c --max-iterations "5" - | 24 |tee $input_base".filt1.dedup.bam"| bamleftalign --fasta-reference reference.fa -c --max-iterations "5" - |
25 | samtools calmd -C 50 -b -@ \${GALAXY_SLOTS:-2} - reference.fa > $input_base".filt1.dedup.bamleft.calmd.bam" && | 25 | samtools calmd -C 50 -b -@ \${GALAXY_SLOTS:-2} - reference.fa > $calmd |
26 sambamba view -h -t 8 --filter='mapping_quality <= 254' -f 'bam' -o $input_base".filt1.dedup.bamleft.calmd.filt2.bam" $input_base".filt1.dedup.bamleft.calmd.bam" | 26 #if $pipeline == 'fullfilter': |
27 && sambamba view -h -t \${GALAXY_SLOTS:-2} --filter='mapping_quality <= 254' -f 'bam' -o $fullfilter $calmd | |
28 #end if | |
27 ]]></command> | 29 ]]></command> |
28 <inputs> | 30 <inputs> |
29 <expand macro="reference_source_conditional" /> | 31 <expand macro="reference_source_conditional" /> |
30 <param name="input_bam" type="data" format="bam" label="BAM or SAM file to process"/> | 32 <param name="input_bam" type="data" format="bam" label="BAM or SAM file to process"/> |
33 <param name="pipeline" type="select" label="where to stop the pipeline"> | |
34 <option value="CalMD">At CalMD processing, to keep split read alignments</option> | |
35 <option value="fullfilter" selected="true">Full bam processing, will eliminate split read alignments in the final bam file</option> | |
36 </param> | |
31 </inputs> | 37 </inputs> |
32 <outputs> | 38 <outputs> |
33 <data name="calmd" format="bam" label="CalMD filter (for lumpy-smoove)" from_work_dir="./input.filt1.dedup.bamleft.calmd.bam"/> | 39 <data name="calmd" format="bam" label="CalMD filter (for lumpy-smoove)"> |
34 <data name="fullfilter" format="bam" label="Full filtering (for somatic-varscan)" from_work_dir="./input.filt1.dedup.bamleft.calmd.filt2.bam"/> | 40 <filter>pipeline == 'CalMD'</filter> |
41 </data> | |
42 <data name="fullfilter" format="bam" label="Full filtering (for somatic-varscan)"> | |
43 <filter>pipeline == 'fullfilter'</filter> | |
44 </data> | |
45 | |
35 </outputs> | 46 </outputs> |
36 <tests> | 47 <tests> |
37 <test> | 48 <test> |
38 <param name="input_bam" value="match_chr21_DBA_974.bam" ftype="bam" /> | 49 <param name="input_bam" value="match_chr21_DBA_974.bam" ftype="bam" /> |
39 <param name="reference_source_selector" value="history" /> | 50 <param name="reference_source_selector" value="history" /> |
40 <param name="ref_file" value="chr21.fa" /> | 51 <param name="ref_file" value="chr21.fa" /> |
52 <output name="fullfilter" file="match_chr21_DBA_974.filt1.dedup.bamleft.calmd.filt2.bam" ftype="bam" /> | |
53 </test> | |
54 <test> | |
55 <param name="input_bam" value="match_chr21_DBA_974.bam" ftype="bam" /> | |
56 <param name="reference_source_selector" value="history" /> | |
57 <param name="ref_file" value="chr21.fa" /> | |
58 <param name="pipeline" value="CalMD"/> | |
41 <output name="calmd" file="match_chr21_DBA_974.filt1.dedup.bamleft.calmd.bam" ftype="bam" /> | 59 <output name="calmd" file="match_chr21_DBA_974.filt1.dedup.bamleft.calmd.bam" ftype="bam" /> |
42 <output name="fullfilter" file="match_chr21_DBA_974.filt1.dedup.bamleft.calmd.filt2.bam" ftype="bam" /> | |
43 </test> | 60 </test> |
44 </tests> | 61 </tests> |
45 <help> | 62 <help> |
46 ARTbio bam cleaning overview | 63 ARTbio bam cleaning overview |
47 ============================ | 64 ============================ |