I cannot open BAM file

891 views
Skip to first unread message

Kornkanok Prasertsom

unread,
Nov 4, 2016, 2:30:57 PM11/4/16
to igv-help

Dear all,

     I cannot open BAM file on IGV. I don't understand what happen, and I don't know how to fix this problem.

     1. The version of IGV: IGV_2.2.2, IGV_2.3.86, IGV_2.3.87 

     (At first, I thought my problem was about the version of IGV and JAVA. So, I tried to used IGV and JAVA more than one version, but the same error code still occur!!!)---I used JAVA version 1.7, and I update JAVA into version 1.8 now.

     2. I opened a BAM file.

     3. I expected IGV to show my raw data,both BAM and BAI files.

     4. I receive an error message saying 

        "Unexpected error: java.lang.RuntimeException: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.."
     *I used Window 8, 64 bit*

Thank you so much.
igv.log

James Robinson

unread,
Nov 4, 2016, 6:02:45 PM11/4/16
to igv-help
Hi,

It looks like you are trying to load a session file (not a BAM file directly),  is that correct?   The error is the session file is not a UTF-8 text file, but something else.   How was this session file created?    

Could you try loading the bam file directly from the file menu (don't try to load the session file).   Just use "File > Load from file..."  then select the BAM file.

Jim



--

---
You received this message because you are subscribed to the Google Groups "igv-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/9f22087c-f6d3-4a71-b2cc-c8b5c542443e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kornkanok Prasertsom

unread,
Nov 4, 2016, 9:47:37 PM11/4/16
to igv-help
Hi Jim,
Thank you for your help. I tried to do as you told me, and the error messages that I receive are:
   1. File: C:\Users\kapmcom\Desktop\BAM-BAI\Barcode 1-18\1-381\IonXpress_001_rawlib.bam
       does not contain any sequence names which match the current genome.
      File: Pol_gene,
      Genome: gi|9629357|ref|NC_001802.1|,
   2. Loading SAM/BAM index files are not supported: C:\Users\kampcom\Desktop|BAM-BAI\Barcode 1-18\1-381\IonXpress_001_rawlib.bam.bai
       Load the SAM or BAM file directly. 
*The first message occur when I tried to open BAM file only, and when I tried to open both BAM and BAI files together.
*The second message occur when I tried to open BAM and BAI files together.
                               Thank you again
                                   Kornkanok

เมื่อ วันเสาร์ที่ 5 พฤศจิกายน ค.ศ. 2016 5 นาฬิกา 02 นาที 45 วินาที UTC+7, Jim Robinson เขียนว่า:
Hi,

It looks like you are trying to load a session file (not a BAM file directly),  is that correct?   The error is the session file is not a UTF-8 text file, but something else.   How was this session file created?    

Could you try loading the bam file directly from the file menu (don't try to load the session file).   Just use "File > Load from file..."  then select the BAM file.

Jim


On Fri, Nov 4, 2016 at 11:30 AM, Kornkanok Prasertsom <beauty.lo...@gmail.com> wrote:

Dear all,

     I cannot open BAM file on IGV. I don't understand what happen, and I don't know how to fix this problem.

     1. The version of IGV: IGV_2.2.2, IGV_2.3.86, IGV_2.3.87 

     (At first, I thought my problem was about the version of IGV and JAVA. So, I tried to used IGV and JAVA more than one version, but the same error code still occur!!!)---I used JAVA version 1.7, and I update JAVA into version 1.8 now.

     2. I opened a BAM file.

     3. I expected IGV to show my raw data,both BAM and BAI files.

     4. I receive an error message saying 

        "Unexpected error: java.lang.RuntimeException: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.."
     *I used Window 8, 64 bit*

Thank you so much.

--

---
You received this message because you are subscribed to the Google Groups "igv-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+u...@googlegroups.com.
igv.log

James Robinson

unread,
Nov 4, 2016, 9:58:17 PM11/4/16
to igv-help
OK, thanks.  These are not really errors, just informational messages.

The first message indicates that none of the sequence names in your bam file match the sequence names in the genome reference you have loaded in IGV.   You can see from the example output they are not even close to a match.   Why are you loading this combination of alignments & reference?

The second message is just indicating that you should not load the .bai file,  you load the bam and the index is loaded automatically.

Jim

Kornkanok Prasertsom

unread,
Nov 6, 2016, 1:22:54 PM11/6/16
to igv-help
Thank you for your help, Jim. I can open BAM file now. It was my first time to use this program and I got a little bit confused. Thank you very much.

James Robinson

unread,
Nov 6, 2016, 7:59:22 PM11/6/16
to igv-help
OK, great,  the sequence mismatch  (i.e. bam / fasta mismatch) is a common error.

On Sun, Nov 6, 2016 at 10:22 AM, Kornkanok Prasertsom <beauty.lo...@gmail.com> wrote:
Thank you for your help, Jim. I can open BAM file now. It was my first time to use this program and I got a little bit confused. Thank you very much.

--

---
You received this message because you are subscribed to the Google Groups "igv-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/6ee8c90d-21c0-4928-b0cb-8c57f863e7d8%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages