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

EpiMix_PlotModel error #2

Open
OlivierEmery opened this issue Oct 29, 2024 · 0 comments
Open

EpiMix_PlotModel error #2

OlivierEmery opened this issue Oct 29, 2024 · 0 comments

Comments

@OlivierEmery
Copy link

Hello,

First of all thank you for this very complete and interesting package.

I have an issue when executing the EpiMix_PlotModel function to plot model distributions (at any of the CpGs among functional gene pairs identified):

plots <- EpiMix_PlotModel(
  EpiMixResults = cd8.res,
  Probe = "cg03014019",
  methylation.data = cd8meth,
  gene.expression.data = cd8rna,
  GeneName = "AUTS2"
)

Results in the following error:

Error in EpiMixResults$Classification[Probe, OverlapSamples] : 
  subscript out of bounds

cd8.res corresponds to my epimix results run in regular mode using cd8meth as methylation data (with cpg names as row names) and cd8rna as RNA data (with gene names as row names).

I've looked at the code for the EpiMix_PlotModel function in MethylMix.R and it seems to me that the error happens when calling
EpiMixResults$Classification[Probe, OverlapSamples]

Based on this code I believe that EpiMixResults$Classification should have the CpG names as rows but as far as I can tell there are no row names in EpiMixResults$Classification (as opposed to cd8.res$MethylationStates which has the cpg names as rows for example):

> row.names(cd8.res$Classification)
NULL

Is this expected? I'm not sure if I did something wrong earlier in my pipeline (I loaded my Epimix results using readRDS before running the EpiMix_PlotModel function).
Not using the optional arguments gene.expression.data and GeneName or using other probes causes the same error.
Is there any valid way I can assign the corresponding CpG names in EpiMixResults$Classification manually (to avoid recomputing with the main epimix function, I have several other EpiMix results) to make this work and how?

I can re-create the error with my data using these two lines:

OverlapSamples <- colnames(cd8.res$MethylationStates)  # does contain a subset of my sample names
cd8.res$Classification["cg03014019", OverlapSamples]
Error in cd8.res$Classification["cg03014019", OverlapSamples] : 
  subscript out of bounds

I am using EpiMix package version 1.4.0.
Thank you very much with your help with this issue, I'd be glad to answer any question you may have if needed.

Best,

Olivier from Lausanne, Switzerland

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant