gt1 / biobambam2

Tools for early stage alignment file processing
Other
93 stars 17 forks source link

Feature request: split by chromosome #52

Open jasper1918 opened 6 years ago

jasper1918 commented 6 years ago

Biobambam2 is an incredibly useful package and it seems like I am constantly discovering new features and applications. It would be helpful if the readme had a short description or if there were a description file somewhere.

Also with all of the functionality, I have not yet seen a function to split a bam into separate chromosomes. I'm looking for something that splits each contig into a new bam file for the purpose of parallelized variant calling. Would also be helpful if several small contigs were aggregated so their is a lower limit of file size. Does biobambam2 already have something for this?

Thanks!

gt1 commented 6 years ago

Hello,

there are manual pages for most of the programs (try e.g. "man src/programs/bamsort.1"), but unfortunately not all of them yet.

For splitting by ref seq/chromosome you could try

bamexplode sizethres=0 prefix=output_prefix < in.bam

Best, German

keiranmraine commented 6 years ago

@jasper1918 do the tools you want to use for parallel calling not support using the index to target the region of interest? It's pretty common practice.