[Bioperl-l] extracting CDS location from Genbank
michael watson (IAH-C)
michael.watson at bbsrc.ac.uk
Tue Dec 4 15:53:22 UTC 2007
Same script as below, but try:
my $file = 'C:\path\to\my\filename.gbk';
-----Original Message-----
From: bioperl-l-bounces at lists.open-bio.org
[mailto:bioperl-l-bounces at lists.open-bio.org] On Behalf Of Captainrave
Sent: 04 December 2007 15:42
To: Bioperl-l at lists.open-bio.org
Subject: Re: [Bioperl-l] extracting CDS location from Genbank
#!/bin/perl
use strict;
use Bio::SeqIO;
my $file = shift; # get the file name, somehow
my $seqio_object = Bio::SeqIO->new(-file => $file);
my $seq_object = $seqio_object->next_seq;
for my $feat_object ($seq_object->get_SeqFeatures) {
print "primary tag: ", $feat_object->primary_tag, "\n";
for my $tag ($feat_object->get_all_tags) {
print " tag: ", $tag, "\n";
for my $value ($feat_object->get_tag_values($tag)) {
print " value: ", $value, "\n";
}
}
}
exit;
The file is on the same folder. But how do I tell it to use this file?
michael watson (IAH-C) wrote:
>
> Post the script that produces that error, and your file's location
>
> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org
> [mailto:bioperl-l-bounces at lists.open-bio.org] On Behalf Of Captainrave
> Sent: 04 December 2007 15:07
> To: Bioperl-l at lists.open-bio.org
> Subject: Re: [Bioperl-l] extracting CDS location from Genbank
>
>
> Yes but actually implementing it is another story.
>
> I get an error:
>
> ------------- EXCEPTION: Bio::Root::Exception -------------
> MSG: file argument provided, but with an undefined value
> STACK: Error::throw
> STACK: Bio::Root::Root::throw C:/Perl/site/lib/Bio/Root/Root.pm:359
> STACK: Bio::SeqIO::new C:/Perl/site/lib/Bio/SeqIO.pm:359
> STACK: test3.pl:7
> -----------------------------------------------------------
>
> Basically because I dont understand the code well enough. For
example,
> how
> do I tell it which input file to read? I know this might sound stupid,
> but I
> dont understand the Biowiki very well!
>
> --
> View this message in context:
>
http://www.nabble.com/extracting-CDS-location-from-Genbank-tf4942483.htm
> l#a14152264
> Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
>
--
View this message in context:
http://www.nabble.com/extracting-CDS-location-from-Genbank-tf4942483.htm
l#a14152907
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.
_______________________________________________
Bioperl-l mailing list
Bioperl-l at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/bioperl-l
More information about the Bioperl-l
mailing list