Entering edit mode
Hello guys,
first of all I am new to R and Bioconductor. I've been trying without success to use my own custom data for performing a fisher's test. I did the following in first hand for trying it out using some samples that R includes.
data(GOdata) ######################################## ## GenTable ######################################## ## load two topGOresult sample objects: resultFisher and resultKS data(results.tGO) ## generate the result of Fisher's exact test sig.tab <- GenTable(GOdata, Fis = resultFisher, topNodes = 20) ## results of both test sig.tab <- GenTable(GOdata, resultFisher, resultKS, topNodes = 20) ## results of both test with specified names sig.tab <- GenTable(GOdata, Fis = resultFisher, KS = resultKS, topNodes = 20) ## results of both test with specified names and specified ordering sig.tab <- GenTable(GOdata, Fis = resultFisher, KS = resultKS, orderBy = "KS", ranksOf = "Fis", topNodes = 20) ######################################## ## showGroupDensity ######################################## goID <- "GO:0006091" print(showGroupDensity(GOdata, goID, ranks = TRUE)) print(showGroupDensity(GOdata, goID, ranks = FALSE, rm.one = FALSE))
And then, the following code:
## load a sample topGOdata object data(GOdata) GOdata ############################## ## getSigGroups interface ############################## ## define a test statistic test.stat <- new("classicCount", testStatistic = GOFisherTest, name = "Fisher test") ## perform the test resultFis <- getSigGroups(GOdata, test.stat) resultFis ############################## ## runTest interface ############################## ## Enrichment analysis by using the "classic" method and Fisher's exact test resultFis <- runTest(GOdata, algorithm = "classic", statistic = "fisher") resultFis ## weight01 is the default algorithm weight01.fisher <- runTest(GOdata, statistic = "fisher") weight01.fisher ## not all combinations are possible! # weight.ks <- runTest(GOdata, algorithm = "weight", statistic = "t")
Now I wanted to perform exactly what I did over here, but using my own data. In my case, I loaded it using read.table as follows
data<-read.table("dengue.csv", header=TRUE, sep="\t", dec=".")
How could I achieve this guys? I had no success trying to input it, and the error output was not very descriptive I'd say...
Kind regards
This is exactly the opposite of what you should be doing. Showing us a bunch of code that worked for you is not of interest. It's nice that you got things to work, but this forum is about helping people with problems, not accolades for successes.
When you got to the problem part, you just show the code that (apparently) didn't work, and then you stop giving any information. If you want help you need to tell us three things:
If the error was a problem with reading in a .csv file, then this isn't really the forum you should be using anyway. General R-help questions go on the R-help mailing list (r-help@r-project.org).