Package 'tRNAscanImport'

Title: Importing a tRNAscan-SE result file as GRanges object
Description: The package imports the result of tRNAscan-SE as a GRanges object.
Authors: Felix G.M. Ernst [aut, cre]
Maintainer: Felix G.M. Ernst <[email protected]>
License: GPL-3 + file LICENSE
Version: 1.27.0
Built: 2024-10-31 06:28:35 UTC
Source: https://github.com/bioc/tRNAscanImport

Help Index


Get tRNA precursor sequences

Description

get.tRNAprecursor retrieves tRNA precursor sequences from genomic sequences. The length of 5'- and 3'-overhangs can be specifid individually. The output is checked for validity against the tRNA sequences as reported by tRNAscan.

The chromosomes names of tRNAscan input and genome sequences must be compatible.

Usage

get.tRNAprecursor(
  input,
  genome,
  add.5prime = 50L,
  add.3prime = add.5prime,
  trim.intron = FALSE
)

Arguments

input

a compatible GRanges object

genome

a BSgenome object, a DNAStringSet object, a FaFile object or a character vector with a single value referncing a file, which can be coerced to a FaFile object.

add.5prime, add.3prime

the length of overhangs as a single integer value each. (default add.5prime = 50L)

trim.intron

TRUE or FALSE: Should intron sequences be included in the precursor sequences? (default trim.intron = FALSE)

Value

a DNAStringSet object, containing the precursor sequences.

Examples

library(BSgenome.Scerevisiae.UCSC.sacCer3)
file <- system.file("extdata",
                    file = "yeast.tRNAscan",
                    package = "tRNAscanImport")
gr <- tRNAscanImport::import.tRNAscanAsGRanges(file)
genome <- getSeq(BSgenome.Scerevisiae.UCSC.sacCer3)
names(genome) <- c(names(genome)[-17],"chrmt")
get.tRNAprecursor(gr, genome)
# this produces an error since the seqnames do not match
## Not run: 
genome <- BSgenome.Scerevisiae.UCSC.sacCer3
names(genome) <- c(names(genome)[-17],"chrmt")
get.tRNAprecursor(gr, genome)

## End(Not run)
# ... but it can also be fixed
genome <- BSgenome.Scerevisiae.UCSC.sacCer3
seqnames(genome) <- c(seqnames(genome)[-17],"chrmt")
get.tRNAprecursor(gr, genome)

Importing a tRNAscan output file as a GRanges object

Description

The function import.tRNAscanAsGRanges will import a tRNAscan-SE output file and return the information as a GRanges object. The reported intron sequences are spliced from the result by default, but can also returned as imported.

The function tRNAScan2GFF formats the output of import.tRNAscanAsGRanges to be GFF3 compliant.

tRNAscanID generates a unique tRNA ID, which is like the format used in the SGD annotation

t*AminoAcidSingleLetter*(*Anticodon*)*ChromosomeIdentifier**optionalNumberIfOnTheSameChromosome*

Example: tP(UGG)L or tE(UUC)E1.

Usage

import.tRNAscanAsGRanges(input, as.GFF3 = FALSE, trim.intron = TRUE)

tRNAscan2GFF(input)

tRNAscanID(input)

Arguments

input
  • import.tRNAscanAsGRanges: a tRNAscan-SE input file

  • tRNAscan2GFF: a compatible GRanges object such as the output of import.tRNAscanAsGRanges

as.GFF3

optional logical for import.tRNAscanAsGRanges: returns a gff3 compatible GRanges object directly. (default: as.GFF3 = FALSE)

trim.intron

optional logical for import.tRNAscanAsGRanges: remove intron sequences. This changes the tRNA length reported. To retrieve the original length fo the tRNA gene, use the width() function on the GRanges object. (default: trim.intron = TRUE)

Value

a GRanges object

References

Chan, Patricia P., and Todd M. Lowe. 2016. “GtRNAdb 2.0: An Expanded Database of Transfer Rna Genes Identified in Complete and Draft Genomes.” Nucleic Acids Research 44 (D1): D184–9. doi:10.1093/nar/gkv1309.

Lowe, T. M., and S. R. Eddy. 1997. “TRNAscan-Se: A Program for Improved Detection of Transfer Rna Genes in Genomic Sequence.” Nucleic Acids Research 25 (5): 955–64.

Examples

gr <- import.tRNAscanAsGRanges(system.file("extdata", 
                               file = "yeast.tRNAscan", 
                               package = "tRNAscanImport"))
gff <- tRNAscan2GFF(gr)
identical(gff,import.tRNAscanAsGRanges(system.file("extdata", 
                               file = "yeast.tRNAscan", 
                               package = "tRNAscanImport"),
                               as.GFF3 = TRUE))

tRNAscan compatibility check

Description

istRNAscanGRanges checks whether a GRanges object contains the information expected for a tRNAscan result.

Usage

istRNAscanGRanges(gr)

## S4 method for signature 'GRanges'
istRNAscanGRanges(gr)

Arguments

gr

the GRanges object to test

Value

a logical value

Examples

file <- system.file("extdata", 
                    file = "yeast.tRNAscan", 
                    package = "tRNAscanImport")
gr <- tRNAscanImport::import.tRNAscanAsGRanges(file)
istRNAscanGRanges(gr)

tRNAscanImport: Importing tRNAscan-SE output as GRanges

Description

tRNAscan-SE can be used for prediction of tRNA genes in whole genomes based on sequence context and calculated structural features. Many tRNA annotations in genomes contain or are based on information generated by tRNAscan-SE, for example the current SGD reference genome sacCer3 for Saccharomyces cerevisiae. However, not all available information from tRNAscan-SE end up in the genome annotation. Among these are for example structural information, additional scores and the information, whether the conserved CCA-end is encoded in the genomic DNA. To work with this complete set of information, the tRNAscan-SE output can be parsed into a more accessible GRanges object using 'tRNAscanImport'.

Manual

Please refer to the tRNAscanImport vignette for an example how to work and use the package: tRNAscanImport

Author(s)

Felix G M Ernst [aut]

References

Chan, Patricia P., and Todd M. Lowe. 2016. “GtRNAdb 2.0: An Expanded Database of Transfer Rna Genes Identified in Complete and Draft Genomes.” Nucleic Acids Research 44 (D1): D184–189.. doi:10.1093/nar/gkv1309.

Lowe, T. M., and S. R. Eddy. 1997. “TRNAscan-Se: A Program for Improved Detection of Transfer Rna Genes in Genomic Sequence.” Nucleic Acids Research 25 (5): 955–964.