getSpecificResult {SpeCond} | R Documentation

## Detect the condition-specific genes for the second step on the SpeCond procedure

### Description

Perform the second detection step of the SpeCond procedure. Use the second fitting (without prior and ignoring the outliers detected in the first step) of the gene expression value with a mixture of normal distribution results and a set of rules to detect the outliers. It returns the outliers detected as specifically expressed for each gene.

### Usage

    getSpecificResult(expressionMatrix, fit2 = NULL, param.detection = NULL,
    specificOutlierStep1 = NULL, multitest.correction.method = "BY",
    prefix.file = NULL, print.hist.pv = FALSE)

### Arguments

`expressionMatrix` | the gene expression matrix (genes * conditions)
`fit2` | The result of `fitNoPriorWithExclusion` containing the parameter of the mixture normal model of the expression data ignoring the outliers detected in the first step of the procedure
`param.detection` | the parameter for the detection, a vector with the names ("per","md","mlk","rsd","pv") or the second row of the matrix obtained by `getDefaultParameter` or `createParameterMatrix`
`specificOutlierStep1` | the list of outliers detected by the first step procedure, result of the `getSpecificOtuliersStep1` function
`multitest.correction.method` | the multitest correction method. The default is "BY", for the possible values see `p.adjust`
`prefix.file` | a prefix added to the generated file. The default is NULL but as to be set. It is useful to change the prefix when you perform a new analysis. As you may want to compare the results with different parameters set
`print.hist.pv` | a logical (TRUE/FALSE) whether to print in a pdf file the (non-adjusted) p-value histogram; the default is FALSE

### Value

An object of class `sp_list`

`prefix.file` | the prefix used for this analysis. It will be used by default in the function `getGeneHtmlPage`
`fit` | the fitting parameters used by the detection i.e. the argument fit2
`param.detection` | the parameters used for the detection i.e. the argument parm.detection
`L.specific.result` | Full detection results (It will be used by the `getFullHtmlSpeCondResult`). This list contains 7 attributes:
`M.specific.all` | matrix of 0: not selective, 1: selective up-regulated, -1: selective down-regulated; same dimensions as the input expression values matrix
`M.specific` | same as M.specific.all but reduced to the specific genes. NULL if no gene has been detected as specific
`M.specific.sum.row` | Number of conditions in which the gene is specific
`M.specific.sum.column` | Number of specific genes by conditions
`L.pv` | list of all genes with a matrix of conditions and the corresponding p-values (if the gene is specific)
`specific` | vector of size the number of genes with "Not specific" or "Specific" according to the specificity of the gene
`L.condition.specific.id` | list of the specific genes with a vector of column numbers (condition ids), for which the gene is specific
`L.null` | a list of vectors of 1 and 0 representing the null distribution. The length of the vector for each gene corresponds to the number of normal distributions fitting the gene expression value. The list is sorted as the gene order in the input expression matrix
`L.mlk` | a list of vectors containing the min log-likelihood computed between normal distribution components. NULL if the mixture model of the gene is composed of only one component or if the proportion of all components is superior to the per.2 parameter
`L.rsd` | a list of vectors containing the standard deviation ratio computed between normal distribution components. NULL if the mixture model of the gene is composed of only one component
`identic.row.ids` | row number(s) from the initial input matrix which contain identical values for all conditions. These rows are not considered in the analysis

### Author(s)

Florence Cavalli, florence@ebi.ac.uk

### See Also

`fitNoPriorwithExclusion`, `SpeCond`, `getSpecificResult`

### Examples

    library(SpeCond)
    data(expressionSpeCondExample)
    ##Perform the SpeCond analysis step by step
    param.detection=getDefaultParameter()
    param.detection

    fit1=fitPrior(expressionSpeCondExample, param.detection=param.detection)

    specificOutlierStep1=getSpecificOutliersStep1(expressionSpeCondExample,
     fit=fit1$fit1, param.detection, multitest.correction.method="BY",
     prefix.file="run1_Step1", print.hist.pv=FALSE)

    fit2=fitNoPriorWithExclusion(expressionSpeCondExample,
           specificOutlierStep1=specificOutlierStep1, param.detection=param.detection)

    specificResult=getSpecificResult(expressionSpeCondExample, fit=fit2,
      specificOutlierStep1=specificOutlierStep1, param.detection,
      multitest.correction.method="BY", prefix.file="run1_Step2",
      print.hist.pv=FALSE)

[Package SpeCond version 1.46.0 Index]