Error reading gff file into R (with read.gff from the ape package)
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
• 5,731 views
•
link
0 answers
No answers yet.
Log in to answer this question.
May be you can try
import.gfffunction fromrtracklayer.Few parsers handle GFF files with sequence information. The simplest solution is to just delete the sequence information off of the end.
I encountered the same problem. It is because there are fasta files at the end. Try
grep -n ">" gff_fileto find the fasta files, and then just take the lines before that into a new file which won't give this error.