Selection of terms in clusterProfiler, the inverse of dropGO
1
0
Entering edit mode
@sebastian-hesse-18351
Last seen 2.8 years ago
Germany / Munich / Dr.von Hauner Childr…

The clusterProfiler package has the function dropGO to exclude terms from the plotting but is there also a method so select the terms one wants to show?

Im asking because in my cellular component enrichment I have multiple occurrences of eg granule subsets and would specifically choose only non redundant ones (simplify unfortunately can not differentiate here enough to exclude overlaps).

I tried the following:

 excludeCCdown <- down_CC@compareClusterResult$Description
 remove <- c(5, 7, 11, 15, 16, 125) #contains terms I want to keep
 excludeCCdown <- excludeCCdown[! excludeCCdown %in% remove]
 granules_CC_down <- dropGO(down_CC, term = excludeCCdown)

However, the resulting granulesCCdown still contains all the dropped terms.

Thanks for your help! Sebastian

clusterProfiler r • 2.8k views
ADD COMMENT
2
Entering edit mode
@sebastian-hesse-18351
Last seen 2.8 years ago
Germany / Munich / Dr.von Hauner Childr…

Ok, I found a workaround:

excludeCCdown <- data.frame("ID" = down_CC@compareClusterResult$ID, "name" = down_CC@compareClusterResult$Description)
remove <- c("GO:0099503", "GO:0042582", "GO:0042581", "GO:0070820 ", "GO:0101002") #secretory vesicle, azurophil granule, specific granule, tertiary granule, ficolin-1-rich granule
excludeCCdown <- excludeCCdown$ID[! excludeCCdown$ID %in% remove]

granules_CC_down <- dropGO(down_CC, term = excludeCCdown)

So dropGO only uses IDs, not terms. One has to extract all terms with ther IDs into a df and choose from there which IDs to keep aka remove from the list of terms to be dropped. Then all works fine.

ADD COMMENT

Login before adding your answer.

Traffic: 699 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6