[BioC] [BioC} Multiple testing correction
James W. MacDonald
jmacdon at med.umich.edu
Fri Jan 7 21:52:24 CET 2011
Hi Lucia,
On 1/7/2011 2:52 PM, Lucia Peixoto wrote:
> Hi
>
> I was having some issues with the p-values of differential expression of my
> samples using SAM, so I to compare with more traditional multiple testing
> approaches
> I thought I will just do a ttest and then use p.adjust to get BH corrected
> pvalues
> My input is just a two column textfile where the first column is the Affy
> probe IDs and the second is the ttest pvalue
> All I get out is the same p-values I put in, since I am a pretty naive R
> programmer I am sure there is something simple I am doing wrong
>
> help will be greatly appreciated, thanks!!
>
> here is my script:
>
> Data<-read.table("input", header=TRUE, row.names=1)
> p.adj<- p.adjust(Data, method = "BH", n= length (Data))
> write.table(p.adj, file="output", sep="\t")
From ?p.adjust
Usage:
p.adjust(p, method = p.adjust.methods, n = length(p))
p.adjust.methods
# c("holm", "hochberg", "hommel", "bonferroni", "BH", "BY",
# "fdr", "none")
Arguments:
p: vector of p-values (possibly with 'NA's).
You are passing in a data.frame where the second column contains the
p-values, and expecting R to figure that out. Which it won't be able to do.
Try
Data[,2] <- p.adjust(Data[,2])
write.table(Data, "output", sep = "\t")
Best,
Jim
>
> My output is identical to my input
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
--
James W. MacDonald, M.S.
Biostatistician
Douglas Lab
University of Michigan
Department of Human Genetics
5912 Buhl
1241 E. Catherine St.
Ann Arbor MI 48109-5618
734-615-7826
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues
More information about the Bioconductor
mailing list