This is a test version of Biostars. For the public version, visit https://www.biostars.org.
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

r gff genome

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

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_file to find the fasta files, and then just take the lines before that into a new file which won't give this error.

0 answers

No answers yet.

Log in to answer this question.