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-11-30 05:37:09 UTC |
Source: | https://github.com/bioc/tRNAscanImport |
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.
get.tRNAprecursor( input, genome, add.5prime = 50L, add.3prime = add.5prime, trim.intron = FALSE )
get.tRNAprecursor( input, genome, add.5prime = 50L, add.3prime = add.5prime, trim.intron = FALSE )
input |
a compatible |
genome |
a |
add.5prime , add.3prime
|
the length of overhangs as a single integer
value each. (default |
trim.intron |
|
a DNAStringSet
object, containing the precursor sequences.
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)
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)
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.
import.tRNAscanAsGRanges(input, as.GFF3 = FALSE, trim.intron = TRUE) tRNAscan2GFF(input) tRNAscanID(input)
import.tRNAscanAsGRanges(input, as.GFF3 = FALSE, trim.intron = TRUE) tRNAscan2GFF(input) tRNAscanID(input)
input |
|
as.GFF3 |
optional logical for |
trim.intron |
optional logical for |
a GRanges object
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.
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))
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))
istRNAscanGRanges
checks whether a GRanges object contains the
information expected for a tRNAscan result.
istRNAscanGRanges(gr) ## S4 method for signature 'GRanges' istRNAscanGRanges(gr)
istRNAscanGRanges(gr) ## S4 method for signature 'GRanges' istRNAscanGRanges(gr)
gr |
the |
a logical value
file <- system.file("extdata", file = "yeast.tRNAscan", package = "tRNAscanImport") gr <- tRNAscanImport::import.tRNAscanAsGRanges(file) istRNAscanGRanges(gr)
file <- system.file("extdata", file = "yeast.tRNAscan", package = "tRNAscanImport") gr <- tRNAscanImport::import.tRNAscanAsGRanges(file) istRNAscanGRanges(gr)
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'.
Please refer to the tRNAscanImport vignette for an example how to work and use the package: tRNAscanImport
Felix G M Ernst [aut]
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.