Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Someone
Friday, January 20th, 2012 at 4:47:47pm UTC 

  1. !/opt/local/bin/perl
  2.  
  3. use strict;
  4. use Bio::Graphics;
  5. use Bio::SeqFeature::Generic;
  6. use Bio::Graphics::Glyph::dna;
  7. use Bio::PrimarySeq;
  8. use Bio::Graphics::FeatureFile;
  9.  
  10. my $dna = 'a'x300;
  11. my $feature_list = Bio::Graphics::FeatureFile->new;
  12.  
  13.   # find restriction sites
  14.   my $i = 0;
  15.   my $feature;
  16.  
  17. my $abs_start = 0;
  18.  
  19. $feature_list->add_type('test' => {glyph => 'generic', label => 'dna!', key => 'dna'});
  20.  
  21. warn "For loop running?";
  22.  
  23. for (my $a = 1; $a < length($dna); $a = $a + 100) {
  24.  
  25.     warn "A: " . $a . " " . length($dna);
  26.  
  27.         $feature = Bio::SeqFeature::Generic->new( -label => $a, -start =>$abs_start+$a, -end=> $abs_start+$a+40);
  28.     $feature_list->add_feature($feature, 'test');
  29. }
  30.  
  31. my($name,$score,$start,$end, $seq, $feature, $track);
  32.  
  33. $seq = 'ACGGTCGATCGATCGATCGATCGTACGATCG'x5;
  34.  
  35.  
  36. my $panel = Bio::Graphics::Panel->new(
  37.                                       -length => length($seq),
  38.                                       -width  => length($seq) * 7
  39.                                      );
  40.  
  41.  
  42. $dna = Bio::PrimarySeq->new( -seq => $seq);
  43.  
  44. $feature = Bio::Graphics::Feature->new( -start =>1, -end=> length($seq));
  45. $feature->attach_seq($dna);

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus