Question: Error loading BAM on IGV
0
gravatar for Apex92
3 months ago by
Apex9220
Apex9220 wrote:

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
igv bam software error • 220 views
ADD COMMENTlink modified 3 months ago by Pierre Lindenbaum133k • written 3 months ago by Apex9220
1
gravatar for Pierre Lindenbaum
3 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum133k wrote:

A reference chromosome cannot be named "X64322.2:1-409,510-527,628-676,777-1929" . see the SAM Spec: https://samtools.github.io/hts-specs/SAMv1.pdf

Reference sequence names may contain any printable ASCII characters in the range[!-~]apart frombackslashes, commas, quotation marks, and brackets—i.e., apart from ‘\ , "‘’ () [] {} <>’—and may notstart with ‘*’ or ‘=’

why ? because you could not query a specific a region 100-200 of such file:

eg. samtools view your.bam X64322.2:1-409,510-527,628-676,777-1929:100-200

you should rename your reference.

ADD COMMENTlink written 3 months ago by Pierre Lindenbaum133k

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.

ADD REPLYlink written 3 months ago by Apex9220
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2411 users visited in the last hour
_