[Bioperl-l] counting nucleotides in a sequence
Brian Osborne
brian_osborne at cognia.com
Thu Feb 20 00:07:49 EST 2003
Parvesh,
Like this:
%perl -e '$str = "gatcgggtttaaggccctttt"; (@arr) = $str =~ /.{1,10}/g;
print "@arr";'
Remove \n from the sequence before you do the pattern match.
Brian O.
On Wednesday, February 19, 2003, at 07:49 AM, <parvesh at pacific.net.sg>
wrote:
> Hello
> I am interested in calculating the nucleotides A,C, G and T
> in my sequence for every 10 nt window.
> So I need to write a code that will scan the sequence for every 10 nts
> like 1-10,11-20.
> preferably i can then stack the result in arrays and write this array
> to file.
> Can someone help me to do this using bioperl code please ?
> Thanks in advance for your help!
>
> Best wishes
> Parvesh
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>
More information about the Bioperl-l
mailing list