Entering edit mode
11.2 years ago
robjohn7000
▴
110
Hi,
How can I remove duplicate rows from the output of my toptableF? I have tried the following without success:
if (unique(fit2$genes)){
Sigenes.F <- topTableF(fit2, number=100, genelist=fit2$genes, adjust.method="bonferroni",
sort.by="F")
}
Thanks
I don't think you want to remove duplicated genes, you probably want to keep the best p-value for each gene. Have a look into the aggregate() function
Thanks again, Irsan. I was able to get get aggregate() to work. It makes sense in the way you have explained, and not just throwing genes away.
you can do as Michael Dondrup says below, but that might be removing important information. Often, you have duplicated genes in microarray data because there are multiple probes for a single gene. E.g. what if one of them is up-regulated and one is down-regulated (due to alternative transcript use) and you discard one?
Is it from the fit2 data frame or the Sigenes.F data frame that you want to remove the duplicates?
From the Sigenes.F data frame. Thanks.