FREND(1p)
πΈ NAME πΈ
okay bestie, welcome to frend.pl (that's the FREND(1p) page, if you're keeping track) β it renders a Bio::Graphics Feature File on the web π
β¨ SYNOPSIS β¨
http://your.host.com/cgi-bin/frend.pl
π¦ DESCRIPTION π¦
So frend.pl is literally just a thin little front end wrapped around the Bio::Graphics module. That's the whole vibe. π«Ά
It takes a list of files containing sequence (protein, nucleotide) feature coordinates β from the files you list on the command line or from standard input β renders them, and then produces a PNG file on standard output. Iconic. π
π INSTALLATION π
Copy this script into your web site's cgi-bin directory. Name it literally whatever you want, it's your world π
π FEATURE FILES FORMAT π
This script accepts and processes sequence annotations in a simple tab-delimited format or in GFF format.
The feature file format has a configuration section and a data section. The configuration section sets up the size and overall properties of the image, and the data section gives the feature data itself.
π§ Configuration Section π§
If not provided, this scripts generates a reasonable default configuration section for you, so you do not need to provide a configuration section to get a reasonable image. But like β if you want to tune the appearance of the image, you will probably want to tweak the configuration. Here's an excerpt from the configuration section:
# example file
[general]
bases = -1000..21000
height = 12
[EST]
glyph = segments
bgcolor= yellow
connector = solid
height = 5
[FGENES]
glyph = transcript2
bgcolor = green
description = 1
The configuration section is divided into a set of sections, each one labeled with a [section title]. The [general] section specifies global options for the entire image. Other sections apply to particular feature types. In the example above, the configuration in the [EST] section applies to features labeled as ESTs, while the configuration in the [FGENES] section applies to features labeled as predictions from the FGENES gene prediction program.
Inside each section is a series of name=value pairs, where the name is the name of an option to set. You can put whitespace around the = sign to make it more readable, or even use a colon (:) if you prefer. The following option names are recognized:
basesβ Min & max of the sequence range (bp). Example:1200..60000widthβ width of the image (pixels). Example:600heightβ Height of each graphical element (pixels). Example:10glyphβ Style of each graphical element (see below). Example:transcriptfgcolorβ Foreground color of each element. Example:yellowbgcolorβ Background color of each element. Example:bluelinewidthβ Width of lines. Example:3labelβ Print the feature's name. Example:1descriptionβ Whether to print the feature's description. Example:0bumpβ Elements are not allowed to collide. Example:1ticksβ Print tick marks on arrows. Example:1connectorβ Type of group connector (dashed,hatorsolid). Example:dashed
The bases and width options are only relevant in the [general] section. They are overridden by the like-named command-line options.
The remainder of the options can be located in any section, but if present in the [general] section will set defaults for the others.
Colors are English-language color names or Web-style #RRGGBB colors (see a book on HTML for an explanation). True/false values are 1 for true, and 0 for false. Numeric ranges can be expressed in start..end fashion with two dots, or as start-end with a hyphen.
The glyph option controls how the features are rendered. The following glyphs are implemented:
boxβ A filled rectangle, nondirectional.ellipseβ An oval.arrowβ An arrow; can be unidirectional or bidirectional. It is also capable of displaying a scale with major and minor tickmarks, and can be oriented horizontally or vertically.segmentsβ A set of filled rectangles connected by solid lines. Used for interrupted features, such as gapped alignments and exon groups.transcriptβ Similar to segments, but the connecting line is a "hat" shape, and the direction of transcription is indicated by a small arrow.transcript2β Similar to transcript, but the direction of transcription is indicated by a terminal segment in the shape of an arrow.primersβ Two inward pointing arrows connected by a line. Used for STSs.
The bump option is the most important option for controlling the look of the image, no cap. If set to false (the number 0), then the features are allowed to overlap. If set to true (the number 1), then the features will move vertically to avoid colliding. If not specified, bump is turned on if the number of any given type of sequence feature is greater than 50. π
π Data Section π
The data section can follow or proceed the configuration section. The two sections can also be intermixed. The data section is a tab or whitespace-delimited file which you can export from a spreadsheet application or word processor file (be sure to save as text only!)
Here is an example data section:
Cosmid B0511 . 516-619 Cosmid B0511 .
3185-3294 Cosmid B0511 . 10946-11208 Cosmid B0511
. 13126-13511 Cosmid B0511 . 66-208 Cosmid
B0511 . 6354-6499 Cosmid B0511 .
13955-14115 EST yk595e6.5 + 3187-3294 EST
yk846e07.3 - 11015-11208 EST yk53c10
yk53c10.5 + 18892-19154
yk53c10.3 - 15000-15500,15700-15800 EST
yk53c10.5 + 16032-16105 SwissProt PECANEX +
13153-13656 Swedish fish FGENESH "Gene 1" -
1-205,518-616,661-735,3187-3365,3436-3846 Transmembrane domain
FGENESH "Gene 2" - 16626-17396,17451-17597 Kinase and sushi
domains
Each line of the file contains five columns. The columns are:
- Column 1 β feature type
- Column 2 β feature name
- Column 3 β strand
- Column 4 β coordinates
- Column 5 β description
π Feature type π
The feature type should correspond to one of the [feature type] headings in the configuration section. If it doesn't, the [general] options will be applied to the feature when rendering it. The feature name is a name for the feature. Use a . or - if this is not relevant. If the name contains whitespace, put single or double quotes ("") around the name.
π Strand π
The strand indicates which strand the feature is on. It is one of + for the forward strand, - for the reverse strand, or . for features that are not stranded.
π Coordinates π
The coordinates column is a set of one or more ranges that the feature occupies. Ranges are written using .. as in start..stop, or with hyphens, as in start-stop. For features that are composed of multiple ranges β for example transcripts that have multiple exons β you can either put the ranges on the same line separated by commas or spaces, or put the ranges on individual lines and just use the same feature name and type to group them. In the example above, the Cosmid B0511 features use the individual line style, while the FGENESH features use the all-ranges-on-one-line style.
π Description π
The last column contains some descriptive text. If the description option is set to true, this text will be printed underneath the feature in the rendering.
Finally, it is possible to group related features together. An example is the ESTs yk53c10.5 and yk53c10.3, which are related by being reads from the two ends of the clone yk53c10. To indicate this relationship, generate a section that looks like this:
EST yk53c10
yk53c10.5 + 18892-19154
yk53c10.3 - 15000-15500,15700-15800
The group is indicated by a line that contains just two columns containing the feature type and a unique name for the group. Follow this line with all the features that form the group, but leave the first column (the feature type) blank. The group will be rendered by drawing a dashed line between all the members of the group. You can change this by specifying a different connector option in the configuration section for this feature type. π₯
π BUGS π
Please report them to the author.
π SEE ALSO π
Bio::Graphics, feature_draw.pl
π«Ά AUTHOR π«Ά
Lincoln Stein, lstein@cshl.org
and that's the whole page, bestie π this wasperl v5.30.0, dated2019-11-25, and yeah it's theFREND(1p)manual. go render something pretty πβ¨
π¦ where this page comes from
- debian bookworm: libbio-graphics-perl 2.40-6 Β· Perl
- debian trixie: libbio-graphics-perl 2.40-6 Β· Perl
- ubuntu jammy: libbio-graphics-perl 2.40-6 Β· Perl
- ubuntu noble: libbio-graphics-perl 2.40-6 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms