IGV browser error
2
1
Entering edit mode
9.9 years ago
Constantine ▴ 290

I'm trying to upload a sorted bam file on the IGV browser and I get the following error message:

Fasta file has uneven line lengths in contig

Any ideas how to fix that?

Thanks

sequencing ChIP-Seq RNA-Seq • 3.9k views
ADD COMMENT
0
Entering edit mode

The developers of IVG don't have the user in mind at all. IVG can't parse FASTA files unless you line break them at 80 characters. So that's equivalent to saying IVG doesn't support the FASTA standard.

ADD REPLY
0
Entering edit mode

I wouldn't say that and this isn't just IGV. You can't easily index random text files with multiple line lengths. That's what IGV and most other tools fail if you use inconsistent line lengths (they don't usually have to be 80 characters wide, but that's been the convention for a few decades).

ADD REPLY
2
Entering edit mode
9.9 years ago

The BAM file isn't the problem. It seems that you're trying to use a custom fasta file where the sequences are on lines of variable length (this commonly occurs if each chromosome/contig is on its own line). The simplest way to fix that is to simply run:

fold -w 80 foo.fa > bar.fa

and then import bar.fa. This will work as long as you don't have any really long chromosome/contig descriptors (just check those with grep ">" foo.fa).

ADD COMMENT
0
Entering edit mode
9.9 years ago
ngsgene ▴ 380

Looked at their code that is throwing this error (search for the error message) seems the index file (fai) is giving issues for the fasta file you are using as a reference

//We loop through, generating a new FastaSequenceIndexEntry
        //every time we see a new header line, or when the file ends.

//The last line can have a different number of bases/bytes

http://igv.googlecode.com/svn-history/r2168/trunk/src/org/broad/igv/feature/genome/FastaSequenceIndex.java

To troubleshoot you can try loading the bam file with a standard reference sequence (hg19/18).

ADD COMMENT

Login before adding your answer.

Traffic: 2577 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6