running an application chromosome by chromosome
1
0
Entering edit mode
9.0 years ago
Bogdan ★ 1.4k

Dear all,

Please could you advise where could I find some TEMPLATE CODE that will allow running MUTECT (or any other program) on each BAM file associated with each chromosome (or chromosome fragment), instead of running it on a BAM file for all chromosomes ;)?

Thanks,

bogdan

sequence SNP genome alignment • 1.8k views
ADD COMMENT
1
Entering edit mode
9.0 years ago
Sam ▴ 120

If I understand correctly you're essentially trying to split 1 BAM file into several BAM files by chromosome? This can be pretty easily done by using the bamtools -split function as referenced in this topic: How To Split A Bam File By Chromosome

This code will generate individual BAM files for all the chromosomes.

bamtools split -in file.bam -reference

These BAM files can then be fed into your program of choice.

ADD COMMENT

Login before adding your answer.

Traffic: 1913 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6