[R] Check a list of genes for a specific GO term
Martin Morgan
mtmorgan at fhcrc.org
Sun Jul 7 13:55:35 CEST 2013
In Bioconductor, install the annotation package
http://bioconductor.org/packages/release/BiocViews.html#___AnnotationData
corresponding to your chip, e.g.,
source("http://bioconductor.org/biocLite.R")
biocLite("hgu95av2.db")
then load it and select the GO terms corresponding to your probes
library(hgu95av2.db)
lkup <- select(hgu95av2.db, rownames(dat), "GO")
then use standard R commands to find the probesets that have the GO id you're interested in
keep = lkup$GO %in% "GO:0006355"
unique(lkup$PROBEID[keep])
Ask follow-up questions about Bioconductor packages on the Bioconductor mailing list
http://bioconductor.org/help/mailing-list/mailform/
Martin
----- Rui Barradas <ruipbarradas at sapo.pt> wrote:
> Hello,
>
> Your question is not very clear, maybe if you post a data example.
> To do so, use ?dput. If your data frame is named 'dat', use the following.
>
> dput(head(dat, 50)) # paste the output of this in a post
>
>
> If you want to get the rownames matching a certain pattern, maybe
> something like the following.
>
>
> idx <- grep("GO:0006355", rownames(dat))
> dat[idx, ]
>
>
> Hope this helps,
>
> Rui Barradas
>
>
> Em 07-07-2013 07:01, Chirag Gupta escreveu:
> > Hello everyone
> >
> > I have a dataframe with rows as probeset ID and columns as samples
> > I want to check the rownames and find which are those probes are
> > transcription factors. (GO:0006355 )
> >
> > Any suggestions?
> >
> > Thanks!
> >
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list