Description Usage Arguments Value Loading pathways Selecting mean or median Examples
Based on the Molecular Distance to Health, this function calculates scores to each sample based on their perturbation from healthy
1 2 3 |
data |
|
pdata |
|
control_lab |
character |
directory |
(optional) character string of output directory |
pathways |
(optional) |
print |
set as default to TRUE for pdfs of the sample scores to be saved |
measure |
'medan' as default, can change to 'median'.
|
std |
|
fraction_genes |
|
save_tables |
Set as default to TRUE. Tables of zscore and gene and sample scores will be saved. |
file_name |
(optional) character string that will be added to the saved file names |
A list: zscore, gene_scores, gene_freq, sample_scores, perturbed_genes
Z-score - z-score is calculated using the control samples to compute the average and the standard deviation. The absolute value of this matrix is taken and values less than the std are set to zero. This z-score data frame is used to compute the gene and sample scores.
Gene scores - mean z-score value for each gene in each class
Gene frequency - frequency with which a gene has a non zero z-score value in each class
Sample scores - list containing sample scores for different genesets. Sample scores are the sum of the z-scored gene values for each sample, averaged for the number of genes in that geneset.
Perturbed genes - vector of the top fraction of genes that have higher gene scores in the test classes compared to the control.
Pathways - if genesets are provided, they are ranked according to the signal-to-noise #' ratio of test sample scores versus control sample scores calculated using that geneset.
a list
of pathways can be loaded from a .gmt file using the
fgsea
function using fgsea::gmtPathways('gmt.file.location')
if median
is selected, the z-score will be calculated using the
median, and the standard deviation will be estimated using the median
absolute deviation, utilising the mad
function.
1 2 3 4 5 6 7 8 | # basic run
mdp(example_data,example_pheno,'baseline')
# run with pathways
pathway_file <- system.file('extdata', 'ReactomePathways.gmt',
package = 'mdp')
mypathway <- fgsea::gmtPathways(pathway_file) # load a gmt file
mdp(data=example_data,pdata=example_pheno,control_lab='baseline',
pathways=mypathway)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.