I am attempting to generate a bam file with just chromosome 12 from my larger whole genome bam file. I entered the following code and got the following error message:
samtools view -b myfile.bam chr12 > myfile_chr12.bam
[main_samview] fail to get the reference name. Continue anyway.
I then tried adding in the -f command with the fai file of my reference thinking I need to have the fai file and got the same error message.
Have I used this command incorrectly? How can I remedy this problem?
samtools view -b myfile.bam chr12 > myfile_chr12.bam
[main_samview] fail to get the reference name. Continue anyway.
I then tried adding in the -f command with the fai file of my reference thinking I need to have the fai file and got the same error message.
Have I used this command incorrectly? How can I remedy this problem?
Comment