computeRefTissue: Compute correlating reference control samples.

Description Usage Arguments Value See Also Examples

View source: R/computeRefTissue.R

Description

Compute reference control samples from OCTAD database using precomputed EncoderDF models.

Usage

1
 computeRefTissue(case_id=NULL,adjacent=FALSE,source='octad',n_varGenes = 500,method='varGenes',expSet=NULL,control_size = length(case_id),outputFolder='',cor_cutoff='0',output=TRUE)

Arguments

case_id

vector of cases used to compute references.

source

by default set octad to use autoencoder results for computation. Any other input like 'side' is expSet defined by users.

adjacent

by default set to FALSE. If TRUE, only tissue with sample.type 'adjacent' from phenoDF would be used instead of 'normal'.

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. random will take a random number of samples from control subset and varGenes (default) will select control samples based on distance between cases and selected samples.

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 cor_cutoff='0'.

output

if TRUE, two output files are produced.

Value

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.

See Also

diffExp.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 #select data
 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)
 #increase number of samples
 control_id=computeRefTissue(case_id, control_size = 100)

Bin-Chen-Lab/octad_desktop documentation built on Oct. 28, 2020, 11:13 a.m.