matrix: Accompanying binary data matrix which was used to obtain result.
p.adjust: Which method to use when adjusting p-values, see p.adjust (default="BH").
alpha: Significance level (adjusted p-values) when constructing the FisherInfo object (default=0.05).
pattern: Numeric vector for which patterns/biclusters the Fisher Exact Test needs to be computed (default = all patterns/biclusters).
Returns
Depending on result, a FisherResult and/or FisherInfo object will be added to the result and returned (see Details).
Details
Extracts the patterns from either a Biclust or BiBitWorkflow object (see below). Afterwards for each pattern all rows will be tested using the Fisher Exact Test. This test compares the part of the row inside the pattern (of the bicluster) with the part of the row outside the pattern. The Fisher Exact Test gives you some information on if the row is uniquely active for this pattern.
Depending on the result input, different patterns will be extract and different info will be returned:
Biclust S4 Object: Using the column patterns of the Biclust result, all rows are tested using the Fisher Exact Test. Afterwards the following 2 objects are added to the info slot of the Biclust object:
* `FisherResult`: A list object (one element for each pattern) of data frames (Number of Rows $\times$ 6) which contain the names of the rows (`Names`), the noise level of the row inside the pattern (`Noise`), the signal percentage inside the pattern (`InsidePerc1`), the signal percentage outside the pattern (`OutsidePerc1`), the p-value of the Fisher Exact Test (`Fisher_pvalue`) and the adjusted p-value of the Fisher Exact Test (`Fisher_pvalue_adj`).
* `FisherInfo`: Info object which contains a comparison of the current row membership for each pattern with a 'new' row membership based on the significant rows (from the Fisher Exact Test) for each pattern. It is a list object (one element for each pattern) of lists (6 elements). These list objects per pattern contain the number of new, removed and identical rows (`NewRows`, `RemovedRows`, `SameRows`) when comparing the significant rows with the original row membership (as well as their indices (`NewRows_index`, `RemovedRows_index`)). The `MaxNoise` element contains the maximum noise of all Fisher significant rows.
BiBitWorkflow S3 Object: The merged column patterns (after cutting the hierarchical tree) are extracted from the BiBitWorkflow object, namely the $info$MergedColPatterns slot. Afterwards the following object is added to the $info slot of the BiBitWorkflow object:
* `FisherResult`: Same as above
Examples
## Not run:## Prepare some data ##set.seed(254)mat <- matrix(sample(c(0,1),5000*50,replace=TRUE,prob=c(1-0.15,0.15)), nrow=5000,ncol=50)mat[1:200,1:10]<- matrix(sample(c(0,1),200*10,replace=TRUE,prob=c(1-0.9,0.9)), nrow=200,ncol=10)mat[300:399,6:15]<- matrix(sample(c(0,1),100*10,replace=TRUE,prob=c(1-0.9,0.9)), nrow=100,ncol=10)mat[400:599,21:30]<- matrix(sample(c(0,1),200*10,replace=TRUE,prob=c(1-0.9,0.9)), nrow=200,ncol=10)mat[700:799,29:38]<- matrix(sample(c(0,1),100*10,replace=TRUE,prob=c(1-0.9,0.9)), nrow=100,ncol=10)mat <- mat[sample(1:5000,5000,replace=FALSE),sample(1:50,50,replace=FALSE)]## Apply BiBitWorkflow ##out <- BiBitWorkflow(matrix=mat,minr=50,minc=5,noise=0.2,cut_type="number",cut_pm=4)## Apply RowTest_Fisher on Biclust Object -> returns Biclust Object ##out_new <- RowTest_Fisher(result=out$Biclust,matrix=mat)# FisherResult output in info slotstr(out_new@info$FisherResult)# FisherInfo output in info slot (comparison with original BC's)str(out_new@info$FisherInfo)## Apply RowTest_Fisher on BiBitWorkflow Object -> returns BiBitWorkflow Object ##out_new2 <- RowTest_Fisher(result=out,matrix=mat)# FisherResult output in BiBitWorkflow info elementstr(out_new2$info$FisherResult)# Fisher output is added to "NoiseScree" plotNoiseScree(result=out_new2,matrix=mat,type="Added")## End(Not run)