HeatPlot - Genes selections
0
0
Entering edit mode
@d4a334e3
Last seen 11 months ago
Germany

Hello, My name is Ruba I am a PhD student and I am analyzing Bulk RNAseq data for my project. I wanted to use the heatplot to visualize KEGG enrichment analysis and see the connection between genes and related pathways, at first the plot showed all the genes overlapping so I couldn't differentiate any of it similar to the problem listed here How can I limit the number of displayed genes in heatplot I tried the proposed solution but I don't want the genes to be chosen randomly, what I wanted to do is to selcet 10 from each pathway which is most upregulated/downregulated like

top_n(10,wt = -abs(logFC))

I tried to integrate something using the stringr package and building on the code that choose randomly 5 samples and make it chosse the top 10 genes according to the highest absolute value of logFC but I didn't get anywhere, could anybody help with that?

#the code that choose 5 random genes 
> random.core.genes  <- sapply(
                lapply(
                str_split(as.data.frame(readable_gene_names)[ ,"core_enrichment"] , "/") ,
                 sample, size=5),      ## 5=number of random genes to select
                paste, collapse="/")

looking forward to hearing from you!

Best,

Ruba

enrichplot stringr heatplot • 556 views
ADD COMMENT

Login before adding your answer.

Traffic: 452 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