Description Usage Arguments Value Author(s) Examples
View source: R/getFeatureRanges.R
Generate a GRangesList object with genomic ranges for (any combination of) spliced transcripts, unspliced transcripts and introns.
1 2 3 4 5 6 7 8 | getFeatureRanges(
gtf,
featureType = c("spliced", "intron"),
intronType = "separate",
flankLength = 90L,
joinOverlappingIntrons = FALSE,
verbose = TRUE
)
|
gtf |
Path to gtf file. |
featureType |
Character vector indicating the type(s) of features to
extract, any subset of |
intronType |
Character vector indicating how to define the introns
(only used if "intron" is part of |
flankLength |
Integer scalar indicating the length of the flanking
sequence added to each side of each extracted intron (only used if
"intron" is included in |
joinOverlappingIntrons |
Logical scalar indicating whether two introns that overlap (after adding the flanking sequences) should be joined into one feature. |
verbose |
Logical scalar, whether to print out progress messages. |
Returns a GRangesList
object where each element represents
one extracted feature. The metadata of this object contains two
data.frame
s mapping corresponding identifiers between the
different feature types, as well as a list of all features for each type.
Charlotte Soneson
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ## Get feature ranges
grl <- getFeatureRanges(
gtf = system.file("extdata/small_example.gtf", package = "eisaR"),
featureType = c("spliced", "intron"),
intronType = "separate",
flankLength = 5L,
joinOverlappingIntrons = FALSE,
verbose = TRUE
)
## GRangesList
grl
## Corresponding transcript/gene IDs
S4Vectors::metadata(grl)$corrtx
S4Vectors::metadata(grl)$corrgene
## List of features of different types
S4Vectors::metadata(grl)$featurelist
## Get feature sequences
if (requireNamespace("BSgenome", quietly = TRUE)) {
library(BSgenome)
genome <- Biostrings::readDNAStringSet(
system.file("extdata/small_example_genome.fa", package = "eisaR"))
seqs <- GenomicFeatures::extractTranscriptSeqs(x = genome,
transcripts = grl)
seqs
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.