Mercurial > repos > artbio > artbio_bam_cleaning
annotate test-data/pipe.sh @ 4:15ada8e1580a draft
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/artbio_bam_cleaning commit 13e2d0837000c2557f9590aa861a9fd5bc16cbcc"
author | artbio |
---|---|
date | Tue, 16 Mar 2021 23:38:46 +0000 |
parents | 65d6d2b554b3 |
children |
rev | line source |
---|---|
0
65d6d2b554b3
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/artbio_bam_cleaning commit adfad19ff505ac7baa3688997bfa9f64243aaace"
artbio
parents:
diff
changeset
|
1 input="match_chr21_DBA_974" && \ |
65d6d2b554b3
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/artbio_bam_cleaning commit adfad19ff505ac7baa3688997bfa9f64243aaace"
artbio
parents:
diff
changeset
|
2 genome="chr21.fa" && \ |
65d6d2b554b3
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/artbio_bam_cleaning commit adfad19ff505ac7baa3688997bfa9f64243aaace"
artbio
parents:
diff
changeset
|
3 samtools index $input".bam" && \ |
65d6d2b554b3
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/artbio_bam_cleaning commit adfad19ff505ac7baa3688997bfa9f64243aaace"
artbio
parents:
diff
changeset
|
4 sambamba view -h -t 8 --filter='mapping_quality >= 1 and not(unmapped) and not(mate_is_unmapped)' -f 'bam' $input".bam" \ |
65d6d2b554b3
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/artbio_bam_cleaning commit adfad19ff505ac7baa3688997bfa9f64243aaace"
artbio
parents:
diff
changeset
|
5 | samtools rmdup - - \ |
65d6d2b554b3
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/artbio_bam_cleaning commit adfad19ff505ac7baa3688997bfa9f64243aaace"
artbio
parents:
diff
changeset
|
6 tee $input".filt1.dedup.bam"| bamleftalign --fasta-reference $genome -c --max-iterations "5" - \ |
65d6d2b554b3
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/artbio_bam_cleaning commit adfad19ff505ac7baa3688997bfa9f64243aaace"
artbio
parents:
diff
changeset
|
7 | samtools calmd -C 50 -b -@ 4 - $genome > $input".filt1.dedup.bamleft.calmd.bam" && \ |
65d6d2b554b3
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/artbio_bam_cleaning commit adfad19ff505ac7baa3688997bfa9f64243aaace"
artbio
parents:
diff
changeset
|
8 sambamba view -h -t 8 --filter='mapping_quality <= 254' -f 'bam' -o $input".filt1.dedup.bamleft.calmd.filt2.bam" $input".filt1.dedup.bamleft.calmd.bam" |
65d6d2b554b3
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/artbio_bam_cleaning commit adfad19ff505ac7baa3688997bfa9f64243aaace"
artbio
parents:
diff
changeset
|
9 |