[Bioperl-l] create Bio::AlignIO object from hash
awitney at sgul.ac.uk
Mon Jan 11 11:27:15 EST 2010
Ah excellent, thanks Roy. I was indeed thinking about it the wrong way.
In the process of writing this i have created a
which is essentially just a modified copy of ProtPars. I have also fixed a few typos and possible bugs in
I am of course happy to send these back in to the project... how would i best do this?
On 11 Jan 2010, at 13:54, Roy Chaudhuri wrote:
> Actually, I guess some sample code would be more helpful:
> use Bio::LocatableSeq;
> use Bio::SimpleAlign;
> use Bio::AlignIO;
> my $seq1=Bio::LocatableSeq->new(-id=>'one', -seq=>'AT-CG', -start=>1, -end=>4);
> my $seq2=Bio::LocatableSeq->new(-id=>'two', -seq=>'A--CG', -start=>1, -end=>3);
> my $seq3=Bio::LocatableSeq->new(-id=>'three', -seq=>'ATTCG', -start=>1, -end=>5);
> my $aln=Bio::SimpleAlign->new(-seqs=>[$seq1,$seq2,$seq3]);
> On 11/01/2010 13:40, Roy Chaudhuri wrote:
>> Hi Adam,
>> I'm guessing you actually want to create a Bio::SimpleAlign object
>> (representing an alignment), rather than a Bio::AlignIO object (which is
>> just for reading/writing alignment files). Bio::SimpleAlign has a
>> documented new method that allows you to construct an alignment from
>> Bio::LocatableSeq objects, which are similar to Bio::Seq objects but
>> include gaps and start/end coordinates to describe their relationship to
>> other sequences in the alignment.
>> On 11/01/2010 12:21, Adam Witney wrote:
>>> I am writing a script to automate the running of Phylip Pars. In the
>>> process i have to create a Bio::AlignIO object from a set of data
>>> that i have in a hash.
>>> I could write the hash data into a phylip file and then load the
>>> Bio::AlignIO from that file, but i wondered if i could skip the
>>> writing and then reading of a temporary file ?
>>> thanks for any help
>>> adam _______________________________________________ Bioperl-l
>>> mailing list Bioperl-l at lists.open-bio.org
More information about the Bioperl-l