Skip to content

Instantly share code, notes, and snippets.

@wwood
Created October 30, 2012 00:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wwood/3977545 to your computer and use it in GitHub Desktop.
Save wwood/3977545 to your computer and use it in GitHub Desktop.
length memoization
#!/usr/bin/env perl
use lib '/home/ben/l/git/bioperl-live';
use 5.006;
use strict;
use warnings;
use Bio::Seq;
use Bio::SeqFeature::SubSeq;
my $reference_sequence = Bio::Seq->new( -id => 'blah', -seq => 'ACGT'x1000000 );
#$reference->length( $reference_sequence->length );
for my $i (1..4000){
my $newseq = Bio::SeqFeature::SubSeq->new(
-template => $reference_sequence,
-start => 200000+$i,
-end => 200000 + 500+$i,
);
my $shiny_seq = $newseq->seq;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment