[Bioperl-l] question about locatableseq object

Kevin Brown Kevin.M.Brown at asu.edu
Thu Jan 22 15:35:56 UTC 2009


Please keep replies on the Mailing list.
 
The start and end properties are useful for determining what sequences
are part of a sub-alignment when one uses the slice method of the
simplealign
 
http://doc.bioperl.org/releases/bioperl-current/bioperl-live/Bio/SimpleA
lign.html#POD16


________________________________

	From: Paolo Pavan [mailto:paolo.pavan at gmail.com] 
	Sent: Thursday, January 22, 2009 6:21 AM
	To: Kevin Brown
	Subject: Re: [Bioperl-l] question about locatableseq object
	
	
	thank you Kevin, I have understood that I have to fill my
sequence with multiple gaps before, in order to get the right alignment.
So what are the -start and -end parameter designed for, actually? For
name/description consistency? 
	thank you again.


	2009/1/21 Kevin Brown <Kevin.M.Brown at asu.edu>
	

		The Sequence you give the bio::locatableseq needs to be
the full
		sequence from which it comes from and include gap
characters.
		

		$seq = new Bio::LocatableSeq(
		-seq         => '----ACGTCT-',
		-display_id  => 'SEQ2',
		-start       => 5,
		-end         => 11,
		);
		
		
		Or
		
		$seq = new Bio::LocatableSeq(
		-seq         => 'ATCCACGTCTGAG-GA--TTC',
		
		-display_id  => 'SEQ2',
		-start       => 5,
		-end         => 11,
		);
		
		
		> -----Original Message-----
		> From: bioperl-l-bounces at lists.open-bio.org
		> [mailto:bioperl-l-bounces at lists.open-bio.org] On
Behalf Of Paolo Pavan
		> Sent: Wednesday, January 21, 2009 10:18 AM
		> To: bioperl-l at lists.open-bio.org
		> Subject: [Bioperl-l] question about locatableseq
object
		>
		> Hi all,
		> I have a question about the use of Bio::LocatableSeq.
I
		> haven't understood
		> the use of the -start and -end parameters, I found
that they
		> indicate the
		> position from where in a larger sequence the
locatableSeq may
		> have been
		> extracted. So I immagine that is possible to set a
reference
		> sequence and
		> set the position of another sequence referring to the
first.
		> But it seems I
		> haven't understood how, where is my fault and how I
can solve
		> the problem?
		> Below the code.
		> Thank you in advance,
		> Paolo
		>
		>  use Bio::SimpleAlign;
		> use Bio::LocatableSeq;
		> use Bio::AlignIO;
		>
		> my $aln = Bio::SimpleAlign->new();
		>
		> $seq = new Bio::LocatableSeq(
		> -seq         => 'ACGTACGTACGT',
		> -display_id  => 'SEQ1',
		> -start       => 1,
		> -end         => 12,
		> );
		> $aln->add_seq($seq);
		>
		>
		>
		> $seq = new Bio::LocatableSeq(
		> -seq         => 'ACGTCT',
		> -display_id  => 'SEQ2',
		> -start       => 5,
		> -end         => 11,
		> );
		> $aln->add_seq($seq);
		>
		> Bio::AlignIO->new(-format =>'CLUSTALW')->write_aln
($aln);
		>
		>
		>
		> the result is:
		> SEQ1/1-12              ACGTACGTACGT
		> SEQ2/6-12              ACGTCT
		>                        ****  ******
		> while I expect:
		> SEQ1/1-12              ACGTACGTACGT
		> SEQ2/6-12              ----ACGTCT
		
		> _______________________________________________
		> 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
		






More information about the Bioperl-l mailing list