txSeqsFromFa: Get transcript sequence from a GRangesList and a faFile or...

View source: R/ranges_helpers.R

txSeqsFromFaR Documentation

Get transcript sequence from a GRangesList and a faFile or BSgenome

Description

For each GRanges object, find the sequence of it from faFile or BSgenome.

Usage

txSeqsFromFa(grl, faFile, is.sorted = FALSE, keep.names = TRUE)

Arguments

grl

a GRangesList object

faFile

FaFile, BSgenome, fasta/index file path or an ORFik experiment. This file is usually used to find the transcript sequences from some GRangesList.

is.sorted

a speedup, if you know the grl ranges are sorted

keep.names

a logical, default (TRUE), if FALSE: return as character vector without names.

Details

A wrapper around extractTranscriptSeqs that works for DNAStringSet and ORFik experiment input. For debug of errors do: which(!(unique(seqnamesPerGroup(grl, FALSE)) This happens usually when the grl contains chromsomes that the fasta file does not have. A normal error is that mitocondrial chromosome is called MT vs chrM even though they have same seqlevelsStyle. The above line will give you which chromosome it is missing.

Value

a DNAStringSet of the transcript sequences

See Also

Other ExtendGenomicRanges: asTX(), coveragePerTiling(), extendLeaders(), extendTrailers(), reduceKeepAttr(), tile1(), windowPerGroup()


JokingHero/ORFik documentation built on Dec. 21, 2024, 12:01 a.m.