[Bioperl-l] Bio::Tools::IUPAC inconsistency
mql201
M.Q.Lewis at exeter.ac.uk
Wed Aug 18 11:03:23 EDT 2004
Hello
I'm using the mod above. I'm getting inconsistent output. This fn, which
takes an ambiguous DNA
sequence and returns an array of all the possible variants expanded from IUPAC
meta symbols:
sub expandMeta {
my($uniqueseq); # unique sequence object
my(@rAr) = (); # return array
my($seqstr) = ""; # sequence attr of a sequence object
my($ure) = $_[0]; # upstream regulatory element (sequence to
check)
my($ambiseq) = new Bio::Seq (-seq => $ure, -type => 'Dna');
my($stream) = new Bio::Tools::IUPAC(-seq => $ambiseq);
while($uniqueseq = $stream->next_seq()) {
$seqstr = $uniqueseq->seq();
print("$ure -> |$seqstr|<br>");
## process the unique Seq object.
#
@rAr = (@rAr, $seqstr);
}
return(@rAr);
}
when i feed it these two sequences, for example,
ANTTW
GGWAGGT
the print statement in the while loop outputs this:
ANTTW -> |ANTTW|
GGWAGGT -> |GGAAGGT|
GGWAGGT -> |GGTAGGT|
the fact that both strings go through the loop means they're being picked up,
but i'd expect this
kind of output:
ANTTW -> |AATTA|
ANTTW -> |ATTTA|
ANTTW -> |ACTTA|
ANTTW -> |AGTTA|
ANTTW -> |AATTT|
ANTTW -> |ATTTT|
ANTTW -> |ACTTT|
ANTTW -> |AGTTT|
GGWAGGT -> |GGAAGGT|
GGWAGGT -> |GGTAGGT|
I suspect this is an easy one, but i can't see where its going wrong.
many thanks IA
mark
More information about the Bioperl-l
mailing list