get_IDtransfer_betweenSpecies: Create Data Frame for ID Conversion Between Species

View source: R/pipeline_functions.R

get_IDtransfer_betweenSpeciesR Documentation

Create Data Frame for ID Conversion Between Species

Description

get_IDtransfer_betweenSpecies creates a data frame to convert ID between species.

Usage

get_IDtransfer_betweenSpecies(
  from_spe = "human",
  to_spe = "mouse",
  from_type = NULL,
  to_type = NULL,
  use_genes = NULL,
  useCache = TRUE
)

Arguments

from_spe

character, name of the original species (e.g. "human", "mouse", "rat") that use_genes belongs to. Default is "human".

to_spe

character, name of the target species (e.g. "human", "mouse", "rat"). Default is "mouse".

from_type

character, the attribute name match the current ID type (the type of use_genes). Such as "ensembl_gene_id", "ensembl_gene_id_version", "ensembl_transcript_id", "ensembl_transcript_id_version" or "refseq_mrna". The "attribute" is inherited from the biomaRt package. For details, user can call biomaRt::listAttributes() function to display all available attributes in the selected dataset.

to_type

character, the attribute name match the target ID type.

use_genes

a vector of characters, the genes for ID conversion. Must be the genes with ID type of from_type, and from species from_spe. If NULL, all the possible genes will be shown in the conversion table. Default is NULL.

useCache

Boolean, parameter pass to getBM() indicating whether the results cache should be used. Setting to FALSE will disable reading and writing of the cache.

Value

Return a data frame for ID conversion, from one species to another.

Examples

use_genes <- c("ENST00000210187","ENST00000216083","ENST00000216127",
             "ENST00000216416","ENST00000217233","ENST00000221418")
transfer_tab <- get_IDtransfer_betweenSpecies(from_spe='human',
                               to_spe='mouse',
                               from_type = 'ensembl_transcript_id',
                               to_type='external_gene_name',
                               use_genes=use_genes)
                               ## get transfer table !!!
transfer_tab <- get_IDtransfer_betweenSpecies(from_spe='human',
                               to_spe='mouse',
                               from_type = 'ensembl_transcript_id',
                               to_type='ensembl_transcript_id_version',
                               use_genes=use_genes)
                               ## get transfer table !!!
## Not run: 
transfer_tab <- get_IDtransfer_betweenSpecies(from_spe='human',
                               to_spe='mouse',
                               from_type='refseq_mrna',
                               to_type='refseq_mrna')

## End(Not run)

jyyulab/NetBID documentation built on Dec. 23, 2024, 6:34 a.m.