control_adjustment {TTMap} | R Documentation

## Calculates a corrected control group, discovers outliers in it.

### Description

`control_adjustment` function finds outliers in the control group and removes them

### Usage

        control_adjustment(normal.pcl, tumor.pcl, normalname, dataname,
        org.directory = "", A = 1, e = 0, meth = 0, P = 1.1, B = 0)

### Arguments

`normal.pcl` | the control matrix with annotation as obtained by $CTRL from `make_matrices`
`tumor.pcl` | the disease/test data matrix with annotation as obtained by $TEST from `make_matrices`
`normalname` | A name for the corrected control files
`dataname` | the name of the project
`org.directory` | where the outputs should be saved
`A` | integer if A=0 then the difference to the median is calculated otherwise the difference to the mean.
`e` | integer giving how far to the median an outlier is at least
`meth` | value or method that defines how to replace outliers, default is set to replace by the median
`P` | if more than P percent of features are outliers the feature is removed, by default all are kept
`B` | Batch vector a vector for normal and test samples with a same number corresponding to a same batch

### Details

`control_adjustment` calculates a corrected control group, discovers outliers in it.

### Value

Several files are created

`paste(org.directory,normalname,".normMesh",sep = "")` | The normal matrix with only common features with the test matrix. This file is only created if the two have different rows
`paste(org.directory,dataname,".normMesh",sep = "")` | The test matrix with only common features with the normal matrix. This file is only created if the two have different rows.
`mean_vs_variance.pdf` | A pdf showing a plot of the mean (X axis) against the variances (Y axis) of each feature
`mean_vs_variance_after_correction.pdf` | A pdf showing a plot of the mean (X axis) against the variances (Y axis) of each feature after correction of the control group
`na_numbers_per_row.txt` | number of outliers per row
`na_numbers_per_col.txt` | number of outliers per column

And values of ttmap_part1_ctrl_adj

`e` | Selected criteria for what is an outlier
`tag.pcl` | Annotation of features, ID of features and weight
`Normal.mat` | The control matrix without annotation and only with the common rows with Disease.mat
`Disease.mat` | The test/disease matrix without annotation and only with the common rows with Disease.mat
`flat.Nmat` | A list $mat being the corrected control matrix $m a record of the different numbers of removed genes per sample
`record` | numbers recording the number of columns in Disease.mat and Normal.mat
`B` | The batch vector B introduced in the begining
`U1` | The different batches in Normal.mat
`U2` | The different batches in Disease.mat

### Author(s)

Rachel Jeitziner

### See Also

`hyperrectangle_deviation_assessment`,`ttmap` `ttmap_sgn_genes`

### Examples

        ##--
        library(airway)
        data(airway)
        airway <- airway[rowSums(assay(airway))>80,]
        assay(airway) <- log(assay(airway)+1,2)
        ALPHA <- 1
        the_experiment <- TTMap::make_matrices(airway,
        seq_len(4), seq_len(4) + 4,
        rownames(airway), rownames(airway))
        TTMAP_part1prime <-TTMap::control_adjustment(
        normal.pcl = the_experiment$CTRL,
        tumor.pcl = the_experiment$TEST,
        normalname = "The_healthy_controls",
        dataname = "Effect_of_cancer",
        org.directory = tempdir(), e = 0, P = 1.1, B = 0);

[Package TTMap version 1.10.0 Index]