in reply to BioInformatics - polyA tail search
This seems to work for me.#!/usr/bin/perl -w use strict; use Bio::SeqIO; my @files = <*.seq>; my $pattern = '[AN]{10}'; foreach my $file (@files) { my $seqio = Bio::SeqIO->new( -file => $file ); while ( my $seqobj = $seqio->next_seq() ) { my $raw_seq = $seqobj->seq(); if ( $raw_seq =~ /$pattern/o ) { print "Found a polyA tail in $file.\n"; } } }
Found a polyA tail in myfile Found a polyA tail in myfile
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: BioInformatics - polyA tail search
by Anonymous Monk on Sep 03, 2003 at 12:14 UTC |