MiamiGenome has asked for the wisdom of the Perl Monks concerning the following question:
I have a 'counting' issue which I need to quickly resolve. A typical sequence input file (5 - 700 bases) looks like :
AGTAGTCGATCATNATANCTANTACNACTACTAACTATGCTAGNNAATATAAAAAAAAANAAA
I have over 500 files, named *.seq. I would like to create a script which :
a. runs through all the files,
b. counts the length of the 'poly A' tail (defined as the longest stretch containing either A or N)
c. sends the output to a file, eg.
25 1.seq
87 2.seq
13 3.seq
Example valid poly A tails (I desire the full length reported) :
AAAANANANANAAANNAAAAAA
AAAAAAAAAAAAAA
NNNNNNNNNNNNN
AAANNNNNNNNNNNAAAAAAAAA
Thank you so much for your expertise!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Count Occurrences of a string
by Zaxo (Archbishop) on Sep 10, 2003 at 00:27 UTC | |
Re: Count Occurrences of a string
by antirice (Priest) on Sep 09, 2003 at 22:25 UTC | |
Re: Count Occurrences of a string
by asarih (Hermit) on Sep 09, 2003 at 22:40 UTC | |
Re: Count Occurrences of a string
by biosysadmin (Deacon) on Sep 10, 2003 at 10:57 UTC | |
by MiamiGenome (Sexton) on Sep 10, 2003 at 14:38 UTC | |
by biosysadmin (Deacon) on Sep 10, 2003 at 14:58 UTC | |
Re: Count Occurrences of a string
by Anonymous Monk on Sep 09, 2003 at 23:04 UTC | |
Re: Count Occurrences of a string
by Abigail-II (Bishop) on Sep 09, 2003 at 22:24 UTC | |
by Marcello (Hermit) on Sep 10, 2003 at 09:45 UTC |