View source: R/computeRefTissue.R
| computeRefTissue | R Documentation | 
Compute reference control samples from OCTAD database using precomputed EncoderDF models. 
 computeRefTissue(case_id = NULL, adjacent = FALSE, source = "octad",
 n_varGenes = 500, method = c("varGenes",'random'), expSet = NULL,
control_size = length(case_id),
outputFolder = NULL, cor_cutoff = "0", output = TRUE)
case_id | 
 vector of cases used to compute references.  | 
source | 
 by default set   | 
adjacent | 
 by default set to   | 
expSet | 
 input for expression matrix. By default NULL, since autoencoder results are used.  | 
n_varGenes | 
 number of genes used to select control cases.  | 
method | 
 one of two options is avaliable.   | 
control_size | 
 number of control samples to be selected.  | 
outputFolder | 
 path to output folder. By default, the function produces result files in working directory.  | 
cor_cutoff | 
 cut-off for correlation values, by default   | 
output | 
 if   | 
Return
control_id | 
 a vector of an appropriate set of control samples.  | 
Besides, if output=TRUE, two files are created in the working directory:
case_normal_corMatrix.csv | 
 contains pairwise correlation between case samples vs control samples.  | 
case_normal_median_cor.csv | 
 contains median correlation values with case samples for returned control samples.  | 
diffExp.
#select data
#load data.frame with samples included in the OCTAD database
phenoDF=get_ExperimentHub_data('EH7274') 
HCC_primary=subset(phenoDF,cancer=='Liver Hepatocellular Carcinoma'&
sample.type == 'primary'&data.source == 'TCGA')
#select cases
case_id=HCC_primary$sample.id
#computing reference tissue, by default using small autoEncoder,
#but can use custom expression set,
#by default output=TRUE and outputFolder option is empty,
#which creates control corMatrix.csv to working directory
control_id=computeRefTissue(case_id,outputFolder='',output=TRUE,
expSet = "octad",control_size = 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.