get.tRNAprecursor: Get tRNA precursor sequences

Description Usage Arguments Value Examples

View source: R/tRNAscanImport-genome.R

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

1
2
3
4
5
6
7
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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)

tRNAscanImport documentation built on Nov. 8, 2020, 7:48 p.m.