From f028439fb8718f3dc3f93c9fb2919eaadfcbe0e6 Mon Sep 17 00:00:00 2001 From: cjfields Date: Fri, 2 Jan 2009 21:49:35 +0000 Subject: [PATCH] Remove Bio::Graphics examples and scripts svn path=/bioperl-live/branches/branch-1-6/; revision=15279 --- examples/biographics/all_glyphs.pl | 496 -------------------------------- examples/biographics/dynamic_glyphs.pl | 142 --------- examples/biographics/feature_data.gff | 27 -- examples/biographics/feature_data.txt | 68 ----- examples/biographics/lots_of_glyphs.pl | 201 ------------- examples/biographics/render_sequence.pl | 125 -------- scripts/biographics/bp_embl2picture.PLS | 175 ----------- scripts/biographics/bp_glyphs1-demo.PLS | 173 ----------- scripts/biographics/bp_glyphs2-demo.PLS | 140 --------- 9 files changed, 1547 deletions(-) delete mode 100755 examples/biographics/all_glyphs.pl delete mode 100755 examples/biographics/dynamic_glyphs.pl delete mode 100644 examples/biographics/feature_data.gff delete mode 100644 examples/biographics/feature_data.txt delete mode 100755 examples/biographics/lots_of_glyphs.pl delete mode 100755 examples/biographics/render_sequence.pl delete mode 100644 scripts/biographics/bp_embl2picture.PLS delete mode 100644 scripts/biographics/bp_glyphs1-demo.PLS delete mode 100644 scripts/biographics/bp_glyphs2-demo.PLS diff --git a/examples/biographics/all_glyphs.pl b/examples/biographics/all_glyphs.pl deleted file mode 100755 index 42a8d82ec..000000000 --- a/examples/biographics/all_glyphs.pl +++ /dev/null @@ -1,496 +0,0 @@ -#!/usr/bin/perl -w -# Generate a simple display of all glyphs for comparison testing -# T. Harris (harris@cshl.org) - -# Usage: -# ./all_glyphs GD > all.png -# ./all_glyphs GD 0 1000 > all.png # output in png with a wide view -# ./all_glyphs GD::SVG 100 150 > all.svg # output in SVG, zoomed - -use lib '.','../..','./blib/lib','../../blib/lib','../..'; -use strict; -use Bio::Seq; -use Bio::Graphics::Panel; -use Bio::Graphics::Feature; - -chomp (my $CLASS = shift); -$CLASS or die "\nUsage: lots_of_glyphs IMAGE_CLASS -\t- where IMAGE_CLASS is one of GD or GD::SVG -\t- GD generate png output; GD::SVG generates SVG.\n"; - -chomp (my $start = shift); -chomp (my $end = shift); - -$start ||= -100; -$end ||= 1000; - -my $ftr = 'Bio::Graphics::Feature'; -my $segment = $ftr->new(-start=>$start,-end=>$end,-name=>'ZK154',-type=>'clone'); -my $panel = Bio::Graphics::Panel->new( - -grid => [50,100,150,200,250,300,310,320,330], - -gridcolor => 'lightcyan', - -grid => 1, - -segment => $segment, - # -offset => 300, - # -length => 1000, - -spacing => 15, - -width => 600, - -pad_top => 20, - -pad_bottom => 20, - -pad_left => 20, - -pad_right=> 20, - # -bgcolor => 'teal', - # -key_style => 'between', - -key_style => 'bottom', - -image_class => $CLASS, - ); - -my $zk154_1 = $ftr->new(-start=>-50,-end=>800,-name=>'ZK154.1',-type=>'gene',-source=>'predicted'); -my $zk154_2 = $ftr->new(-start=>380,-end=>500,-name=>'ZK154.2',-type=>'gene',-source=>'predicted'); -my $zk154_3 = $ftr->new(-start=>900,-end=>1200,-name=>'ZK154.3',-type=>'gene',-source=>'confirmed'); -my $xyz4 = $ftr->new(-segments=>[[40,80],[100,120],[200,280],[300,320]], - -name =>'xyz4', - -source =>'mysterious', - -subtype=>'predicted', - -type =>'alignment'); - -# alignment -add_scores($xyz4); -$panel->add_track([$zk154_1,[$zk154_2,$xyz4]], - -glyph => 'alignment', - -label => 'alignment', - -key => 'alignment', - -height => 10, - -font => 'gdSmallFont', - -bump => 1, - -bgcolor => sub { shift->primary_tag eq 'predicted' ? 'green' : 'blue'}, - -connector => sub { my $primary_tag = shift->primary_tag; - $primary_tag eq 'transcript' ? 'hat' - : $primary_tag eq 'alignment' ? 'solid' - : undef}, - -connector_color => 'black', - ); - -# anchored_arrow -my $short_segment = $ftr->new(-start=>200,-end=>1000); -$panel->add_track($short_segment, - -glyph => 'anchored_arrow', - -label => 'anchored_arrow', - -key => 'anchored_arrow', - -double => 1, - -bump => 0, - -height => 10, - -linewidth =>1, - -arrowstyle=>'regular', - -tick =>1, - ); - -# arrow -$panel->add_track($segment, - -glyph => 'arrow', - -label => 'arrow-minor ticks', - -key => 'arrow', - -double => 1, - -fgcolor=> 'red', - -bump => 0, - -height => 10, - -arrowstyle=>'regular', - -tick =>1, - -linewidth =>1, - ); - -$panel->add_track($segment, - -glyph => 'arrow', - -label => 'arrow-major ticks', - -double => 1, - -bump => 0, - -height => 10, - -linewidth =>1, - -arrowstyle=>'filled', - -tick=>2, - ); - -# box -my $box = $ftr->new(-start=>100,-end=>600,-name=>'JC8',-type=>'clone'); -$panel->add_track($box, - -glyph => 'box', - -label => 'box', - -key => 'box', - -bump => 0, - -height => 10, - -font => 'gdLargeFont', - -linewidth =>1, - -bgcolor => 'turquoise', - -fgcolor => 'black', - ); - - -# cds -my $cds = $ftr->new(-segments=>[[1,50],[100,150],[222,280],[380,400],[520,599],[801,900]], - -name=>'cds', - -type=>'gene', - -strand=>'+1', - -subtype=>'predicted', - ); - -my $cds2 = $ftr->new(-segments =>[[23,90],[157,201],[256,375],[439,502],[600,725]], - -name =>'cds', - -strand => '-1', - -subtype =>'predicted', - -type =>'gene'); - -$panel->add_track([$cds], - -glyph => 'cds', - -label => 'cds', - -key => 'cds', - -bump => 0, - -height =>30, - -linewidth=>1, - -frame0f => 'blue', - -frame1f => 'green', - -frame2f => 'yellow', - -frame0r => 'red', - -frame1r => 'black', - -frame2r => 'purple', - # -sixframe => 1, - -require_subparts=>1, - ); - - -# crossbox -my $crossbox = $ftr->new(-start=>200,-end=>600); -$panel->add_track($crossbox, - -glyph => 'crossbox', - -label => 'crossbox', - -key => 'crossbox', - -bump => 0, - -height => 20, - # -font => 'gdMediumBold', - -linewidth =>1, - -bgcolor => 'red', - -fgcolor => 'black', - ); - -# diamond -my $diamonds = $ftr->new(-segments=>[[10,11],[100,101],[201,202],[214,215],[237,238], - [300,301],[350,351],[400,550],[601,602],[775,776]], - -name=>'SNPs'); -$panel->add_track([$diamonds], - -glyph => 'diamond', - -label => 'diamond', - -key => 'diamond', - -height => 10, - -bgcolor => 'aqua', - ); - - - -# dna -my $string = -'tcgtcaaatgtctattgggtcgaaaagaaggtgaacgagtgctcggtgatgcgttcaaaactcaacacaaatcttcacatttcgctccactagtcgactttatcgattttgattatcatgctcaaatgaagatttccaaagaggcaattgtgcagttgaaaaagaaaatgagcccacatatgacaaagcatggatttttctattcaatgggaaaagaaatagtgaaacgacaaactggagtaattcgaacaaattgtctagattgtctggataggacgaatgccgtacaaacagccatcggacttcaaatgtcacatgatcaagttgcatttctgaatttaaacgcgggaaaagtgaatgtagagcaacgagttgaagagattcttcgtgatttgtggcagaaaaatggagatcagtgtagtacgatctacgcgggaactggagctcttgacggaaagagcaagttgaaagacgcgtcgagatcgcttgcaagaactattcagaataatttgatggatggtgcaaagcaggaatcatttgatttatttttgactggagccgcatatgatccgaggcttttcgatagagcatgtaatatattgccacctagtttgatacaagaatacgctgacgccgtatcgcagcttgtcgagcgaagtcccgaaatcgccgaacctcaatccattaaaatattcgttggaacttggaatgtgaatggaggaaagaatattcataatgtggcattccgtaatgaatcgagtctctcccactggatatttgccaattcaatgacacgtctcgtatctgtagaagatgagcaactagctgatattgtagcaattggagttgaagaacttgttgatttgaatgcaagtaatatggttaaagcaagtaccacaaatcaacgaatgtggtgtgaaagtattcgaaaaactctttctgaaaaagctccatttgtgctcattggctccgagcagctcgtcggtgtttgtctattcctcttcgcaagaccacgtgtctcaccatacctgaaagactttgcagtggcttctgtaaagactggaatgggtggagcaactggaaataagggatccgttgccttccgaatcgtcgtattctccacttctatttgttttatttgttctcactttgcagccgggcaaaacgagattcgagacagaaatgaggattttgcgacgacgttgaaaaagattcgattcccgttgggcagagaaattgactcgcatgacgtcatattttggttgggagatttcaactatcgaattaatttgtcgggggatgaagttaagaatgctgttagaaatggagactatgcgaaattagtcgaaaatgatcaattgacacagcagaaagctcttggacagacatttgttggcttcaacgaaggacagctcacgttcgcaccaacatacaaatacgacacattcagtgatgactatgatacgagtgaaaagtgtcgtgcacccgcatggactgatcgaattctttggaaagatcagagaaagaagggaaaaacgcaacttctcagctatgatagatcagaattaaaaacttctgatcatcgacctgttggagctgttttcaaagtggaaacttttaaagttggcggcagaaaatgtgtggagctcatcgaggatgttgtagaatctatgggtccaccggacggaacaatcattgtcagtattgccggaaaacctcgattcccgccgcaaatgtttccgccgattcatgagaagttgaaggaactcggtgctcaagttcagctgagcaaattcgacgatggcgatctatggattgtactgaatagtggagaaatggcattagccgcattaagtatggatgggctgaagatcggaggaacagatcagattaatgtgaagttgaagtcaccggattgggcttatgctttgaagccacatctttcagattttgatttggaatcgtttgaagtgacggcagaggaagaggcattacttggtggtactgatggtgccgtttttgaatttgcagacgaagacgaggacgcaatcagtgtgtctagtctgacgcttactggttcggctcccgatcgacctcgtccaccatcagcaagaagtgaagcgatcagtgtagccaaacttgaatggccaacagaacaaccaaacgtcctctccacatcaatgccaacacgagcttcatcagcttctcttgccaatagttcttggtatgagcatgtaccaccacttgctccacctcaatcaaacaataataaaagccctccacaagcttgtctattcaatccattcactcaatctgcaccatccccggctccaccaccatccacgattcctcttccaccgactcgtggagcatcagttggaccaggtcctccagcggttcccgtcaggaaggcacccccaccgccacctcggcctgtcattccacctagaccaaaaaatatgtag'; - -my $fragment = Bio::Seq->new(-seq=>$string); -my $dna = $ftr->new(-seq=>$fragment, - -start=>$start,-end=>$end); -$panel->add_track($dna, - -glyph => 'dna', - -label => 'dna', - -key => 'dna', - -height => 50, - -linewidth=> 1, - -axis_color=>'red', - -gc_bins => 10, - -strand => 'both', - ); - - -# dot -my $dots = $ftr->new(-segments=>[[10,11],[100,150],[201,232],[214,215],[237,270], - [280,281],[300,321],[400,550],[601,602],[775,776]]); -$panel->add_track([$dots], - -glyph => 'dot', - -label => 'dot', - -key => 'dot', - -height => 10, - -bgcolor => 'red', - -point => 5, - ); - -# ellipse -my $ellipses = $ftr->new(-segments=>[[100,150],[201,232],[237,270],[300,321],[400,550],[730,776]]); -$panel->add_track([$ellipses], - -glyph => 'ellipse', - -label => 'ellipse', - -key => 'ellipse', - -height => 10, - -bgcolor => 'orange', - ); - -# ex -my $ex = $ftr->new(-start=>100,-end=>400); -$panel->add_track($ex, - -glyph => 'ex', - -label => 'ex', - -key => 'ex', - -bump => 0, - -height => 20, - # -font => 'gdMediumBold', - -linewidth =>1, - -bgcolor => 'red', - -fgcolor => 'black', - ); - -# graded_segments -my $partial_gene = $ftr->new(-segments=>[[1,50],[100,150],[220,300], - [380,400],[520,600],[800,900]], - -name =>'partial_gene', - -strand => '+1', - -type =>'exon', - -source =>'confirmed'); - -add_scores($partial_gene); -$panel->add_track($partial_gene, - -glyph => 'graded_segments', - -key => 'graded_segments', - -label => 'graded_segments - quill connector',, - -bgcolor => 'blue', - -connector => 'quill', - ); - -$panel->add_track($partial_gene, - -glyph => 'graded_segments', - -label => 'graded_segments - hat connector', - -key => 'graded_segments', - -bgcolor => 'green', - -connector => 'hat', - ); - -$panel->add_track($partial_gene, - -glyph => 'graded_segments', - -label => 'graded_segments - solid connector', - -key => 'graded_segments', - -bgcolor => 'yellow', - -connector => 'solid', - ); - -$panel->add_track($partial_gene, - -glyph => 'graded_segments', - -label => 'graded_segments - dashed connector', - -key => 'graded_segments', - -bgcolor => 'red', - -connector => 'dashed', - ); - -# heterogenous_segments -$panel->add_track([[$zk154_2,$zk154_3],[$zk154_2,$xyz4]], - -glyph => 'heterogeneous_segments', - -label => 'heterogeneous_segments', - -key => 'heterogeneous_segments', - -height => 10, - -bump => 1, - -predicted_color=>'orange', - -confirmed_color=>'purple', - -mysterious_color=>'red', - -connector_color => 'black', - ); - -# line -$panel->add_track($short_segment, - -glyph => 'line', - -label => 'line', - -key => 'line', - -bump => 0, - -height => 20, - # -font => 'gdMediumBold', - -linewidth =>1, - -bgcolor => 'green', - -fgcolor => 'black', - ); - -# pinsertion -my $pinsertion = $ftr->new(-segments=>[[10,10],[100,100],[200,200],[300,300],[400,400], - [550,600],[650,650]]); -$panel->add_track([$pinsertion], - -glyph => 'pinsertion', - -label => 'pinsertion', - -key => 'pinsertion', - -height => 10, - -bgcolor => 'yellow', - ); - -# primers -my $p = $ftr->new(-start=>200,-end=>600); -$panel->add_track($p, - -glyph => 'primers', - -label => 'primers', - -key => 'primers', - -height => 10, - -linewidth =>1, - ); - -# processed_transcript -my $trans1 = $ftr->new(-start=>50,-end=>10,-name=>'ZK154.1',-type=>"3'-UTR"); -my $trans2 = $ftr->new(-start=>100,-end=>50,-name=>'ZK154.2',-type=>'CDS'); -my $trans3 = $ftr->new(-start=>350,-end=>225,-name=>'ZK154.3',-type=>'CDS'); -my $trans4 = $ftr->new(-start=>650,-end=>500,-name=>'ZK154.3',-type=>'CDS'); -my $trans5 = $ftr->new(-start=>700,-end=>650,-name=>'ZK154.3',-type=>"5'-UTR"); -my $trans = $ftr->new(-segments=>[$trans1,$trans2,$trans3,$trans4,$trans5]); -$panel->add_track($trans, - -glyph => 'processed_transcript', - -key => 'processed_transcript', - -label => 'processed_transcript', - -bgcolor => 'aqua', - # -height => 5, - ); - -$panel->add_track($trans, - -glyph => 'processed_transcript', - -key => 'processed_transcript', - -label => 'processed_transcript', - -bgcolor => 'green', - # -height => 10, - -thin_utr => 1); - - -# redgreen_box -$panel->add_track($partial_gene, - -glyph => 'redgreen_box', - -label => 'redgreen_box', - -key => 'redgreen_box', - ); - -# redgreen_segments -$panel->add_track($partial_gene, - -glyph => 'redgreen_segment', - -label => 'redgreen_segment', - -key => 'redgreen_segment', - ); - -# rndrect -$panel->add_track($partial_gene, - -glyph => 'rndrect', - -label => 'rndrect', - -key => 'rndrect', - ); - -# ruler_arrow -$panel->add_track($partial_gene, - -glyph => 'ruler_arrow', - -label => 1, - -key => 'ruler_arrow', - -base => 1, - ); - -$panel->add_track($partial_gene, - -glyph => 'ruler_arrow', - -label => 1, - -key => 'ruler_arrow', - -base => 1, - -parallel => 0, - ); - -# segments -$panel->add_track([$zk154_1,[$zk154_2,$xyz4]], - -glyph => 'segments', - -label => 'segments', - -key => 'segments', - -height => 10, - -bump => 1, - -bgcolor => sub { shift->primary_tag eq 'predicted' ? 'green' : 'blue'}, - -connector => sub { my $primary_tag = shift->primary_tag; - $primary_tag eq 'transcript' ? 'hat' - : $primary_tag eq 'alignment' ? 'solid' - : undef}, - -connector_color => 'black', - # -draw_dna => 1, - ); - -# span -my $big_span = $ftr->new(-start=>-400,-end=>3000); -my $small_span = $ftr->new(-start=>290,-end=>600); -$panel->add_track([$big_span,$small_span], - -glyph => 'span', - -label => 'span', - -key => 'span', - ); - -# splice_site -$panel->add_track($partial_gene, - -glyph => 'splice_site', - -label => 'splice_site', - -key => 'splice_site', - -direction => 'right', - ); - -# transcript -$panel->add_track($trans, - -glyph => 'transcript', - -label => 'transcript', - -key => 'transcript', - -bgcolor =>'yellow', - -arrow_length=>10, - ); - -# transcript2 -$panel->add_track($trans, - -glyph => 'transcript2', - -label => 'transcript2', - -key => 'transcript2', - -bgcolor => 'purple', - -arrow_length=>10, - ); - -# translation -$panel->add_track($dna, - -glyph => 'translation', - -label => 'translation', - -key => 'translation', - -translation => '3frame', - -frame0 => 'red', - -frame1 => 'blue', - -frame2 => 'green', - -arrow_length => 10, - -start_codons => 1, - -show_sequence=> 1, - ); - - -# triangle -$panel->add_track([$pinsertion], - -glyph => 'triangle', - -label => 'triangle', - -key => 'triangle', - -bgcolor => 'yellow', - -point => 1, - -orient => 'E', - ); - - -# xyplot -$panel->add_track($partial_gene, - -glyph => 'xyplot', - -key => 'xyplot', - -label => 'xyplot', - -graph_type => 'boxes'); - - -my $gd = $panel->gd; -my $type = ($CLASS eq 'GD') ? 'png' : 'svg'; -print $gd->$type; - - - - - - -sub add_scores { - my $ftr = shift; - my $score = 10; - my @segs = $ftr->segments; - foreach (@segs) { - $_->score($score); - $score += 10; - } -} - - diff --git a/examples/biographics/dynamic_glyphs.pl b/examples/biographics/dynamic_glyphs.pl deleted file mode 100755 index 0647fa032..000000000 --- a/examples/biographics/dynamic_glyphs.pl +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/perl - -use lib '.','../..','./blib/lib','../../blib/lib','../..'; -use strict; -use Bio::Graphics::Panel; -use Bio::Graphics::Feature; - -chomp (my $PKG = shift); -$PKG or die "\nUsage: lots_of_glyphs IMAGE_CLASS -\t- where IMAGE_CLASS is one of GD or GD::SVG -\t- GD generate png output; GD::SVG generates SVG.\n"; - -my $ftr = 'Bio::Graphics::Feature'; - -my $segment = $ftr->new(-start=>-100,-end=>1400,-name=>'ZK154',-type=>'clone'); -my $zk154_1 = $ftr->new(-start=>-50,-end=>800,-name=>'ZK154.1',-type=>'gene'); -my $zk154_2 = $ftr->new(-segments=>[[200,300],[380,800]],-name=>'ZK154.2',-type=>'gene'); -my $zk154_3 = $ftr->new(-start=>900,-end=>1200,-name=>'ZK154.3',-type=>'gene'); - -my $zed_27 = $ftr->new(-segments=>[[550,600],[800,950],[1200,1300]], - -name=>'zed-27', - -subtype=>'exon',-type=>'transcript'); -my $abc3 = $ftr->new(-segments=>[[100,200],[350,400],[500,550]], - -name=>'abc53', - -strand => -1, - -subtype=>'exon',-type=>'transcript'); -my $xyz4 = $ftr->new(-segments=>[[40,80],[100,120],[200,280],[300,320]], - -name=>'xyz4', - -subtype=>'predicted',-type=>'alignment'); - -my $m3 = $ftr->new(-segments=>[[20,40],[30,60],[90,270],[290,300]], - -name=>'M3', - -subtype=>'predicted',-type=>'alignment'); - -my $bigone = $ftr->new(-segments=>[[-200,-120],[90,270],[290,300]], - -name=>'big one', - -subtype=>'predicted',-type=>'alignment'); - -my $fred_12 = $ftr->new(-segments=>[$xyz4,$zed_27], - -type => 'group', - -name =>'fred-12'); - -my $confirmed_exon1 = $ftr->new(-start=>1,-stop=>20, - -type=>'exon', - -source=>'confirmed', - -name => 'confirmed1', - ); -my $predicted_exon1 = $ftr->new(-start=>30,-stop=>50, - -type=>'exon', - -name=>'predicted1', - -source=>'predicted'); -my $predicted_exon2 = $ftr->new(-start=>60,-stop=>100, - -name=>'predicted2', - -type=>'exon',-source=>'predicted'); - -my $confirmed_exon3 = $ftr->new(-start=>150,-stop=>190, - -type=>'exon',-source=>'confirmed', - -name=>'abc123'); -my $partial_gene = $ftr->new(-segments=>[$confirmed_exon1,$predicted_exon1,$predicted_exon2,$confirmed_exon3], - -name => 'partial gene', - -type => 'transcript', - -source => '(from a big annotation pipeline)' - ); -my @segments = $partial_gene->segments; -my $score = 10; -foreach (@segments) { - $_->score($score); - $score += 10; -} - -my $panel = Bio::Graphics::Panel->new( - -gridcolor => 'lightcyan', - -grid => 1, - -segment => $segment, - -spacing => 15, - -width => 600, - -pad_top => 20, - -pad_bottom => 20, - -pad_left => 20, - -pad_right=> 20, - -key_style => 'between', - -image_class=> $PKG, - ); -my @colors = $panel->color_names(); - -my $t = $panel->add_track( - transcript2 => [$abc3,$zed_27], - -label => 1, - -bump => 1, - -key => 'Prophecies', - # -tkcolor => $colors[rand @colors], - ); -$t->configure(-bump=>1); -$panel->add_track($segment, - -glyph => 'arrow', - -label => sub {scalar localtime}, -# -labelfont => 'gdMediumBoldFont', - -double => 1, - -bump => 0, - -height => 10, - -arrowstyle=>'regular', - -linewidth=>1, - -tick => 2, - ); - -$panel->add_track(generic => [$segment,$abc3,$zk154_1,[$zk154_2,$xyz4]], - -label => sub { $_[-1]->level == 0 } , - -bgcolor => sub { shift->primary_tag eq 'predicted' ? 'green' : 'blue'}, - -connector => sub { my $primary_tag = shift->primary_tag; - $primary_tag eq 'transcript' ? 'hat' - : $primary_tag eq 'alignment' ? 'solid' - : 'solid'}, - -connector_color => 'black', - -height => 10, - -bump => 1, -# -tkcolor => $colors[rand @colors], - -key => 'Signals', - ); - -my $track = $panel->add_track('transcript2'=> [$bigone], - -label => 1, - -connector => 'solid', - -point => 0, - -orient => 'N', - -height => 8, - -base => 1, - -relative_coords => 1, - -tick => 2, - -bgcolor => 'red', - -key => 'Dynamically Added'); -#$track->add_feature($bigone,$zed_27,$abc3); -#$track->add_group($predicted_exon1,$predicted_exon2,$confirmed_exon3); -$track->add_group($bigone,$zed_27,$zk154_2,$bigone); - -my $gd = $panel->gd; -my @boxes = $panel->boxes; -my $red = $panel->translate_color('red'); -for my $box (@boxes) { - my ($feature,@points) = @$box; -} -my $type = ($PKG eq 'GD') ? 'png' : 'svg'; -print $gd->$type; diff --git a/examples/biographics/feature_data.gff b/examples/biographics/feature_data.gff deleted file mode 100644 index 7eadf5210..000000000 --- a/examples/biographics/feature_data.gff +++ /dev/null @@ -1,27 +0,0 @@ -# this is a regular GFF-format file - -[intron:curated] -glyph = segments -description = 1 -bgcolor = green -height = 5 -key = Curated Introns - -[structural:GenePair_STS] -glyph = primers -fgcolor = black -bgcolor = blue -connect = 1 - -III curated Sequence 2729913 2752540 . + . Sequence "H19M22.2a" -III curated Sequence 2729913 2752540 . + . Sequence "H19M22.2b" -III Expr_profile Expression 2731006 2732545 . + . Expr_profile "H19M22.2" -III GenePair_STS structural 2731006 2732545 . + . PCR_product "sjj_H19M22.2" -III curated Sequence 2748310 2752540 . + . Sequence "H19M22.2c" -III curated intron 2730004 2730635 . + . Sequence "H19M22.2b" ; Confirmed_by_EST -III curated intron 2730004 2730635 . + . Sequence "H19M22.2a" ; Confirmed_by_EST -III curated intron 2730705 2730846 . + . Sequence "H19M22.2a" ; Confirmed_by_EST -III curated intron 2730705 2730846 . + . Sequence "H19M22.2b" ; Confirmed_by_EST -III curated intron 2731102 2731151 . + . Sequence "H19M22.2a" ; Confirmed_by_EST -III curated intron 2731102 2731151 . + . Sequence "H19M22.2b" ; Confirmed_by_EST -III curated intron 2731541 2732220 . + . Sequence "H19M22.2b" ; Confirmed_by_cDNA diff --git a/examples/biographics/feature_data.txt b/examples/biographics/feature_data.txt deleted file mode 100644 index 9206ecd1c..000000000 --- a/examples/biographics/feature_data.txt +++ /dev/null @@ -1,68 +0,0 @@ -[general] -pixels = 750 -bases = -1000..21000 -height = 12 -reference = B0511 - -[Cosmid] -glyph = segments -fgcolor = blue -key = C. elegans conserved regions - -[EST] -glyph = segments -bgcolor= yellow -connector = solid -height = 5 - -[FGENESH] -glyph = transcript2 -bgcolor = green -description = 1 - -[SwissProt] -glyph = arrow -base = 1 -linewidth = 2 -fgcolor = red -description = 1 - -[P-element] -glyph = triangle -orient = S -bgcolor = red -fgcolor = white -label = 1 -point = 1 - -Cosmid B0511 516-619 -Cosmid B0511 3185-3294 -Cosmid B0511 10946-11208 -Cosmid B0511 13126-13511 -Cosmid B0511 11394-11539 -Cosmid B0511 14383-14490 -Cosmid B0511 15569-15755 -Cosmid B0511 18879-19178 -Cosmid B0511 15850-16110 -Cosmid B0511 66-208 -Cosmid B0511 6354-6499 -Cosmid B0511 13955-14115 -Cosmid B0511 7985-8042 -Cosmid B0511 11916-12046 -P-element "" 500-500 -P-element MrQ 700-700 -P-element MrR 10000-10000 -EST yk260e10.5 15569-15724 -EST yk672a12.5 537-618,3187-3294 -EST yk595e6.5 552-618 -EST yk595e6.5 3187-3294 -EST yk846e07.3 11015-11208 -EST yk53c10 - yk53c10.3 12876-13577,13882-14121,14169-14535 - yk53c10.5 18892-19154,15853-16219 -SwissProt "PECANEX Protein" 5513-16656 "From SwissProt" -FGENESH "Predicted gene 1" -1200--500,518-616,661-735,3187-3365,3436-3846 Pfam domain -FGENESH "Predicted gene 2" 5513-6497,7968-8136,8278-8383,8651-8839,9462-9515,10032-10705,10949-11340,11387-11524,11765-12067,12876-13577,13882-14121,14169-14535,15006-15209,15259-15462,15513-15753,15853-16219 Mysterious -FGENESH "Predicted gene 3" 16626-17396,17451-17597 -FGENESH "Predicted gene 4" 18459-18722,18882-19176,19221-19513,19572-30000 "Transmembrane protein" - diff --git a/examples/biographics/lots_of_glyphs.pl b/examples/biographics/lots_of_glyphs.pl deleted file mode 100755 index 47abed0db..000000000 --- a/examples/biographics/lots_of_glyphs.pl +++ /dev/null @@ -1,201 +0,0 @@ -#!/usr/bin/perl - -use lib '.','../..','./blib/lib','../../blib/lib','../..'; -use strict; -use Bio::Graphics::Panel; -use Bio::Graphics::Feature; - -chomp (my $CLASS = shift); -$CLASS or die "\nUsage: lots_of_glyphs IMAGE_CLASS -\t- where IMAGE_CLASS is one of GD or GD::SVG -\t- GD generate png output; GD::SVG generates SVG.\n"; - -my $ftr = 'Bio::Graphics::Feature'; -my $segment = $ftr->new(-start=>-100,-end=>1000,-name=>'ZK154',-type=>'clone'); -my $zk154_1 = $ftr->new(-start=>-50,-end=>800,-name=>'ZK154.1',-type=>'gene'); -my $zk154_2 = $ftr->new(-start=>380,-end=>500,-name=>'ZK154.2',-type=>'gene'); -my $zk154_3 = $ftr->new(-start=>900,-end=>1200,-name=>'ZK154.3',-type=>'gene'); - -my $zed_27 = $ftr->new(-segments=>[[400,500],[550,600],[800,950]], - -name=>'zed-27', - -subtype=>'exon',-type=>'gene'); -my $abc3 = $ftr->new(-segments=>[[100,200],[350,400],[500,550]], - -name=>'abc53', - -strand => -1, - -subtype=>'exon',-type=>'gene'); -my $xyz4 = $ftr->new(-segments=>[[40,80],[100,120],[200,280],[300,320]], - -name=>'xyz4', - -subtype=>'predicted',-type=>'alignment'); - -my $m3 = $ftr->new(-segments=>[[20,40],[30,60],[90,270],[290,300]], - -name=>'M3', - -subtype=>'predicted',-type=>'alignment'); - -my $bigone = $ftr->new(-segments=>[[-200,-120],[90,270],[290,300]], - -name=>'big one', - -subtype=>'predicted',-type=>'gene'); - -my $fred_12 = $ftr->new(-segments=>[$xyz4,$zed_27], - -type => 'group', - -name =>'fred-12'); - -my $confirmed_exon1 = $ftr->new(-start=>1,-stop=>20, - -type=>'exon', - -source=>'confirmed', - -name => 'confirmed1', - ); -my $predicted_exon1 = $ftr->new(-start=>30,-stop=>50, - -type=>'exon', - -name=>'predicted1', - -source=>'predicted'); -my $predicted_exon2 = $ftr->new(-start=>60,-stop=>100, - -name=>'predicted2', - -type=>'exon',-source=>'predicted'); - -my $confirmed_exon3 = $ftr->new(-start=>150,-stop=>190, - -type=>'exon',-source=>'confirmed', - -name=>'abc123'); -my $partial_gene = $ftr->new(-segments=>[$confirmed_exon1,$predicted_exon1,$predicted_exon2,$confirmed_exon3], - -name => 'partial gene', - -type => 'transcript', - -source => '(from a big annotation pipeline)' - ); -my @segments = $partial_gene->segments; -my $score = 10; -foreach (@segments) { - $_->score($score); - $score += 10; -} - -my $panel = Bio::Graphics::Panel->new( -# -grid => [50,100,150,200,250,300,310,320,330], - -gridcolor => 'lightcyan', - -grid => 1, - -segment => $segment, -# -offset => 300, -# -length => 1000, - -spacing => 15, - -width => 600, - -pad_top => 20, - -pad_bottom => 20, - -pad_left => 20, - -pad_right=> 20, -# -bgcolor => 'teal', -# -key_style => 'between', - -key_style => 'bottom', - -image_class => $CLASS, - ); -my @colors = $panel->color_names(); - -my $t = $panel->add_track( - # generic => [$abc3,$zed_27], - transcript2 => [$abc3,$zed_27], - -label => 1, - -bump => 1, - -key => 'Prophecies', - # -tkcolor => $colors[rand @colors], - ); -$t->configure(-bump=>1); -$panel->add_track($segment, - -glyph => 'arrow', - -label => 'base pairs', - -double => 1, - -bump => 0, - -height => 10, - -arrowstyle=>'regular', - -linewidth=>1, - # -tkcolor => $colors[rand @colors], - -tick => 2, - ); -$panel->unshift_track(generic => [$segment,$zk154_1,$zk154_2,$zk154_3,[$xyz4,$zed_27]], - -label => sub { my $feature = shift; $feature->sub_SeqFeature>0}, - -bgcolor => sub { shift->primary_tag eq 'predicted' ? 'olive' : 'red'}, - -connector => sub { my $feature = shift; - my $type = $feature->primary_tag; - $type eq 'group' ? 'dashed' - : $type eq 'transcript' ? 'hat' - : $type eq 'alignment' ? 'solid' - : undef}, - -all_callbacks => 1, - -connector_color => 'black', - -height => 10, - -bump => 1, - -linewidth=>2, - # -tkcolor => $colors[rand @colors], - -key => 'Signs', - ); - -my $track = $panel->add_track(-glyph=> sub { shift->primary_tag eq 'gene' ? 'transcript2': 'generic'}, - -label => sub { $_[-1]->level == 0 } , - -connector => sub { return shift->type eq 'group' ? 'dashed' : ''}, - -point => 0, - -orient => 'N', - -height => 8, - -base => 1, - -relative_coords => 1, - -tick => 2, - -all_callbacks => 1, - -bgcolor => 'red', - -key => 'Dynamically Added'); -$track->add_feature($bigone,$zed_27,$abc3); -$track->add_group($predicted_exon1,$predicted_exon2,$confirmed_exon3); - -$panel->add_track( - [$abc3,$zed_27,$partial_gene], - -bgcolor => sub { shift->source_tag eq 'predicted' ? 'green' : 'blue'}, - -glyph => 'transcript', -# -glyph => sub { my $feature = shift; -# return $feature->source_tag eq 'predicted' -# ? 'ellipse' : 'transcript'}, - -label => sub { shift->sub_SeqFeature > 0 }, -# -label => 1, -# -description => sub { shift->sub_SeqFeature > 0 }, - -description => sub { - my $feature = shift; - return 1 if $feature->primary_tag eq 'transcript'; - return '*' if $feature->source_tag eq 'predicted'; - return; - }, - -font2color => 'red', - -bump => +1, -# -tkcolor => $colors[rand @colors], - -key => 'Portents', - ); -$panel->add_track(segments => [$segment,$zk154_1,[$zk154_2,$xyz4]], - -label => 1, - -bgcolor => sub { shift->primary_tag eq 'predicted' ? 'green' : 'blue'}, - -connector => sub { my $primary_tag = shift->primary_tag; - $primary_tag eq 'transcript' ? 'hat' - : $primary_tag eq 'alignment' ? 'solid' - : undef}, - -connector_color => 'black', - -height => 10, - -bump => 1, -# -tkcolor => $colors[rand @colors], - -key => 'Signals', - ); -$panel->add_track(generic => [], - -key => 'Foobar'); - -$panel->add_track(graded_segments => $partial_gene, - -bgcolor =>'blue', - -label => 1, - -key => 'Scored thing'); - -$panel->add_track(diamond => [$segment,$zk154_1,$zk154_2,$zk154_3,$xyz4,$zed_27], - -bgcolor =>'blue', - -label => 1, - -key => 'pointy thing'); - -my $gd = $panel->gd; -my @boxes = $panel->boxes; -my $red = $panel->translate_color('red'); -for my $box (@boxes) { - my ($feature,@points) = @$box; -# $gd->rectangle(@points,$red); -} -#$gd->filledRectangle(0,0,20,200,1); -#$gd->filledRectangle(600-20,0,600,200,1); -my $type = ($CLASS eq 'GD') ? 'png' : 'svg'; -print $gd->$type; - diff --git a/examples/biographics/render_sequence.pl b/examples/biographics/render_sequence.pl deleted file mode 100755 index 59525fd7e..000000000 --- a/examples/biographics/render_sequence.pl +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/perl - -use strict; -use lib '.','../blib/lib'; -use Bio::DB::BioFetch; -use Bio::Graphics; - -my $accession = shift; -if (!defined $accession || $accession =~ /^-/) { die < [start] [stop] - Render a GenBank/EMBL accession into drawable form. - Return as a GIF or PNG image on standard output. - - If start and stop are specified, then that segment - will be displayed. - - To view, pipe to a viewer program as shown below. - -Example to try: - render_sequence.pl CEF58D5 | display - - -By default, will look for accession in the "embl" namespace. To -choose other namespaces, use these formats: - - swall:CEF58D5 - refseq:NC_001320 - -END -; - -my ($start,$stop) = @ARGV; - -my $db = 'embl'; -if ($accession =~ /^(embl|swall|refseq):(.+)/) { - $db = $1; - $accession = $2; -} - -my $bf = eval {require Bio::DB::FileCache} - ? Bio::DB::FileCache->new(-seqdb=>Bio::DB::BioFetch->new(-db=>$db), - -file =>'/usr/tmp/my_seq_cache', - -keep =>1) - : Bio::DB::BioFetch->new(-db=>$db); - -warn "fetching...\n"; -my $seq = $bf->get_Seq_by_id($accession); - -my @features = $seq->all_SeqFeatures; -my @CDS = grep {$_->primary_tag eq 'CDS'} @features; -my @gene = grep {$_->primary_tag eq 'gene'} @features; -my @tRNAs = grep {$_->primary_tag eq 'tRNA'} @features; - -warn "rendering...\n"; -$start = 1 unless defined $start; -$stop = $seq->length unless defined $stop; - -my $panel = Bio::Graphics::Panel->new( - -offset => $start, - -length => $stop - $start + 1, - -width => 1000, - ); -$panel->add_track(arrow => - Bio::Graphics::Feature->new(-start => $start, - -stop => $stop, - -name => $seq->display_id), - -bump => 0, - -double=>1, - -tick => 2); - -$panel->add_track(transcript2 => \@gene, - -bgcolor => 'blue', - -fgcolor => 'black', - -key => 'Genes', - -bump => +1, - -height => 10, - -label => \&gene_label, - -description=> \&gene_description, - ); - -$panel->add_track(transcript2 => \@CDS, - -bgcolor => 'cyan', - -fgcolor => 'black', - -key => 'CDS', - -bump => +1, - -height => 10, - -label => \&gene_label, - -description=> \&gene_description, - ); - -$panel->add_track(generic => \@tRNAs, - -bgcolor => 'red', - -fgcolor => 'black', - -key => 'tRNAs', - -bump => +1, - -height => 8, - -label => \&gene_label, - ); - -my $gd = $panel->gd; - -print $gd->can('png') ? $gd->png : $gd->gif; - -sub gene_label { - my $feature = shift; - my @notes; - foreach (qw(product gene)) { - next unless $feature->can('has_tag') && $feature->has_tag($_); - @notes = $feature->each_tag_value($_); - last; - } - $notes[0]; -} -sub gene_description { - my $feature = shift; - my @notes; - - foreach (qw(note)) { - next unless $feature->can('has_tag') && $feature->has_tag($_); - @notes = $feature->each_tag_value($_); - last; - } - return unless @notes; - substr($notes[0],30) = '...' if length $notes[0] > 30; - $notes[0]; -} diff --git a/scripts/biographics/bp_embl2picture.PLS b/scripts/biographics/bp_embl2picture.PLS deleted file mode 100644 index 209762ff5..000000000 --- a/scripts/biographics/bp_embl2picture.PLS +++ /dev/null @@ -1,175 +0,0 @@ -#!/usr/bin/perl - -# file: embl2picture.pl -# This is code example 6 in the Graphics-HOWTO -# Author: Lincoln Stein - -use strict; -use lib "$ENV{HOME}/projects/bioperl-live"; -use Bio::Graphics; -use Bio::SeqIO; - -=head1 NAME - -bp_embl2picture.pl - Render a Genbank/EMBL sequence file graphically as a png image - -=head1 SYNOPSIS - - % bp_embl2picture.pl factor7.embl | display - - -=head1 DESCRIPTION - -Render a GenBank/EMBL entry into drawable form. Return as a GIF or -PNG image on standard output. - -The file must be in embl, genbank, or another SeqIO- recognized format. -Only the first entry will be rendered. - -=head1 SEE ALSO - -L, the BioGraphics HOWTO. - -=head1 AUTHOR - -Lincoln Stein, lstein@cshl.edu - -Copyright (c) 2004 Cold Spring Harbor Laboratory - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. See DISCLAIMER.txt for -disclaimers of warranty. - -=cut - -use constant USAGE =>< - Render a GenBank/EMBL entry into drawable form. - Return as a GIF or PNG image on standard output. - - File must be in embl, genbank, or another SeqIO- - recognized format. Only the first entry will be - rendered. - -Example to try: - embl2picture.pl factor7.embl | display - - -END - -my $file = shift or die USAGE; -my $io = Bio::SeqIO->new(-file=>$file) or die USAGE; -my $seq = $io->next_seq or die USAGE; -my $wholeseq = Bio::SeqFeature::Generic->new(-start=>1,-end=>$seq->length, - -display_name=>$seq->display_name); - -my @features = $seq->all_SeqFeatures; - -# sort features by their primary tags -my %sorted_features; -for my $f (@features) { - my $tag = $f->primary_tag; - push @{$sorted_features{$tag}},$f; -} - -my $panel = Bio::Graphics::Panel->new( - -length => $seq->length, - -key_style => 'between', - -width => 800, - -pad_left => 10, - -pad_right => 10, - ); -$panel->add_track($wholeseq, - -glyph => 'arrow', - -bump => 0, - -double=>1, - -tick => 2); - -$panel->add_track($wholeseq, - -glyph => 'generic', - -bgcolor => 'blue', - -label => 1, - ); - -# special cases -if ($sorted_features{CDS}) { - $panel->add_track($sorted_features{CDS}, - -glyph => 'transcript2', - -bgcolor => 'orange', - -fgcolor => 'black', - -font2color => 'red', - -key => 'CDS', - -bump => +1, - -height => 12, - -label => \&gene_label, - -description=> \&gene_description, - ); - delete $sorted_features{'CDS'}; -} - -if ($sorted_features{tRNA}) { - $panel->add_track($sorted_features{tRNA}, - -glyph => 'transcript2', - -bgcolor => 'red', - -fgcolor => 'black', - -font2color => 'red', - -key => 'tRNAs', - -bump => +1, - -height => 12, - -label => \&gene_label, - ); - delete $sorted_features{tRNA}; -} - -# general case -my @colors = qw(cyan orange blue purple green chartreuse magenta yellow aqua); -my $idx = 0; -for my $tag (sort keys %sorted_features) { - my $features = $sorted_features{$tag}; - $panel->add_track($features, - -glyph => 'generic', - -bgcolor => $colors[$idx++ % @colors], - -fgcolor => 'black', - -font2color => 'red', - -key => "${tag}s", - -bump => +1, - -height => 8, - -description => \&generic_description - ); -} - -print $panel->png; -exit 0; - -sub gene_label { - my $feature = shift; - my @notes; - foreach (qw(product gene)) { - next unless $feature->has_tag($_); - @notes = $feature->each_tag_value($_); - last; - } - $notes[0]; -} - -sub gene_description { - my $feature = shift; - my @notes; - foreach (qw(note)) { - next unless $feature->has_tag($_); - @notes = $feature->each_tag_value($_); - last; - } - return unless @notes; - substr($notes[0],30) = '...' if length $notes[0] > 30; - $notes[0]; -} - -sub generic_description { - my $feature = shift; - my $description; - foreach ($feature->all_tags) { - my @values = $feature->each_tag_value($_); - $description .= $_ eq 'note' ? "@values" : "$_=@values; "; - } - $description =~ s/; $//; # get rid of last - $description; -} diff --git a/scripts/biographics/bp_glyphs1-demo.PLS b/scripts/biographics/bp_glyphs1-demo.PLS deleted file mode 100644 index baf237778..000000000 --- a/scripts/biographics/bp_glyphs1-demo.PLS +++ /dev/null @@ -1,173 +0,0 @@ -#!/usr/bin/perl - -#Thu Aug 19 22:29:23 EDT 2004 -#Simon Ilyushchenko - demonstrating several new glyphs for gbrowse, part 1. - -use strict; - -use Bio::Graphics::Panel; - -=head1 NAME - -bp_glyphs1-demo.pl - First demo of Bio::Graphics glyphs - -=head1 SYNOPSIS - - % bp_glyphs2-demo.pl | display - - -=head1 DESCRIPTION - -Generates a PNG image of some of the more esoteric Bio::Graphics glyphs. - -=head1 SEE ALSO - -L, the BioGraphics HOWTO. - -=head1 AUTHOR - -Simon Ilyushchenko - -Copyright (c) 2004 Cold Spring Harbor Laboratory - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. See DISCLAIMER.txt for -disclaimers of warranty. - -=cut - -my $ftr = 'Bio::Graphics::Feature'; -my $segment = $ftr->new(-start=>1,-end=>1000,-name=>'ZK154',-type=>'clone'); -my $subseg1 = $ftr->new(-start=>100,-end=>600,-name=>'saw teeth'); - -my $panel = Bio::Graphics::Panel->new( - -grid => 1, - -segment => $segment, - -key_style => 'bottom'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -interval => 20, - -width => 20, - -glyph => 'saw_teeth'); - -$subseg1->name('frequent saw teeth'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -interval => 0, - -width => 10, - -fgcolor => 'red', - -glyph => 'saw_teeth'); - -$subseg1->name('dashed line'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -dash_size => 10, - -space_size => 5, - -glyph => 'dashed_line'); - -$subseg1->name('thick colored dashed line with shear'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -fgcolor => 'red', - -dash_size => 20, - -space_size => 5, - -space_color => 'blue', - -shear => 'yes', - -linewidth => 2, - -glyph => 'dashed_line'); - -$subseg1->name('three letters'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -width => 20, - -interval => 10, - -pad_top => 30, - -glyph => 'three_letters'); - -$subseg1->name('flag'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -width => 20, - -text => "ori", - -height => 30, - -glyph => 'flag'); - -$subseg1->name('dumbbell - square '); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -shape_sive => 20, - -end_shape => "square", - -height => 20, - -glyph => 'dumbbell'); - -$subseg1->name('dumbbell - diamond'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -shape_size => 20, - -end_shape => "diamond", - -fgcolor => 'orange', - -height => 20, - -glyph => 'dumbbell'); - -$subseg1->name('dumbbell - tree'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -shape_size => 20, - -end_shape => "tree", - -fgcolor => 'green', - -height => 20, - -glyph => 'dumbbell'); - -$subseg1->name('dumbbell - clover'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -shape_size => 20, - -end_shape => "clover", - -fgcolor => 'pink', - -height => 20, - -glyph => 'dumbbell'); - - -$subseg1->name('dumbbell - star with text'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -shape_size => 40, - -end_shape => "star", - -fgcolor => 'red', - -height => 40, - -caption => 'Back in USSR', - -glyph => 'dumbbell'); - - -$subseg1->name('dumbbell - bubble text'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -shape_size => 20, - -end_shape => "bubble", - -bubble_text => 'CpG', - -fgcolor => 'red', - -height => 20, - -glyph => 'dumbbell'); - - - - - - - -open OUT,">glyphs1.png" or die "Couldn't open glyphs1.png for writing: $!"; -print OUT $panel->gd->png; -close OUT; - - diff --git a/scripts/biographics/bp_glyphs2-demo.PLS b/scripts/biographics/bp_glyphs2-demo.PLS deleted file mode 100644 index e2d3455ce..000000000 --- a/scripts/biographics/bp_glyphs2-demo.PLS +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/perl - -#Wed Sep 1 18:54:18 EDT 2004 -#Simon Ilyushchenko - demonstrating several new glyphs for gbrowse, part 2. - -use strict; - -use Bio::Graphics::Panel; - -=head1 NAME - -bp_glyphs2-demo.pl - Second demo of Bio::Graphics glyphs - -=head1 SYNOPSIS - - % bp_glyphs2-demo.pl | display - - -=head1 DESCRIPTION - -Generates a PNG image of some of the more esoteric Bio::Graphics glyphs. - -=head1 SEE ALSO - -L, the BioGraphics HOWTO. - -=head1 AUTHOR - -Simon Ilyushchenko - -Copyright (c) 2004 Cold Spring Harbor Laboratory - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. See DISCLAIMER.txt for -disclaimers of warranty. - -=cut - -my $ftr = 'Bio::Graphics::Feature'; -my $segment = $ftr->new(-start=>1,-end=>400,-name=>'ZK154',-type=>'clone'); -my $subseg1 = $ftr->new(-start=>100,-end=>300,-name=>'glyphs 2'); - -my $panel = Bio::Graphics::Panel->new( - -grid => 1, - -segment => $segment, - -key_style => 'bottom'); - -$subseg1->name('dumbbell - arrows with arc '); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -width => 50, - -height => 30, - -arc => 1, - -shape_size => 20, - -fgcolor => 'crimson', - -end_shape => "arrow", - -glyph => 'dumbbell'); - -$subseg1->name('dumbbell - wave '); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -shape_size => 20, - -end_shape => "wave", - -height => 20, - -fgcolor => 'green', - -glyph => 'dumbbell'); - -$subseg1->name('two bolts'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -shape_size => 40, - -bolt_color => 'violet', - -height => 20, - -glyph => 'two_bolts'); - -$subseg1->name('wave'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -height => 10, - -circle => 1, - -glyph => 'wave'); - -$subseg1->name('broken line'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -height => 20, - -glyph => 'broken_line'); - -$subseg1->name('tic_tac_toe'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -height => 20, - -glyph => 'tic_tac_toe'); - -$subseg1->name('text_in_box'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -height => 20, - -text_bgcolor => 'yellow', - -glyph => 'text_in_box'); - - -$subseg1->name('christmas arrow'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -height => 20, - -fgcolor => 'steelblue', - -glyph => 'christmas_arrow'); - - -$subseg1->name('pentagram'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -height => 20, - -glyph => 'pentagram'); - - -$subseg1->name('weighted arrow'); - -$panel->add_track(segments=>[$subseg1], - -label => 1, - -height => 20, - -fgcolor => 'sienna', - -glyph => 'weighted_arrow'); - - - -open OUT,">glyphs2.png" or die "Couldn't open glyphs2.png for writing: $!"; -print OUT $panel->gd->png; -close OUT; - - -- 2.11.4.GIT