I have huge BAM files (mapped using BBTools+coordinate-sorted via SAMTOOLS), which I used for variant calling. Now I would like to manually check specific positions/ variants in the mapped data using Tablet and/or IGV. Unfortunately, the BAM files are extremely large, rendering it impossible to download them from the HPC I am using and check them on my laptop.
My reference is a huge multi-fasta file containing thousands of transcripts.
To make the files more handy, I was aiming to extract only those portions of the BAM file, that correspond to my transcripts (~chromosomes) of interest.
samtools view -bh input.sorted.bam chr1 chr2 > output.bam
as suggested in a previous post (Subset Bam File According To List Of Contigs) but no reads were showing up in IGV or Tablet, when using either the complete fasta reference or a subset as genome input.
Also found this post: How To Split A Bam File By Chromosome. I donwloaded and installed bamtools, because the
option was suggested. Running bamtools split --help, I did not find any option to limit the output of the function to a specific subset of the reference contigs; splitting into all reference contigs will be an extreme amount of .bam subfiles.
After trying to find an option on my own, I would now be very thankful for any handy suggestions!
Thanks in advance,