Question: IGV browser error
1
gravatar for Constantine
4.5 years ago by
Constantine240
USA
Constantine240 wrote:

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 rna-seq chip-seq • 2.4k views
ADD COMMENTlink modified 4.5 years ago by ngsgene350 • written 4.5 years ago by Constantine240

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 REPLYlink modified 3.2 years ago • written 3.2 years ago by Xapple30

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 REPLYlink modified 3.2 years ago • written 3.2 years ago by Devon Ryan91k
2
gravatar for Devon Ryan
4.5 years ago by
Devon Ryan91k
Freiburg, Germany
Devon Ryan91k wrote:

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 COMMENTlink written 4.5 years ago by Devon Ryan91k
0
gravatar for ngsgene
4.5 years ago by
ngsgene350
United States
ngsgene350 wrote:

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 COMMENTlink written 4.5 years ago by ngsgene350
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: 634 users visited in the last hour