[BioRuby] Bio::GFF::GFF3 error

graham etherington (TSL) graham.etherington at sainsbury-laboratory.ac.uk
Wed Nov 6 10:47:20 UTC 2013


Hi,
I¹m getting some strange behaviour when trying to create a Bio::GFF::GFF3
object from a gff file.

Here is my test code that throws the error (test_gff.rb):

require 'bio'
Bio::GFF::GFF3.new(File.read("gene.gff"))


Here is my gff file (gene.gff) (validated at
http://modencode.oicr.on.ca/cgi-bin/validate_gff3_online):

##gff-version 3
##sequence-region ctg123 1 1497228
ctg123	.	gene	900	9900	.	+	.	ID=gene00001;Name=EDEN
ctg123	.	gene	10900	19900	.	-	.	ID=gene00002;Name=EDEN2




Here is the error:
test_gff.rb:2:in `<main>':
/Users/ethering/.rvm/gems/ruby-2.0.0-p247/gems/bio-1.4.3/lib/bio/db/gff.rb:
238: invalid multibyte escape: /[\t\r\n\x00-\x1f\x7f\xfe\xff]/
(SyntaxError)
invalid multibyte escape: /[\s\"\;\t\r\n\x00-\x1f\x7f\xfe\xff]/



There are two things I¹m confused at here.
1. I¹m getting errors for a validated gff file.
2. The errors thrown are coming from the GFF2 code in bio/db/gff.db, as
follows (line numbers provided):

237 # prohibited characters in GFF2 columns
    238         PROHIBITED_GFF2_COLUMNS = /[\t\r\n\x00-\x1f\x7f\xfe\xff]/
    239 
    240         # prohibited characters in GFF2 attribute tags
    241         PROHIBITED_GFF2_TAGS = /[\s\"\;\t\r\n\x00-\x1f\x7f\xfe\xff]


ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.5.0]


Any suggestions?
Many thanks,
Graham



Dr. Graham Etherington
Bioinformatics Support Officer,
The Sainsbury Laboratory,
Norwich Research Park,
Norwich NR4 7UH.
UK
Tel: +44 (0)1603 450601







More information about the BioRuby mailing list