.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Bio::Graphics::Glyph::ideogram 3pm" .TH Bio::Graphics::Glyph::ideogram 3pm "2018-09-21" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::Graphics::Glyph::ideogram \- The "ideogram" glyph .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& See L and L. .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This glyph draws a section of a chromosome ideogram. It relies on certain data from the feature to determine which color should be used (stain) and whether the segment is a telomere or centromere or a regular cytoband. The centromeres and 'var'\-marked bands are rendered with diagonal black-on-white patterns if the \*(L"\-patterns\*(R" option is true, otherwise they are rendered in dark gray. This is to prevent a libgd2 crash on certain 64\-bit platforms when rendering patterned images. .PP The cytobandband features would typically be formatted like this in \s-1GFF3:\s0 .PP .Vb 6 \& ... \& ChrX UCSC cytoband 136700001 139000000 . . . Parent=ChrX;Name=Xq27.1;Alias=ChrXq27.1;stain=gpos75; \& ChrX UCSC cytoband 139000001 140700000 . . . Parent=ChrX;Name=Xq27.2;Alias=ChrXq27.2;stain=gneg; \& ChrX UCSC cytoband 140700001 145800000 . . . Parent=ChrX;Name=Xq27.3;Alias=ChrXq27.3;stain=gpos100; \& ChrX UCSC cytoband 145800001 153692391 . . . Parent=ChrX;Name=Xq28;Alias=ChrXq28;stain=gneg; \& ChrY UCSC cytoband 1 1300000 . . . Parent=ChrY;Name=Yp11.32;Alias=ChrYp11.32;stain=gneg; \& \& which in this case is a GFF\-ized cytoband coordinate file from UCSC: \& \& http://hgdownload.cse.ucsc.edu/goldenPath/hg16/database/cytoBand.txt.gz \& \& and the corresponding GBrowse config options would be like this to \& create an ideogram overview track for the whole chromosome: \& \& The \*(Aqchromosome\*(Aq feature below would aggregated from bands and centromere using the default \& chromosome aggregator \& \& [CYT:overview] \& feature = chromosome \& glyph = ideogram \& fgcolor = black \& bgcolor = gneg:white gpos25:silver gpos50:gray \& gpos:gray gpos75:darkgray gpos100:black acen:cen gvar:var \& arcradius = 6 \& height = 25 \& bump = 0 \& label = 0 \& \& A script to reformat UCSC annotations to GFF3 format can be found at \& the end of this documentation. .Ve .SS "\s-1OPTIONS\s0" .IX Subsection "OPTIONS" The following options are standard among all Glyphs. See Bio::Graphics::Glyph for a full explanation. .PP .Vb 2 \& Option Description Default \& \-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\- \& \& \-fgcolor Foreground color black \& \& \-outlinecolor Synonym for \-fgcolor \& \& \-linewidth Line width 1 \& \& \-height Height of glyph 10 \& \& \-font Glyph font gdSmallFont \& \& \-connector Connector type 0 (false) \& \& \-connector_color \& Connector color black \& \& \-label Whether to draw a label 0 (false) \& \& \-description Whether to draw a description 0 (false) .Ve .PP The following options are specific to the ideogram glyph. .PP .Vb 2 \& Option Description Default \& \-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\- \& \& \-bgcolor Band coloring string none \& \& \-bgfallback Coloring to use when no bands yellow \& are present .Ve .PP \&\fB\-bgcolor\fR is used to map each chromosome band's \*(L"stain\*(R" attribute into a color or pattern. It is a string that looks like this: .PP .Vb 2 \& gneg:white gpos25:silver gpos50:gray \e \& gpos:gray gpos75:darkgray gpos100:black acen:cen gvar:var .Ve .PP This is saying to use \*(L"white\*(R" for features whose stain attribute is \&\*(L"gneg\*(R", \*(L"silver\*(R" for those whose stain attribute is \*(L"gpos25\*(R", and so on. Several special values are recognized: "\fBstalk\fR\*(L" draws a narrower gray region and is usually used to indicate an acrocentric stalk. \*(R"\fBvar\fR\*(L" creates a diagonal black-on-white pattern. \*(R"\fBcen\fR" draws a centromere. .PP If \-bgcolor is just a color name, like \*(L"yellow\*(R", the glyph will ignore all bands and just draw a filled in chromosome. .PP If \-bgfallback is set to a color name or value, then the glyph will fall back to the indicated background color if the chromosome contains no bands. .SH "UCSC TO GFF CONVERSION SCRIPT" .IX Header "UCSC TO GFF CONVERSION SCRIPT" The following short script can be used to convert a \s-1UCSC\s0 cytoband annotation file into \s-1GFF\s0 format. If you have the lynx web-browser installed you can call it like this in order to download and convert the data in a single operation: .PP .Vb 1 \& fetchideogram.pl http://hgdownload.cse.ucsc.edu/goldenPath/hg18/database/cytoBand.txt.gz .Ve .PP Otherwise you will need to download the file first. Note the difference between this script and input data from previous versions of ideogram.pm: \s-1UCSC\s0 annotations are used in place of \s-1NCBI\s0 annotations. .PP #!/usr/bin/perl .PP use strict; my \f(CW%stains\fR; my \f(CW%centros\fR; my \f(CW%chrom_ends\fR; .PP foreach (@ARGV) { if (/^(ftp|http|https):/) { \f(CW$_\fR = \*(L"lynx \-\-dump \f(CW$_\fR |gunzip \-c|\*(R"; } elsif (/\e.gz$/) { \f(CW$_\fR = \*(L"gunzip \-c \f(CW$_\fR |\*(R"; } print \s-1STDERR\s0 \*(L"Processing \f(CW$_\fR\en\*(R"; } .PP print \*(L"##gff\-version 3\en\*(R"; while(<>) { chomp; my($chr,$start,$stop,$band,$stain) = split /\et/; \f(CW$start\fR++; \f(CW$chr\fR = ucfirst($chr); if(!(exists($chrom_ends{$chr})) || \f(CW$chrom_ends\fR{$chr} < \f(CW$stop\fR) { \f(CW$chrom_ends\fR{$chr} = \f(CW$stop\fR; } my ($arm) = \f(CW$band\fR =~ /(p|q)\ed+/; \f(CW$stains\fR{$stain} = 1; if ($stain eq 'acen') { \f(CW$centros\fR{$chr}\->{$arm}\->{start} = \f(CW$stop\fR; \f(CW$centros\fR{$chr}\->{$arm}\->{stop} = \f(CW$start\fR; next; } \f(CW$chr\fR =~ s/chr//i; print qq/$chr\etUCSC\etcytoband\et$start\et$stop\et.\et.\et.\etParent=$chr;Name=$chr;Alias=$chr$band;stain=$stain;\en/; } .PP foreach my \f(CW$ch\fRr(sort keys \f(CW%chrom_ends\fR) { my \f(CW$chr_orig\fR = \f(CW$chr\fR; \f(CW$chr\fR =~ s/chr//i; print qq/$chr\etUCSC\etcentromere\et$centros{$chr_orig}\->{p}\->{stop}\et$centros{$chr_orig}\->{q}\->{start}\et.\et+\et.\etParent=$chr;Name=$chr\e_cent\en/; } .SH "BUGS" .IX Header "BUGS" Please report them. .SH "SEE ALSO" .IX Header "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::triangle, Bio::DB::GFF, Bio::SeqI, Bio::SeqFeatureI, Bio::Das, \&\s-1GD\s0 .SH "AUTHOR" .IX Header "AUTHOR" Gudmundur A. Thorisson .PP Copyright (c) 2001\-2006 Cold Spring Harbor Laboratory .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" Sheldon McKay .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See \s-1DISCLAIMER\s0.txt for disclaimers of warranty.