[Bioperl-l] Bio::DB:GFF queries II

Eric Snyder SnyderEE@pbrc.edu
Sat, 11 May 2002 03:06:24 -0500


Hello again,

My specific question (see previous email for general question) regarding the workings of GFF can be summarized by the question, "why doesn't this work?":

	my $db   = Bio::DB::GFF->new( -adaptor => 'dbi::mysql',
					  -dsn     => 'dbi:mysql:gp2',
	);

	foreach my $seq ( @seqs ){
		my $segment = $db->segment( $seq  );
		print "seq = \"$seq\"; segment = \"$segment\"\n";
		my @exons = $segment->features( 'internal');
		for my $exon (@exons) {
  			my $dna = $exon->dna;
			print "$exon:$dna\n";
			my $ss = $exon->segment(-30,30);     # problem with this line!!!
		}
	}

At the risk of sending too much supporting data, check below for what my database looks like.
I cannot grok why I cannot call the segment method on $exon.   It prints the exon sequence but dies with the following:

(amargosa)[2:55am]tdb>>splice_tdb.pl fref
Internal:refseq(NM_001787):TCTGATGACCGGGATTCCAAGCGGGATTCCCTTGAGGAGGGGGAGCTGAGAGATCACTGCATGGAGATCACAATAAGGAACTCCCCGTATAGAAGAGAAGACTCAATGGAAGACAG
------------- EXCEPTION  -------------
MSG: Can't locate object method "segment" via package "Bio::DB::GFF::Feature"
STACK Bio::DB::GFF::Feature::AUTOLOAD /usr/local/lib/perl5/site_perl/5.6.1/Bio/DB/GFF/Feature.pm:768
STACK toplevel /home/eesnyder/src/perl/splice_tdb.pl:37

Ideas?  Suggestions?
Thanks in advance,
eesnyder


mysql> select * from fdata; 
+-----+-----------+--------+-------+---------------+---------+--------+---------+--------+-----+---------------+--------------+
| fid | fref      | fstart | fstop | fbin          | ftypeid | fscore | fstrand | fphase | gid | ftarget_start | ftarget_stop |
+-----+-----------+--------+-------+---------------+---------+--------+---------+--------+-----+---------------+--------------+
|   1 | NM_018216 |      1 | 24892 | 100000.000000 |       1 |      0 |         |        |   1 |             0 |            0 |
|   2 | NM_018216 |   5011 |  5134 |   1000.000005 |       2 |      0 | +       | 0      |   2 |             0 |            0 |
|   3 | NM_018216 |  10125 | 10207 |   1000.000010 |       3 |      0 | +       | 2      |   2 |             0 |            0 |
|   4 | NM_018216 |  10610 | 10824 |   1000.000010 |       3 |      0 | +       | 0      |   2 |             0 |            0 |
[...]
|  19 | NM_018216 |  21995 | 22063 |  10000.000002 |       3 |      0 | +       | 1      |   2 |             0 |            0 |
|  20 | NM_018216 |  22865 | 23078 |  10000.000002 |       4 |      0 | +       | 1      |   2 |             0 |            0 |
|  21 | NM_014638 |      1 | 14247 | 100000.000000 |       1 |      0 |         |        |   3 |             0 |            0 |
|  22 | NM_014638 |   9024 | 10301 | 100000.000000 |       5 |      0 | +       | 0      |   4 |             0 |            0 |
|  23 | NM_002617 |      1 | 17024 | 100000.000000 |       1 |      0 |         |        |   5 |             0 |            0 |
|  24 | NM_002617 |   5033 |  5144 |   1000.000005 |       2 |      0 | +       | 0      |   6 |             0 |            0 |
[...]

mysql> select * from fgroup;
+-----+------------+-----------+
| gid | gclass     | gname     |
+-----+------------+-----------+
|   1 | Sequence   | NM_018216 |
|   2 | Transcript | NM_018216 |
|   3 | Sequence   | NM_014638 |
|   4 | Transcript | NM_014638 |
|   5 | Sequence   | NM_002617 |
|   6 | Transcript | NM_002617 |
[...]

mysql> select * from ftype;
+---------+----------+---------+
| ftypeid | fmethod  | fsource |
+---------+----------+---------+
|       1 | Sequence | refseq  |
|       2 | First    | refseq  |
|       3 | Internal | refseq  |
|       4 | Terminal | refseq  |
|       5 | Single   | refseq  |
+---------+----------+---------+


Eric E. Snyder
Associate Professor
Pennington Biomedical Research Center
6400 Perkins Road
Baton Rouge, LA 70808-4124
USA
Phone:  (225) 763-3185
Fax: (225) 763-2525
Email: eesnyder@pbrc.edu 
ICBM: N 30 24'14.0", W 91 07'20.0"