proteins,EnsDb-method {ensembldb} | R Documentation

## Protein related functionality

### Description

This help page provides information about most of the functionality related to protein annotations in `ensembldb`.

The `proteins` method retrieves protein related annotations from an `EnsDb` database.

The `listUniprotDbs` method lists all Uniprot database names in the `EnsDb`.

The `listUniprotMappingTypes` method lists all methods that were used for the mapping of Uniprot IDs to Ensembl protein IDs.

The `listProteinColumns` function allows to conveniently extract all database columns containing protein annotations from an `EnsDb` database.

### Usage

    ## S4 method for signature 'EnsDb'
    proteins(
      object,
      columns = listColumns(object, "protein"),
      filter = AnnotationFilterList(),
      order.by = "",
      order.type = "asc",
      return.type = "DataFrame"
    )

    ## S4 method for signature 'EnsDb'
    listUniprotDbs(object)

    ## S4 method for signature 'EnsDb'
    listUniprotMappingTypes(object)

    listProteinColumns(object)

### Arguments

`object` | The `EnsDb` object.
`columns` | For `proteins`: character vector defining the columns to be extracted from the database. Can be any column(s) listed by the `listColumns` method.
`filter` | For `proteins`: A filter object extending `AnnotationFilter` or a list of such objects to select specific entries from the database. See `Filter-classes` for a documentation of available filters and use `supportedFilters` to get the full list of supported filters.
`order.by` | For `proteins`: a character vector specifying the column(s) by which the result should be ordered.
`order.type` | For `proteins`: if the results should be ordered ascending (`order.type = "asc"`) or descending (`order.type = "desc"`)
`return.type` | For `proteins`: character of lenght one specifying the type of the returned object. Can be either `"DataFrame"`, `"data.frame"` or `"AAStringSet"`.

### Details

The `proteins` method performs the query starting from the `protein` tables and can hence return all annotations from the database that are related to proteins and transcripts encoding these proteins from the database. Since `proteins` does thus only query annotations for protein coding transcripts, the `genes` or `transcripts` methods have to be used to retrieve annotations for non-coding transcripts.

### Value

The `proteins` method returns protein related annotations from an `EnsDb` object with its `return.type` argument allowing to define the type of the returned object. Note that if `return.type = "AAStringSet"` additional annotation columns are stored in a `DataFrame` that can be accessed with the `mcols` method on the returned object.

The `listProteinColumns` function returns a character vector with the column names containing protein annotations or throws an error if no such annotations are available.

### Author(s)

Johannes Rainer

### Examples

    library(ensembldb)
    library(EnsDb.Hsapiens.v86)
    edb <- EnsDb.Hsapiens.v86
    ## Get all proteins from tha database for the gene ZBTB16, if protein
    ## annotations are available
    if (hasProteinData(edb))
        proteins(edb, filter = GeneNameFilter("ZBTB16"))

    ## List the names of all Uniprot databases from which Uniprot IDs are
    ## available in the EnsDb
    if (hasProteinData(edb))
        listUniprotDbs(edb)

    ## List the type of all methods that were used to map Uniprot IDs to Ensembl
    ## protein IDs
    if (hasProteinData(edb))
        listUniprotMappingTypes(edb)

    ## List all columns containing protein annotations
    library(EnsDb.Hsapiens.v86)
    edb <- EnsDb.Hsapiens.v86
    if (hasProteinData(edb))
        listProteinColumns(edb)

[Package ensembldb version 2.10.2 Index]