Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selectedPathways argument in oncoplot not functioning properly with user-defined pathways #1041

Open
kbrar4013 opened this issue Jul 25, 2024 · 3 comments
Labels

Comments

@kbrar4013
Copy link

kbrar4013 commented Jul 25, 2024

Hi,

I'm having an issue with the "selectedPathways" argument in the oncoplot function, when using my own user-defined pathways. I either get the error below (with code):

 oncoplot(maf = wgs.maf.cnTable.G3only, altered=TRUE, pathways = kegg_pathways_oncoplot, selectedPathways = "KEGG_MEDICUS_VARIANT_MUTATION_INACTIVATED_FGF8_TO_RAS_ERK_SIGNALING_PATHWAY", gene_mar = 8, fontSize = 0.8)
Error in matrix(data = 0, nrow = nrow(numMat), ncol = length(tsbs[!tsbs %in%  : 
  non-numeric matrix extent 

OR, it works, but the number of samples affected is incorrect. For example, for the pathway "REACTOME_FGFR2_ALTERNATIVE_SPLICING", the results of the "pathways" function indicates that 24 out of 37 samples should be altered. If I take the list of genes in that pathway and provide it as an argument to the oncoplot through the "genes" argument, then I correctly get 24/37. If I provide the pathway name through the "selectedPathways" argument, I instead get 8/37 altered, which seems to be incorrect. Below is all the code and the results I'm getting - would appreciate your help.

I've also attached the pathway data-frame I'm providing as input. I had to switch the order of the Gene and Pathways column, as it seems that the pathways function expects the pathway column first, whereas the oncoplot function expects the gene names first.

reactome_pathways.txt

G3_reactome_pathways <- pathways(wgs.maf.cnTable.G3only, pathways = reactome_pathways, plotType = NA)

fgfr2_splicing_pathway_genes <- c("ESRP1", "ESRP2", "FGFR2", "GTF2F1", "GTF2F2", "HNRNPA1", "HNRNPF", "HNRNPH1", "HNRNPM", "NCBP1", "NCBP2", "POLR2A", "POLR2B", "POLR2C", "POLR2D", "POLR2E", "POLR2F", "POLR2G", "POLR2H", "POLR2I", "POLR2J", "POLR2K", "POLR2L", "PTBP1", "RBFOX2", "TIA1", "TIAL1")

oncoplot(maf=wgs.maf.cnTable.G3only, genes=fgfr2_splicing_pathway_genes, altered=TRUE, showTumorSampleBarcodes = TRUE, gene_mar = 8, fontSize = 0.8)

oncoplot(maf = wgs.maf.cnTable.G3only, altered=TRUE, pathways = reactome_pathways_oncoplot, selectedPathways = "REACTOME_FGFR2_ALTERNATIVE_SPLICING", gene_mar = 8, fontSize = 0.8)
Screenshot 2024-07-25 at 1 08 56 PM

output with specifying the pathway genes manually

Screenshot 2024-07-25 at 1 07 31 PM **output with oncoplot pathways function**

Thanks for the great package, it's been really helpful for my analysis.

Copy link

This issue is stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the stale label Sep 25, 2024
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

PoisonAlien added a commit that referenced this issue Oct 16, 2024
@PoisonAlien PoisonAlien reopened this Oct 16, 2024
@PoisonAlien
Copy link
Owner

Hi,

I'm sorry for the late response. I somehow overlooked the issue.

Thank you for reporting and, I have fixed it. If you are still working on it, I would appreciate it if you could try it and let me know if this helps.

@github-actions github-actions bot removed the stale label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants