View source: R/stackable_functions.R
calculate_gene_signatures | R Documentation |
Calculates gene signatures on my_dt using a gmt file. The method of calculating the
gene signture can be changed using my_fun
calculate_gene_signatures(
my_dt = NULL,
gene_cols = NULL,
gene_element = 1,
gmt_file_path,
min_genes = 1,
my_fun = mean,
my_summary =
"Gene signatures by default are the mean of the genes listed in the signature for each sample.",
only_return_signatures = TRUE,
summary_output_path = NULL,
sample_key = get_default_sample_key(),
signatures = NULL,
readme_path = NULL,
na_remove = TRUE
)
my_dt |
data.table input |
gene_cols |
Character vector indicating the columns that should be used in the
gene signature. Uses |
gene_element |
For gene names that have a pipe in them, which position should be used ("1|2 etc"). Integer. |
gmt_file_path |
String path to the gmt file. |
min_genes |
Integer for the minimum number of genes that have to be found from a gene signature to keep it. |
my_fun |
Function used to combine the genes for each sample. Default is |
my_summary |
Character string to change the default comment that will be appended to my_dt. |
only_return_signatures |
Boolean indicating whether or not all of the non-gene columns should be included in the result. Gene columns will be dropped. This is helpful in returning categories with the gene signature scores |
summary_output_path |
If specified this is where the summary data for making this gene signature will go. |
sample_key |
Character string to specify the column that is the sample key. This column will not be operated upon. |
signatures |
Specifies which gene signtures on the gmt file will be used. If |
readme_path |
Optional path to which the comments will be appended. |
col_names |
Vector of character strings to name the columns that will have this
operation performed on them. Uses |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ calculate_gene_signatures ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Should convert a data.frame to a data.table and then convert it back for the output.
Other gene_signature:
bgv_lab_prep_count_data_for_gene_signature()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.