All pastes #2104560 Raw Edit

Someone

public text v1 · immutable
#2104560 ·published 2012-01-20 16:47 UTC
rendered paste body
!/opt/local/bin/perl
 
use strict;
use Bio::Graphics;
use Bio::SeqFeature::Generic;
use Bio::Graphics::Glyph::dna;
use Bio::PrimarySeq;
use Bio::Graphics::FeatureFile;

my $dna = 'a'x300;
my $feature_list = Bio::Graphics::FeatureFile->new;

  # find restriction sites
  my $i = 0;
  my $feature;

my $abs_start = 0;
  
$feature_list->add_type('test' => {glyph => 'generic', label => 'dna!', key => 'dna'});

warn "For loop running?";

for (my $a = 1; $a < length($dna); $a = $a + 100) {

    warn "A: " . $a . " " . length($dna);

	$feature = Bio::SeqFeature::Generic->new( -label => $a, -start =>$abs_start+$a, -end=> $abs_start+$a+40);
    $feature_list->add_feature($feature, 'test');
}

my($name,$score,$start,$end, $seq, $feature, $track);

$seq = 'ACGGTCGATCGATCGATCGATCGTACGATCG'x5;


my $panel = Bio::Graphics::Panel->new(
                                      -length => length($seq),
                                      -width  => length($seq) * 7
                                     );
 

$dna = Bio::PrimarySeq->new( -seq => $seq);

$feature = Bio::Graphics::Feature->new( -start =>1, -end=> length($seq));
$feature->attach_seq($dna);