[Bioperl-l] Strange problem with Bio::Seq::LargePrimarySeq]

Jason Stajich jason.stajich at duke.edu
Mon Mar 14 21:48:40 EST 2005

Jason Stajich
jason.stajich at duke.edu

On Mar 14, 2005, at 9:39 PM, iluminati at earthlink.net wrote:

> Thanks for asking the questions!  In hindsight, I realized that I 
> glossed over the problem in my frustration.
> Anyway, here's the drill.  I created a seq object from a 
> chromosome-sized fasta file like so...
> my $seqio = new Bio::SeqIO('-format'=>'largefasta',
>                            '-file'  =>Bio::Root::IO->catfile("/Thesis 
> Stuff/Chr$Chromosome/chr$Chromosome.fa"));
>      #Create the seq object
>    my $seq = $seqio->next_seq();
> From there, I want to manipulate the sequence and use the functions 
> generally available to a seq object.  Now, in order to the build the 
> seq object, I have to use the Bio::Seq::largefasta module.  The reason 
> I need the Bio::Seq::LargePrimarySeq module is so that I can 
> manipulate the sequence and get to the necessary functions.  However, 
> I get this error running the script despite including the 
> Bio::Seq:::LargePrimarySeq module:
> Can't locate object method "add_SeqFeature" via package 
> "Bio::Seq::LargePrimaryS
> eq" (perhaps you forgot to load "Bio::Seq::LargePrimarySeq"?) at 
> ThesisFrontEndS
> cript.pl line 94, <GeneExpressionData> line 33294.
> I can send you the code in question if you want to get a better 
> look-see.
> Now, the reason I need the whole sequence is two-fold.  For one, I 
> need to be able to calculate CG% of genes as an experimental control 
> of my project.  The other part is that I need to be able to scan the 
> genome for polyA sites with respect to their orientation to L1 sites, 
> and there's no simple way to do that other than flat-out scanning the 
> code.  I'll definitely look into tweaking the /$tmp directory if that 
> helps, but other than that, I have to at least try and make it work.
You are still going to need to chunk it into pieces to do the scanning 
anyways - if you call $seq->seq() you will pull the entire chromosome 
into memory.

You should consider doing things with Bio::DB::Fasta which implements 
an efficient indexed version of getting the sequences.  If you want to 
add annotation consider Bio::DB::GFF system for doing all of this it is 
really more efficient.


> Stefan Kirov wrote:
>> First you have to answer few questions: how do you get the object?/
>> use Bio::Seq::LargePrimarySeq does not create an object it merely 
>> makes the code available.
>> /If you post you code here it will be much easier to answer your 
>> questions. How do you access the sequence (I hope you have read the 
>> documentation, which states that it is not generally a good idea to 
>> call $seq->seq).
>> How big is you /tmp? What are trying to accomplish and why you need 
>> the whole seq in memory?
>> Stefan
>> I've had the same issue... I ended up breaking down the sequences into
>> manageable fragments but would really like to get the largePrimarySeq
>> working.  When I tried loading a chrom size sequence I just sat back
>> and watched my RAM get used up (2 gigs), then the swap, then the
>> crash....  So if anyone can help it'd benefit both of us!
>> Thanks for any help,
>> Garrett
>> On Mon, 14 Mar 2005 16:22:40 -0500, iluminati at earthlink.net 
>> <http://portal.open-bio.org/mailman/listinfo/bioperl-l>
>> <iluminati at earthlink.net 
>> <http://portal.open-bio.org/mailman/listinfo/bioperl-l>> wrote:
>>> / I'm having this unuusal problem with loading this particular 
>>> module.  I
>> />/ need b/c I'm working with chromosome-sized sequence files as a 
>> part of
>> />/ my project, but yet it seems to not want to load properly even 
>> when it's
>> />/ loaded using the following statement:
>> />/ />/ use Bio::Seq::LargePrimarySeq;
>> />/ />/ I checked my modules, and the necessary module is there.  It 
>> seems to
>> />/ just not want to load.  Can anyone be of service?
>> />/ />/ _______________________________________________
>> />/ Bioperl-l mailing list
>> />/ Bioperl-l at portal.open-bio.org 
>> <http://portal.open-bio.org/mailman/listinfo/bioperl-l>
>> />/ http://portal.open-bio.org/mailman/listinfo/bioperl-l
>> />
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at portal.open-bio.org
>> http://portal.open-bio.org/mailman/listinfo/bioperl-l
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://portal.open-bio.org/pipermail/bioperl-l/attachments/20050314/3406d818/PGP.bin

More information about the Bioperl-l mailing list