I get an error while uploading BAM file. I used bowtie to map small-RNA reads against one mRNA fasta file. I sorted and indexed the bam file but I get the error in uploading it on IGV:
Error loading BAM file: htsjdk.samtools.SAMException: Sequence name 'X64322.2:1-409,510-527,628-676,777-1929' doesn't match regex: '[0-9A-Za-z!#$%&+./:;?@^_|~-][0-9A-Za-z!#$%&*+./:;=?@^_|~-]*'
Could someone help me please?
This is my fast file (ref) head: ```
X64322.2:1-409,510-527,628-676,777-1929 Chironomus tentans partial BR1 gene for balbiani ring protein 1 precursor AGTTTTGGGAATTCATTTCCAGACTTCTCCCAAGTAAAATAAAAGAAGTGTGAAGTAAGTGAAAACAAAC ```
and here is my BAM file header:
samtools view file.bam | head
NB501365:508:HJF2HBGXF:2:13202:14744:16156 16 X64322.2:1-409,510-527,628-676,777-1929 16 255 61M * 0 0 TTTCCAGACTTCTCCCAAGTAAAATAAAAGAAGTGTGAAGTAAGTGAAAAAAAACCAAGTG IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII XA:i:1 MD:Z:50C10 NM:i:1 XM:i:2
NB501365:508:HJF2HBGXF:3:13401:10152:8366 16 X64322.2:1-409,510-527,628-676,777-1929 16 255 61M * 0 0 TTTCCAGACTTCTCCCAAGTAAAATAAAAGAAGTGTGAAGTAAGTGAAAAAAAACCAAGTG IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
Thank you @Pierre Yes as you mentioned the error was due to the
commas
. I deleted them and did indexing and alignment again, it worked fine.