runGSA()
). Optionally also produces a boxplot to visualize the results.
consensusScores(resList, class, direction, n=50, adjusted=FALSE, method="median", plot=TRUE, cexLabel=0.8, cexLegend=1, showLegend=TRUE, rowNames="names", logScale=FALSE, main)
GSAres
, as returned by the runGSA
function.
"distinct"
, "mixed"
, "non"
.
"up"
or "down"
.
<=n< code=""> will be included in the plot. Defaults to 50.
=n<>
runGSA
was run with the argument adjMethod="none"
, the adjusted p-values will be equal to the original p-values.
"ranks"
for the consensus rank, "names"
for the gene set names, or "none"
to omit rownames.
n
gene sets, given by each run, as well as the corresponding matrix of p-values, given by each run.resList
, preferably representing similar runs with runGSA
but with different methods, this function ranks the gene sets for each GSAres
object, based on the selected directionality class. Next, the median rank for each gene set is taken as a score for top-ranking gene sets. The highest scoring gene-sets (with consensus rank, i.e. rank(rankScore,ties.method="min")
, smaller or equal to n
) are selected and depicted in a boxplot, showing the distribution of individual ranks (shown as colored points), as well as the median rank (shown as a red line). As an alternative of using the median rank as consensus score, it is possible to choose the mean or using the Borda or Copeland method, through the method
argument.
All elements of resList
have to be objects containing results for the same number of gene-sets. The ranking procedure handles ties by giving them their minimum rank.runGSA
# Load some example GSA results:
data(gsa_results)
# Consensus scores for the top 50 gene sets (in the non-directional class):
cs <- consensusScores(resList=gsa_results,class="non")
# Access the ranks given to gene set s7 by each individual method:
cs$rankMat["s7",]
Run the code above in your browser using DataLab