Thanks for the help

I fixed it
the problem was that I was not selecting the right column at all! how silly
of me
so this fixes it:

p<-Data[,c('pval')]
p.adj    <- p.adjust(p, method = "fdr", n= length(p))
write.table(p.adj, file="filename", sep="\t")

I am using multtest now in any case

thanks again

Lucia


On Fri, Jan 7, 2011 at 3:55 PM, Martin Morgan <mtmorgan@fhcrc.org> wrote:

> 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@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
>

	[[alternative HTML version deleted]]

