use strict; use Bio::Seq; my $dna = 'accatgagctgtacgtagcatctgagcgcgcatgactgtgactgacgtaggcagca'; my $seq = Bio::Seq->new( -seq => $dna); my $end = $seq->length -10; my @windows; for(my $i= 1; $i < $end; $i+=2) #increase by one codon each time. { push @windows, $seq->subseq($i, $i+9); } print join "\n", @windows;
In reply to Re: substr help
by geekgrrl
in thread substr help
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |