Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

RE: Bio::DB::Fasta: msg#00341

lang.perl.bio.general

Subject: RE: Bio::DB::Fasta

Mike,

Is this line part of the actual code of yours:

$db = new Bio::DB::Fasta($filename);

The unnamed argument to the constructor should be a directory with one
or more fasta files, not a filename. Changing that should solve your
problems with this module.

(I was just about to submit a bug report when I noticed this...)

-Heikki



On Mon, 2003-06-30 at 16:07, Brian Osborne wrote:
> Mike,
>
> >Is the large size of the database a problem for returning seq objects?
> >Do I need to go back to LargeSeq?
>
> If you can shorten the sequence in that one database and then successfully
> use get_Seq_by_id on it that would strongly suggest that the length is the
> problem and not, say, some oddity in the header. The case of the sequence
> makes no difference, as you say. I would conclude, as you seem to be doing,
> that LargeSeq is one solution.
>
> Brian O.
>
>
> -----Original Message-----
> From: bioperl-l-bounces@xxxxxxxxxxxxxxxxxxx
> [mailto:bioperl-l-bounces@xxxxxxxxxxxxxxxxxxx]On Behalf Of Michael R Olson
> Sent: Friday, June 27, 2003 4:50 PM
> To: Brian Osborne
> Cc: Bioperl Mailing List
> Subject: RE: [Bioperl-l] Bio::DB::Fasta
>
> I have 2 followup questions, the first of which is small:
> You sent me three links that had documentation on them before.
> Was this on any of them or a different one, because I couldn't find it.
>
> Second:
> I have one database that just consists of one Fasta ID line followed by
> the entire genome. When I say
>
> $db = new Bio::DB::Fasta($filename);
> $bigseq = $db->get_Seq_by_id($id);
>
> it crashes with this error:
>
> Odd number of elements in anonymous hash at
> /usr/local/bio/www/cgi-bin/BPPNew/Bio/DB/Fasta.pm line 969.
>
> It does THAT because of the call in Fasta.pm that goes:
>
> return bless { db => $db,
> id => $id,
> start => $start || 1,
> stop => $stop || $db->length($id)
> },$class;
>
> because $stop is undefined and $db->length($id) returns undefined.
> Since $db comes from the Bio::DB::Fasta constructor, I tend to assume
> that that's where the problem is, but that's where the code gets hard to
> understand and my investigation ended, so now I'm asking you folks.
>
> It works when I use a database that's broken up into chunks.
>
> The only other (obvious) difference between the working version and the
> non-working version is that the working version is uppercase and the
> non-working version is lowercase, and I don't expect this should be an
> issue.
>
> Is the large size of the database a problem for returning seq objects?
> Do I need to go back to LargeSeq?
>
> Thanks,
> Mike
>
> On Fri, 2003-06-27 at 07:38, Brian Osborne wrote:
> > Michael,
> >
> > This comes directly from the module's documentation:
> >
> > use Bio::DB::Fasta;
> >
> > # Bio::SeqIO-style access
> > my $stream = Bio::DB::Fasta->new('test.fa')->get_PrimarySeq_stream;
> >
> > while ( my $seq = $stream->next_seq ) {
> > print $seq->seq;
> > }
> >
> > You also asked about "customizing" the indexing so you can use ids you
> have
> > in hand, which partially match the ids in the file. See the bptutorial
> > section on "Indexing or accessing..." or FAQ question 2.5.
> >
> >
> > Brian O.
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@xxxxxxxxxxxxxxxxxxx
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@xxxxxxxxxxxxxxxxxxx
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
--
______ _/ _/_____________________________________________________
_/ _/ http://www.ebi.ac.uk/mutations/
_/ _/ _/ Heikki Lehvaslaiho heikki_at_ebi ac uk
_/_/_/_/_/ EMBL Outstation, European Bioinformatics Institute
_/ _/ _/ Wellcome Trust Genome Campus, Hinxton
_/ _/ _/ Cambs. CB10 1SD, United Kingdom
_/ Phone: +44 (0)1223 494 644 FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe