[BioC] issue on removing all NAs (UNANNOTATED) rows
James W. MacDonald
jmacdon at uw.edu
Tue Jul 30 16:31:33 CEST 2013
On 7/27/2013 9:51 AM, Guest [guest] wrote:
> Hi,
>
> I am using limma package on HuGene2.0st array. When I tried to remove the unannotated rows (NAs) after mapping probeID to gene names. Some significant gene lists I got have the differentially expressed genes, but some of gene lists have all of the unsignificantly expressed genes.
>
> The code I used as follows:
>
> cont.matrix<- makeContrasts(
> interaction=(T.Ko-T.wt)-(ctrl.Ko-ctrl.wt),
> levels=design)
> fit2<- contrasts.fit(fit, cont.matrix)
> fit2<- eBayes(fit2)
>
> sig.interaction = topTable(fit2, coef = "interaction", number=nrow(fit2), p.value=0.05, lfc=1)
> interaction.ids=sig.interaction[["ID"]]
> ## map probe ids to gene names...
> interaction.sig.SYMBOL=mget(interaction.ids, hugene20sttranscriptclusterSYMBOL, ifnotfound=NA)
> #REMOVE ALL NAs (UNANNOTATED) ROWS and unlist them for easy formatting later
> interaction.sig.ann=unlist(interaction.sig.SYMBOL[!is.na(interaction.sig.SYMBOL)])
>
> Does anyone know what's wrong with the code? No error message. Any input is appreciated.
For one, this code doesn't do what you say you are trying to do, so it
is hard to give advice. You should note however that there is a 'genes'
slot in a MArrayLM object that you can populate, and this will propagate
to your topTable.
fit2$genes <- select(hugene20sttranscriptcluster.db,
row.names(fit2$coef), c("SYMBOL","ENTREZID"))
a.table <- topTable(fit2, coef="interaction")
a.table <- a.table[!is.na(a.table$SYMBOL),]
Best,
Jim
>
> Thanks,
>
>
> -- output of sessionInfo():
>
>> sessionInfo()
> R version 3.0.0 (2013-04-03)
> Platform: x86_64-apple-darwin10.8.0 (64-bit)
>
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> --
> Sent via the guest posting facility at bioconductor.org.
>
> _______________________________________________
> 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
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099
More information about the Bioconductor
mailing list