Error reading gff file into R (with read.gff from the ape package)
0
0
Entering edit mode
6.5 years ago

Dear all,

I was trying to read a gff3 genome file into R, but I get the following error:

Error in scan(file, w, sep = "\t", quote = "", quiet = TRUE, na.strings = na.strings,  : 
  scan() expected 'an integer', got 'TCACTAAATACTTTAACCAATATAGGCATAGCGCACAGACAGATAAAAATTACAGAGTAC'

Has anyone seen this and/or knows how to solve it?

Thanks,

Ramiro

R gff genome • 4.6k views
ADD COMMENT
2
Entering edit mode

Few parsers handle GFF files with sequence information. The simplest solution is to just delete the sequence information off of the end.

ADD REPLY
1
Entering edit mode

I encountered the same problem. It is because there are fasta files at the end. Try grep -n ">" gff_file to find the fasta files, and then just take the lines before that into a new file which won't give this error.

ADD REPLY
0
Entering edit mode

May be you can try import.gff function from rtracklayer.

ADD REPLY

Login before adding your answer.

Traffic: 1326 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