Bio-WebService-LANL-SequenceLocator
view release on metacpan or search on metacpan
lib/Bio/WebService/LANL/SequenceLocator.pm view on Meta::CPAN
unbroken_text => 1,
);
my $expect_alignment = 0;
while (my $tag = $doc->get_tag("b", "pre")) {
my $name = lc $tag->[0];
my $text = $doc->get_text;
next unless defined $text;
# <pre>s are preceeded by a bold header, which we use as an indicator
if ($name eq 'b') {
$expect_alignment = $text =~ /Alignment\s+of\s+the\s+query\s+sequence\s+to\s+HXB2/i;
} elsif ($name eq 'pre') {
if ($text =~ /^\s*Query\b/m and $text =~ /^\s*HXB2\b/m) {
push @alignments, $text;
warn "Not expecting alignment, but found oneâ½"
unless $expect_alignment;
}
elsif ($text =~ /^\s+$/ and $expect_alignment) {
push @alignments, undef; # We appear to have found an unaligned sequence.
( run in 0.788 second using v1.01-cache-2.11-cpan-39bf76dae61 )