View source: R/convert_ensembl.R
convert_ensembl | R Documentation |
Converts an Ensemble data.table into other gene types using a conversion table
convert_ensembl(
my_dt,
conversion_table_path = get_human_ensembl_to_hgnc_entrez_path(),
convert_to_column = "hgnc_symbol",
gene_biotypes = NULL,
function_for_combining_counts = sum,
readme_path = NULL,
this_script_path = NULL,
thread_num = 1
)
my_dt |
Input data.table with transcript counts. Should have samples by row, first columns should be the sample id with all subsequent columns headers in the Ensembl ENST format (no version). Assumes the first column is the sample_key. |
conversion_table_path |
Table to convert ensembl to other types |
convert_to_column |
If using |
gene_biotypes |
The type of biomaRt gene_biotypes that should be output to the gene level output. Recommend you keep all of them. Many gene signature use lots of different biotypes. Our bgvlab sigs use 18 types which is 228322/234393 of the ENST and 54367/59453 of the HGNC. |
function_for_combining_counts |
Name of function to use to combine the genes. FWIW Joel Parker recommends that transcript colunt columns should be added to get gene level counts and microarrays should be averaged. |
readme_path |
Optional path to which the comments will be appended. |
this_script_path |
Path to script that runs this function for documentation purposes |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ convert_ensembl ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ToDos Make this take start from different types(eg: go from ensg to hgnc etc)
Returns a data.table with isoforms converted to genes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.