[Bioperl-l] Bio::PrimarySeq obj?

Bob Freeman bob_freeman at hms.harvard.edu
Thu Jun 20 23:27:34 UTC 2013


Hoping for an easy answer on this…

Using Bio::DB::Fasta to retrive a seqobj with get_Seq_by_id. I can print the raw sequence with seqobj->seq(), but when I try to change and set the raw sequence data (e.g. seqobj->seq("ACTT"), the change is ignored (as evidenced when writing out to new FASTA file).

Looking under the hood with the Perl debugger, it appears that the object returned is a Bio::PrimarySeq::FASTA, which points to the whole (indexed) FASTA file; not what I had expected.

Is the PrimarySeq obj that is returned immutable? If so, is there an easy way to 'copy' the object so that I can change the sequence and then write this out to a different file?

Tx,
B

-----------------------------------------------------
Bob Freeman, Ph.D.
Acorn Worm Informatics, Kirschner lab
Dept of Systems Biology, Alpert 524
Harvard Medical School
200 Longwood Avenue
Boston, MA  02115
617/432.2294, vox

"Sorry I'm late. Oh, God, that sounded insincere. I'm late."
	-- Karen Walker, from Will and Grace







More information about the Bioperl-l mailing list