Map range coordinates between peptide features along proteins and genome (reference) space.
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, ...)
character(1) specifying the name of the column in
character(1) indicating which metadata columns in
character(1) specifying the type of the IDs found in
Additional parameters passed to inner functions. Currently ignored.
mapToGenome maps the
pranges(x) to the ranges of
genome are of length 1,
both must be named and items of
x are matched to items of
genome using their respective names. Names that do not
genome are ignored. If we have
the names of the output will be
The output is ordered by (1)
seqnames(x) and (2) the order of
the elements in
In case less than
length(x) are mapped, as for
above, a message informs the user.
mapToGenome,Proteins,EnsDb maps each of the
pranges(x) ranges within the protein sequence to the
corresponding genomic coordinates using annotations provided by the
EnsDb object. To enable the mapping the
Proteins object has to provide IDs that can be used to
identify the encoding transcript. Such IDs can be the Ensembl
protein ID, the Uniprot ID or the Ensembl transcript ID. If a
protein is annotated to multiple transcripts, the function selects
the transcript which CDS length best matches the protein sequence
mapToGenome,Proteins,EnsDb method maps
all proteins in the
Proteins object to the genome. See
examples below for more details.
pmapToGenome is the element-wise (aka 'parallel')
mapToGenome. The i-th
pranges(x) is mapped
to the i-th range in
have the same length and do not need to be named (names are
GRangesList object, with names matching
pmapToGenome, the return value will
have the same length as the inputs.
Laurent Gatto, Johannes Rainer
?mapToAlignments in the
GenomicAlignments package for mapping coordinates between
reads (local) and genome (reference) space using a CIGAR
?mapToTranscripts in the
GenomicRanges package for mapping coordinates between features
in the transcriptome and genome space.
proteinCoding function to remove non-protein
coding ranges before mapping peptides to their genomic coordinates.
mapping vignette for examples and visualisations.
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[], pcgrl[]) mp <- mapToGenome(p, pcgrl) plotAsAnnotationTrack(mp[], pcgrl[]) 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.