I am extracting some regions(in txt file) from bam file using following command
cat ref.txt | xargs samtools view -b in.bam -o out.bam
But it doesn't return whole list of reference instead miss few from the end.
My question is:
- is there any limit on extracting references from bam file?
- is there any other way to do the same job
Replies on few posts suggested to use region in bed format, I couldn't figure out how to convert .txt file into .bed file.
Any lead would be appreciated 🙂