egeulgen / pathfindR

pathfindR: Enrichment Analysis Utilizing Active Subnetworks
https://egeulgen.github.io/pathfindR/
Other
178 stars 25 forks source link

visualize_hsa_KEGG fails to color proteins according to fold change #125

Closed apelin20 closed 2 years ago

apelin20 commented 2 years ago

Me again. I migrated to R4.2 and updated everything but am still having some issues.

I was to overlay my fold change data on KEGG maps (blue for downregulation and red for up).

For some reason, what is happening is all proteins in the KEGG map are colored light green instead of according to expression changes:

Capture .

Focusing on a specific gene, TARF6, which should be red


> input2 <- input_processing(input, p_val_threshold = 0.05)
> head(input2)
    old_GENE   GENE   CHANGE P_VALUE
68     HSPA6  HSPA6 4.035824   1e-13
78     DUSP8  DUSP8 3.954754   1e-13
114    DUSP1  DUSP1 3.692781   1e-13
156    IFIT2  IFIT2 3.470239   1e-13
284   DNAJA4 DNAJA4 2.855514   1e-13
534   DNAJB4 DNAJB4 2.140381   1e-13
> input2[which(input2[,2] == "TRAF6"),]
     old_GENE  GENE CHANGE     P_VALUE
1718    TRAF6 TRAF6    7.9 0.002662003
>visualize_hsa_KEGG("hsa04064", input_processed = input2, max_to_plot = NULL, normalize_vals = TRUE, node_cols = c("blue", "darkgray", "red"))
Downloading pathway diagrams of 1 KEGG pathways

  |======================================================================| 100%
Saving colored pathway diagrams of 1 KEGG pathways

  |======================================================================| 100%
Warning message:
In utils::download.file(url = KEGGgraph::getKGMLurl(pathwayid = sub("hsa",  :
  downloaded length 65004 != reported length 0

Not sure what the last warning is about. I tried both normalize_vals as true and false, no difference.

egeulgen commented 2 years ago

can you please share the input as an RDS file so that I can replicate the issue?

egeulgen commented 2 years ago

hello again, this was an issue with KEGGREST and they have recently resolved it. Please update via:

devtools::install_github("Bioconductor/KEGGREST")
apelin20 commented 2 years ago

Yes, the solution worked! I am happy they fixed KEGGREST. Here is how it looks now: image

It's still a bit confusing because some gene are light green, any idea if there is a way to make all genes have white background unless FC information is given?

egeulgen commented 2 years ago

Unfortunately, KEGG restricts the number of genes to color. So for larger pathways it's currently not possible to color unchanged genes white. I'll try to find a work-around for this and keep you updated

apelin20 commented 1 year ago

Hey Ege, Is there any way to download KEGG directional interactions from somewhere? the .sif file? Or is that not available on purpose? Thanks, Adrian

On Tue, Jul 12, 2022 at 9:47 AM Ege Ulgen @.***> wrote:

Unfortunately, KEGG restricts the number of genes to color. So for larger pathways it's currently not possible to color unchanged genes white. I'll try to find a work-around for this and keep you updated

— Reply to this email directly, view it on GitHub https://github.com/egeulgen/pathfindR/issues/125#issuecomment-1182004840, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCEA26NPCB77XJSBWIHP2TVTWOTXANCNFSM5ZSHYWAQ . You are receiving this because you authored the thread.Message ID: @.***>

egeulgen commented 1 year ago

Hey Adrian,Because pathfindR does not require directionality, that is not available in the package. I think the package KEGGREST (https://bioconductor.org/packages/release/bioc/html/KEGGREST.html) can be utilized for that purpose. Best,-EOn 13 Jun 2023, at 19:35, apelin20 @.***> wrote: Hey Ege,

Is there any way to download KEGG directional interactions from somewhere?

the .sif file? Or is that not available on purpose?

Thanks,

Adrian

On Tue, Jul 12, 2022 at 9:47 AM Ege Ulgen @.***> wrote:

Unfortunately, KEGG restricts the number of genes to color. So for larger

pathways it's currently not possible to color unchanged genes white. I'll

try to find a work-around for this and keep you updated

Reply to this email directly, view it on GitHub

https://github.com/egeulgen/pathfindR/issues/125#issuecomment-1182004840,

or unsubscribe

https://github.com/notifications/unsubscribe-auth/ABCEA26NPCB77XJSBWIHP2TVTWOTXANCNFSM5ZSHYWAQ

.

You are receiving this because you authored the thread.Message ID:

@.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you modified the open/close state.Message ID: @.***>