[BioC] [BioC} Multiple testing correction
Martin Morgan
mtmorgan at fhcrc.org
Fri Jan 7 21:55:35 CET 2011
On 01/07/2011 11:52 AM, 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))
Hi Lucia --
> df = data.frame(x=1:5)
> dim(df)
[1] 5 1
> length(df)
[1] 1
A data frame is treated as a list of columns, so length(df) is the
number of columns; you probably want nrow(Data) (or nothing, and
p.adjust will do the right thing).
Martin
> write.table(p.adj, file="output", sep="\t")
>
> 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
--
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109
Location: M1-B861
Telephone: 206 667-2793
More information about the Bioconductor
mailing list