I am trying to convert a bam file to a fasta file, in order to extract a specific fasta region using a bed file. However, I keep getting errors in my fasta region selection because my chromosome names are not being annotated correctly. For example, my chromosome names are coming out as:
I can't make sense of where this name may be coming from. The bam files work fine otherwise, although they are aggregate data (made of several fastq files pooled together during alignment.)
For reference, I am using
samtools bam2fq input.bam | seqtk seq -A > output.fa
to generate my files.
Does anyone have any suggestions on what I may be doing wrong to get these weird fasta files?