[Bioperl-l] question about Bio::DB::GFF

Chris Fields cjfields at uiuc.edu
Tue Sep 4 00:04:29 EDT 2007


Not sure if the gff3 you show was modified for demonstration here but  
it should always be tab-delimited.  Also, I have had problems myself  
when using files with Windows/Mac Classic line endings on UNIX'y  
systems (Excel and a few other Mac OS X programs insist on adding \r  
instead of \n, which plays havoc with parsers sometimes even with  
readline fixes).

chris

On Sep 3, 2007, at 9:11 PM, xianran li wrote:

>
>   Hi,
>
>   I tried to load the  gff3 file with load_gff.pl and extrac some  
> information with Bio::DB::GFF. Althougth this code work properly  
> under windows xp, the $seg got nothing when i run it under Linux.
>
>   Here is my code and the gff3 file,
>   ####################################################################
>
>     #!/usr/local/bin/perl -w
>
>   use strict;
> use Bio::SeqIO;
> use Bio::DB::GFF;
>
>   my $in_gff = Bio::DB::GFF->new( -adaptor    => 'dbi::mysqlopt',
>                                 -dsn        => 'dbi:mysql:test',
>                                 -aggregator => ['coding'],
>                                 -user       => "lixr",
>                                 -pass       => "123456"
>                                 );
> my $seg = $in_gff->segment'BGIOSIBCE000001.1');
> print $seg->abs_start."\n";
>
>
>   ##################################################################
>   ##gff-version 3
> ##sequence-region       Chr01   1       43037
> Chr01 bgf mRNA 18113 20165 . + . ID=BGIOSIBCE000001.1
> Chr01 bgf CDS 18113 19150 . + 0 Parent=BGIOSIBCE000001.1
> Chr01 bgf CDS 19344 20165 . + 0 Parent=BGIOSIBCE000001.1
> Chr01 bgf mRNA 30220 36442 . + . ID=BGIOSIBCE000002.1
> Chr01 bgf CDS 30220 30387 . + 0 Parent=BGIOSIBCE000002.1
> Chr01 bgf CDS 31128 31226 . + 0 Parent=BGIOSIBCE000002.1
> Chr01 bgf CDS 32228 32331 . + 0 Parent=BGIOSIBCE000002.1
> Chr01 bgf CDS 33907 34715 . + 1 Parent=BGIOSIBCE000002.1
> Chr01 bgf CDS 34799 34921 . + 2 Parent=BGIOSIBCE000002.1
> Chr01 bgf CDS 35003 35091 . + 2 Parent=BGIOSIBCE000002.1
> Chr01 bgf CDS 35179 35379 . + 0 Parent=BGIOSIBCE000002.1
> Chr01 bgf CDS 35981 36442 . + 0 Parent=BGIOSIBCE000002.1
> Chr01 bgf mRNA 38143 39015 . - . ID=BGIOSIBCE000003.1
> Chr01 bgf CDS 38143 38541 . - 0 Parent=BGIOSIBCE000003.1
> Chr01 bgf CDS 38649 38813 . - 0 Parent=BGIOSIBCE000003.1
> Chr01 bgf CDS 38917 39015 . - 0 Parent=BGIOSIBCE000003.1
> Chr01 bgf mRNA 39545 42080 . + . ID=BGIOSIBCE000004.1
> Chr01 bgf CDS 39545 40584 . + 0 Parent=BGIOSIBCE000004.1
> Chr01 bgf CDS 40677 41042 . + 1 Parent=BGIOSIBCE000004.1
> Chr01 bgf CDS 41130 41208 . + 1 Parent=BGIOSIBCE000004.1
> Chr01 bgf CDS 41740 41920 . + 0 Parent=BGIOSIBCE000004.1
> Chr01 bgf CDS 42037 42080 . + 2 Parent=BGIOSIBCE000004.1
>   #################################################################
>
>
>   I would appreaciate if any one can give me some clues/link to  
> accomplish this.
>
>   thanks in advance ,
>
>   Xianran Li
>
>
> ---------------------------------
> 雅虎邮箱,以安全著称,是值得信赖的邮箱专家!
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign






More information about the Bioperl-l mailing list