The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

get_gene_regions.pl

A script to collect specific, often un-annotated regions from genes.

SYNOPSIS

get_gene_regions.pl [--options...] --in <filename> --out <filename>

get_gene_regions.pl [--options...] --db <text> --out <filename>

  Options:
  --in <filename>  (gff,gtf,gff3,refFlat,genePred,knownGene)
  --db <text>
  --out <filename> 
  --feature <type | type:source>
  --transcript [all|mRNA|ncRNA|snRNA|snoRNA|tRNA|rRNA|miRNA|lincRNA|misc_RNA]
  --region [tss|tts|cdsStart|cdsStop|splice|UTR|exon|collapsedExon|
            altExon|uncommonExon|commonExon|firstExon|lastExon|
            intron|collapsedIntron|altIntron|uncommonIntron|commonIntron|
            firstIntron|lastIntron]
  --start=<integer>
  --stop=<integer>
  --unique
  --slop <integer>
  --tsl [best|best1|best2|best3|best4|best5|1|2|3|4|5|NA]
  --bed
  --gz
  --version
  --help

OPTIONS

The command line flags and descriptions:

--in <filename>

Provide a gene table or annotation file, including GTF, GFF, GFF3, UCSC refFlat, UCSC genePred or genePredExt, or UCSC knownGene table. Files may be gzipped.

--db <text>

Specify the name of a Bio::DB::SeqFeature::Store annotation database from which gene or feature annotation may be obtained. Only required if an input gene table is not provided.

--out <filename>

Specify the output filename.

--feature <type | type:source>

Specify the parental gene feature type (primary_tag) or type:source when using a database. If not specified, a list of available types will be presented interactively to the user for selection. This is not relevant for GFF3 source files (all gene or transcript features are considered). This is helpful when gene annotation from multiple sources are present in the same database, e.g. refSeq and ensembl sources. More than one feature may be included, either as a comma-delimited list or multiple options.

--transcript [all|mRNA|ncRNA|snRNA|snoRNA|tRNA|rRNA|miRNA|lincRNA|misc_RNA]

Specify the transcript type (usually a gene subfeature) from which to collect the regions. Multiple types may be specified as a comma-delimited list, or 'all' may be specified. If not specified, an interactive list will be presented from which the user may select.

--region <region>

Specify the type of region to retrieve. If not specified on the command line, the list is presented interactively to the user for selection. The possibilities are listed below.

  tss           The first base of transcription
  tts           The last base of transcription
  exon          The exons of each transcript
  collapsedExon The exons after collapsing all gene transcripts
  firstExon     The first exon of each transcript
  lastExon      The last exon of each transcript
  altExon       Exons unique to one of several transcripts from a gene
  uncommonExon  Exons shared by 2 or more but not all transcripts
  commonExon    Exons shared by all transcripts from a gene
  intron        Each intron (usually not defined in the GFF3)
  collapsedIntron Introns after collapsing all gene transcripts
  firstIntron   The first intron of each transcript
  lastIntron    The last intron of each transcript
  altIntron     Introns unique to one of several transcripts from a gene
  uncommonIntron Introns shared by 2 or more but not all transcripts
  commonIntron  Introns shared by all transcripts of a gene
  splice        The first and last base of each intron
  UTR           The untranslated regions of each coding transcript
  cdsStart      The first base of the CDS
  cdsStop       The last base of the CDS
--start=<integer>
--stop=<integer>

Optionally specify adjustment values to adjust the reported start and end coordinates of the collected regions. A negative value is shifted upstream (5' direction), and a positive value is shifted downstream. Adjustments are made relative to the feature's strand, such that a start adjustment will always modify the feature's 5'end, either the feature startpoint or endpoint, depending on its orientation.

--unique

Compare start and stop coordinates of each collected region from each feature and remove duplicate regions. When the --slop option is provided, only the start coordinate plus/minus the slop factor is checked.

--slop <integer>

When identifying unique regions, specify the number of bp to add and subtract to the start position (the slop or fudge factor) of the regions when considering duplicates. Any other region within this window will be considered a duplicate. Useful, for example, when start sites of transcription are not precisely mapped, but not useful with defined introns and exons. This does not take into consideration transcripts from other genes, only the current gene. The default is 0 (no sloppiness).

--tsl <level>

Filter transcripts on the Ensembl GTF/GFF3 attribute 'transcript_support_level', which is described at Ensembl TSL glossary entry. Provide a level of support to filter. Values include:

    1       All splice junctions supported by evidence
    2       Transcript flagged as suspect or only support from multiple ESTs
    3       Only support from single EST
    4       Best supporting EST is suspect
    5       No support
    best    Transcripts at the best (lowest) available level are taken
    best1   The word followed by a digit 1-5, indicating any transcript 
            at or better (lower) than the indicated level
    NA      Only transcripts without a level (NA) are retained.
--bed

Automatically convert the output file to a BED file.

--gz

Specify whether (or not) the output file should be compressed with gzip.

--version

Print the version number.

--help

Display this POD documentation.

DESCRIPTION

This program will collect specific regions from annotated genes and/or transcripts. Often these regions are not explicitly defined in the source GFF3 annotation, necessitating a script to pull them out. These regions include the start and stop sites of transcription, introns, the splice sites (both 5' and 3'), exons, the first (5') or last (3') exons, or all alternate or common exons of genes with multiple transcripts. Importantly, unique regions may only be reported, especially important when a single gene may have multiple alternative transcripts. A slop factor is included for imprecise annotation.

The program will report the chromosome, start and stop coordinates, strand, name, and parent and transcript names for each region identified. The reported start and stop sites may be adjusted with modifiers. A standard biotoolbox data formatted text file is generated. This may be converted into a standard BED or GFF file using the appropriate biotoolbox scripts. The file may also be used directly in data collection.

AUTHOR

 Timothy J. Parnell, PhD
 Howard Hughes Medical Institute
 Dept of Oncological Sciences
 Huntsman Cancer Institute
 University of Utah
 Salt Lake City, UT, 84112

This package is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.