coordinate-mapping-method: Map range coordinates between transcripts and genome space

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Map range coordinates between features in the transcriptome and genome (reference) space.

See ?mapToAlignments in the GenomicAlignments package for mapping coordinates between reads (local) and genome (reference) space using a CIGAR alignment.

Usage

1
2
3
4
## S4 method for signature 'ANY,MultiDb'
mapToTranscripts(x, transcripts,
          ignore.strand = TRUE,
          extractor.fun = GenomicFeatures::transcripts, ...) 

Arguments

x

GRanges-class object of positions to be mapped. x must have names when mapping to the genome.

transcripts

The OrganismDb object that will be used to extract features using the extractor.fun.

ignore.strand

When TRUE, strand is ignored in overlap operations.

extractor.fun

Function to extract genomic features from a TxDb object.

Valid extractor functions:

  • transcripts ## default

  • exons

  • cds

  • genes

  • promoters

  • disjointExons

  • microRNAs

  • tRNAs

  • transcriptsBy

  • exonsBy

  • cdsBy

  • intronsByTranscript

  • fiveUTRsByTranscript

  • threeUTRsByTranscript

...

Additional arguments passed to extractor.fun functions.

Details

Value

An object the same class as x.

Parallel methods return an object the same shape as x. Ranges that cannot be mapped (out of bounds or strand mismatch) are returned as zero-width ranges starting at 0 with a seqname of "UNMAPPED".

Non-parallel methods return an object that varies in length similar to a Hits object. The result only contains mapped records, strand mismatch and out of bound ranges are not returned. xHits and transcriptsHits metadata columns indicate the elements of x and transcripts used in the mapping.

When present, names from x are propagated to the output. When mapping to transcript coordinates, seqlevels of the output are the names on the transcripts object; most often these will be transcript names. When mapping to the genome, seqlevels of the output are the seqlevels of transcripts which are usually chromosome names.

Author(s)

V. Obenchain, M. Lawrence and H. Pagès; ported to work with OrganismDbi by Marc Carlson

See Also

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## ---------------------------------------------------------------------
## A. Basic Use
## ---------------------------------------------------------------------

library(Homo.sapiens)
x <- GRanges("chr5", 
             IRanges(c(173315331,174151575), width=400, 
                     names=LETTERS[1:2])) 

## Map to transcript coordinates:
mapToTranscripts(x, Homo.sapiens)

OrganismDbi documentation built on Nov. 8, 2020, 5:50 p.m.