coordinate-mapping-methods: Map range coordinates between proteins and genome space

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

Description

Map range coordinates between peptide features along proteins and genome (reference) space.

Usage

1
2
3
4
5
6
7
## S4 method for signature 'Proteins,GRangesList'
mapToGenome(x, genome, pcol, drop.empty.ranges = TRUE, ...)
## S4 method for signature 'Proteins,GRangesList'
pmapToGenome(x, genome, pcol, drop.empty.ranges = TRUE, ...)
## S4 method for signature 'Proteins,EnsDb'
mapToGenome(x, genome, pcol, id = "name", idType =
"protein_id", drop.empty.ranges = TRUE, ...)

Arguments

x

Proteins object containing peptides pranges to be mapped.

genome

A GRangesList object used to map between x and the result. The ranges are typically created by the etrid2grl function. Alternatively, an EnsDb object providing the required annotation for the mapping, i.e. the annotation of proteins to transcripts and the genomic coordinates of the transcripts' exons.

pcol

character(1) specifying the name of the column in pcols that contains the IRanges (ranges within the protein sequence) that should be mapped to the genome. If not specifyed the first column is used. If provided has to be one of pvarLabels.

drop.empty.ranges

TRUE (default) or FALSE. Should empty ranges be dropped?

id

character(1) indicating which metadata columns in x provide the (protein) IDs for the mapping of proteins to transcripts. Can be the name of any columns in acols(x) or "name" in which seqnames(x) will be used.

idType

character(1) specifying the type of the IDs found in id. Supported are "protein_id" (the Ensembl protein ID), "tx_id" (Ensembl transcript ID) or "uniprot_id" (Uniprot ID).

...

Additional parameters passed to inner functions. Currently ignored.

Details

Value

A named GRangesList object, with names matching names(genome). For pmapToGenome, the return value will have the same length as the inputs.

Author(s)

Laurent Gatto, Johannes Rainer

See Also

See plotAsAnnotationTrack and plotAsAnnotationTrack for more details about the two plotting functions.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
data(p)

grl <- etrid2grl(acols(p)$ENST)
pcgrl <- proteinCoding(grl)

plotAsGeneRegionTrack(grl[[1]],
                      pcgrl[[1]])

mp <- mapToGenome(p[4], pcgrl[4])

plotAsAnnotationTrack(mp[[1]], pcgrl[[4]])

pmapToGenome(p, pcgrl)

#######
## mapToGenome,Proteins,EnsDb
## load an EnsDb object providing the required annotations
library(EnsDb.Hsapiens.v86)
edb <- EnsDb.Hsapiens.v86

## Map the pranges of all proteins in p to the genome providing the proteins'
## Uniprot IDs (being the 'names' of the Proteins object) for the mapping.
mp <- mapToGenome(p, edb, id = "name", idType = "uniprot_id")

Pbase documentation built on May 2, 2018, 2:42 a.m.