Different line length in fasta file
1
0
Entering edit mode
5 weeks ago

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 :

Hope you would guide me to rectify this error.

Fasta Ensembl-VEP annotation samtools • 336 views
0
Entering edit mode

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.

0
Entering edit mode

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

0
Entering edit mode

Sorry to say this but this didn't help !

0
Entering edit mode
Sorry to say this but this didn't help !


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

0
Entering edit mode

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'

2
Entering edit mode
5 weeks ago

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

0
Entering edit mode

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

0
Entering edit mode
0
Entering edit mode

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