[Bioperl-l] Scripting help to identify adaptors count in reads

L.M. Timmermans l.m.timmermans at students.uu.nl
Thu Nov 10 17:17:12 UTC 2011


On Thu, Nov 10, 2011 at 5:06 PM, Juan Jovel <jovel_juan at hotmail.com> wrote:

>
> There are many ways to do it.
> Perhaps the simplest is to count the number of times the adapter sequence
> (or part of it) appears in each read.
> For example:
> $adapter_matches = tr/adapter_sequence/adapter_sequence/;#
> $adapter_matches will store the number of times the adapter sequence is
> repeated.
>

No, it will not. tr/// will count characters, not sequences. Something like
«scalar (() = $sequence =~ m/(N+)/g)» should work OTOH.

Leon




More information about the Bioperl-l mailing list