This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Different line length in fasta file

I am currently using VEP for variant annotation.

I am facing an error as below:

 [E::fai_build_core] Different line length in sequence 'Pn9'

I understand there is an issue with the difference in line length of Pn9 in the fasta file. However, the sequences of fasta file all have different line length. I don't get why there is an error specifically on Pn9.

I have tried using both snpEff and Annovar but doesn't work. Any thoughts on this would be really appreciated.

I am attaching the length of sequence here:

sequence length

Hope you would guide me to rectify this error.

Thanks in advance.

fasta vep ensembl-vep annotation samtools

Did you unzip the reference file using bgzip? Try making fasta sequences single lined using seqkit. seqkit -w 0 seq input.fa -o output.fa. Use output.fa for further work.

The file was unzipped. I used bgzip to zip before using it for VEP. Thank you for your suggestion.

Sorry to say this but this didn't help!

What's the error and what is the command line you are using?

I used the same command with my fasta file. But I am still getting the error :

[E::fai_build_core] Different line length in sequence 'Pn9' 

1 answer

I am attaching the length of sequence here

why pasting an image when you can just copy and paste the text ? save the planet.

Your problem is not related to the total length of each seq in the fasta, but as it is said in the error message

Different line length in sequence 'Pn9'

in your Pn9 there are some LINES with a different number of character. Like

>Pn9
ATCGTACGATCGATCGA
ATAGTGAC
A
AATCGCTGCTAGCTAACTG
A

Thank you for your reply.

Seems like I got confused between sequence length and line length. If that's the issue can you help me to rectify that?

I used this with a line length of 30000 since the sequence length is large, but the issue still persists.

Log in to answer this question.