Bio::G..._tower(3pm)

πŸ“¦
version 2.40 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– Bio::G..._tower β€” the allele_tower glyph πŸ’–

okay bestie, so this page is from the Bio::Graphics::Glyph family β€” specifically the allele_tower glyph β€” and it's living in the User Contributed Perl Documentation. she's giving SNP-visualisation main character energy and honestly? iconic. 🌸


✨ NAME ✨

Bio::Graphics::Glyph::allele_tower β€” the "allele_tower" glyph. yes that's the whole name, she's lowkey mysterious like that πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

See <Bio::Graphics::Panel> and <Bio::Graphics::Glyph>.

like, that's it, that's the synopsis. go read those two first, iykyk πŸ’…


🌈 DESCRIPTION 🌈

so basically this glyph draws a letter for each allele found at a SNP position β€” one stacked right on top of the other, i.e. in a column. it's giving little alphabet tower. for example:

    A
    G

fr fr, that's the whole vibe. ✨

also go peek at http://www.hapmap.org/cgi-perl/gbrowse/gbrowse under 'genotyped SNPs' if you want to see it in the wild β€” that's the example they're pointing at πŸ‘‘

the common options are all available (the one exception: height, because that gets calculated based on how many alleles there are β€” the tower grows itself, periodt πŸ’…). and on top of that, if you hand the glyph the minor allele frequency (MAF) and tell it which allele is the minor one, she will display those differences too. obsessed. πŸ˜­πŸ’–

🧬 GETTING THE ALLELES 🧬

to specify the alleles, you make an "Alleles" attribute for the feature. there should be two of those attributes. so for a T/G polymorphism, the GFF load file should look like:

 Chr3  .  SNP   12345 12345 . . . SNP ABC123; Alleles T ; Alleles G

alternatively (the other way, bestie, pick your fighter) you can pass an "alleles" callback to the appropriate section of the config file. this option should return the two alleles separated by a slash:

  alleles = sub {
        my $snp = shift;
        my @d   = $snp->get_tag_values('AllelePair');
        return join "/",@d;
    }

πŸ‘‘ OPTIONS πŸ‘‘

here's the lil menu of what this glyph can do:

  • 🎨 Glyph Colour
  • πŸ”„ Different colour for alleles on the reverse strand
  • πŸ” Print out the complement for alleles on the reverse strand
  • πŸ…±οΈ Major allele shown in bold
  • πŸ“Š Horizontal histogram to show allele frequency

πŸ’™ GLYPH COLOR πŸ’™

the glyph color can be configured to be different depending on whether the feature is on the plus or minus strand. use fgcolor to define the glyph color for the plus strand, and bgcolor for the minus strand. like:

   fgcolor     = blue
   bgcolor     = red
⚠️ for this option to work you ALSO have to set ref_strand to return the strand of the feature:
   ref_strand        = sub {shift->strand}

πŸ”„ REVERSE STRAND ALLELES πŸ”„

if the alleles on the negative strand need to be the complement of what's listed in the GFF files (so like, A/G becomes T/C), set the complement option to have value 1:

   complement   = 1
⚠️ and again bestie β€” for this option to work, you must also set ref_strand to return the strand of the feature:
   ref_strand        = sub {shift->strand}

πŸ…±οΈ MAJOR/MINOR ALLELE πŸ…±οΈ

use the 'minor_allele' option to return the minor allele for the SNP. if you use this option, the major allele will appear in bold type. bold of her, literally. πŸ’…

πŸ“Š ALLELE FREQUENCY HISTOGRAMS πŸ“Š

use the 'maf' option to return the minor allele frequency for the SNP. if you use this option, a horizontal histogram will be drawn next to the alleles, showing their relative frequencies. e.g.

    A______
    C__
πŸ“Œ Note: the 'label' option must be set to 1 (i.e. on) and the 'minor_allele' option must return a valid allele for this to work. both. no shortcuts. 🫢

πŸ’€ BUGS πŸ’€

Please report them. (short, sweet, slightly ominous β€” she said what she said πŸ™ˆ)


🌟 SEE ALSO 🌟

  • Bio::Graphics::Panel
  • Bio::Graphics::Glyph
  • Bio::Graphics::Glyph::arrow
  • Bio::Graphics::Glyph::cds
  • Bio::Graphics::Glyph::crossbox
  • Bio::Graphics::Glyph::diamond
  • Bio::Graphics::Glyph::dna
  • Bio::Graphics::Glyph::dot
  • Bio::Graphics::Glyph::ellipse
  • Bio::Graphics::Glyph::extending_arrow
  • Bio::Graphics::Glyph::generic
  • Bio::Graphics::Glyph::graded_segments
  • Bio::Graphics::Glyph::heterogeneous_segments
  • Bio::Graphics::Glyph::line
  • Bio::Graphics::Glyph::pinsertion
  • Bio::Graphics::Glyph::primers
  • Bio::Graphics::Glyph::rndrect
  • Bio::Graphics::Glyph::segments
  • Bio::Graphics::Glyph::ruler_arrow
  • Bio::Graphics::Glyph::toomany
  • Bio::Graphics::Glyph::transcript
  • Bio::Graphics::Glyph::transcript2
  • Bio::Graphics::Glyph::translation
  • Bio::Graphics::Glyph::allele_tower
  • Bio::DB::GFF
  • Bio::SeqI
  • Bio::SeqFeatureI
  • Bio::Das
  • GD

πŸ’œ AUTHOR πŸ’œ

Fiona Cunningham <cunningh@cshl.edu> in Lincoln Stein's lab <steinl@cshl.edu>. queens. πŸ‘‘

Copyright (c) 2003 Cold Spring Harbor Laboratory

This package and its accompanying libraries is free software; you can redistribute it and/or modify it under the terms of the GPL (either version 1, or at your option, any later version) or the Artistic License 2.0. Refer to LICENSE for the full license text. In addition, please see DISCLAIMER.txt for disclaimers of warranty. 🫢


and that's the whole page bestie!! this one's shipped as perl v5.30.0, dated 2019-11-25, and she's filed under the manual name Bio::G..._tower(3pm). go forth and stack those alleles πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from