Hi,
I have gene set data for which I'm trying to use R piano package runGSA function to perform a gene set analysis.
I can't seem to be able to paste my data here but I hope the error message may be enough:
library(piano)
#I'm constructing the gsc object.
gsc <- cbind(ids,pathways)
colnames(gsc) <- c("g","s")
gsc <- loadGSC(gsc)
#run
sub_pathway.gsea <- runGSA(geneLevelStats=gene.level.stats,directions=effects,gsc=gsc)
It starts running:
Running gene set analysis: Checking arguments...done! Final gene/gene-set association: 350 genes and 61 gene sets Details: Calculating gene set statistics from 350 out of 350 gene-level statistics Using all 350 gene-level statistics for significance estimation Removed 0 genes from GSC due to lack of matching gene statistics Removed 0 gene sets containing no genes after gene removal Removed additionally 0 gene sets not matching the size limits Loaded additional information for 0 gene sets Calculating gene set statistics...done! Calculating gene set significance...
And then crashes with:
Error in sample.int(length(x), size, replace, prob) : cannot take a sample larger than the population when 'replace = FALSE'
My gene.level.stats has many 1's and their corresponding effects (dirs) are 0, if that has any contribution to the error
Help would be highly appreciated,
rubi
The identifiers should match, since it prints: "Final gene/gene-set association: 350 genes and 61 gene sets". Otherwise there should be an error I believe.