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

Error in floodPseudotimeProcess #84

Open
mary77 opened this issue Jan 31, 2023 · 2 comments
Open

Error in floodPseudotimeProcess #84

mary77 opened this issue Jan 31, 2023 · 2 comments

Comments

@mary77
Copy link

mary77 commented Jan 31, 2023

Thank you so much for the great tool.

I just wanted to report an error that I encountered when running floodPseudotimeProcess function. I don't know why my [email protected] hasn't been initialized during diffusion step.

It seems function try to initialize it but return this error :
obj.urd = floodPseudotimeProcess(obj.urd, flood.res, floods.name='pseudotime') Error in rownames(dm@eigenvectors) : object 'dm' not found In addition: Warning message: In floodPseudotimeProcess(obj.urd, flood.res, floods.name = "pseudotime") : Initializing @diff.data, though this should have been previously initialized by creation or importation of diffusion map.

When I checked the source code it seems that the initialization is not correct. Here is the first several lines of the floodPseudotimeProcess code:

if (nrow([email protected]) == 0) { warning("Initializing @diff.data, though this should have been previously initialized by creation or importation of diffusion map.") if (nrow(object@dm@eigenvectors) == 0) { stop("Make sure your diffusion map is loaded into the object (calcDM or importDM)") } [email protected] <- data.frame(row.names = rownames(dm@eigenvectors)) } if (nrow(object@pseudotime) == 0) { warning("Initializing @pseudotime, though this should have been previously initialized by creation or importation of diffusion map.") if (nrow(object@dm@eigenvectors) == 0) { stop("Make sure your diffusion map is loaded into the object (calcDM or importDM)") } object@pseudotime <- data.frame(row.names = rownames(dm@eigenvectors)) }

I think it should be object@dm@eigenvectors instead of dm@eigenvectors

Do you have any idea why it hasn't been initialized by creation or importation of diffusion map ?

@celinech
Copy link

celinech commented Feb 3, 2023

Hi mary, I'm not implied in the dev of the tool, I'm just using it.

Do you run the CalcDM function before ? or import it, as in the tutorials ?
I say so because you have 1°) an error message

Error in rownames(dm@eigenvectors) : object 'dm' not found

and 2°) the warning message

Warning message: In floodPseudotimeProcess(obj.urd, flood.res, floods.name = "pseudotime") : Initializing @diff.data, though this should have been previously initialized by creation or importation of diffusion map.

The main message here is that you don't have the dm slot in your urd object.
Hope this will help !

@mary77
Copy link
Author

mary77 commented Feb 3, 2023

Hi Celinech,

Thanks for your reply, Yes I used CalcDM to generate dm and I have it in my object. This issue happened once when I save dm and used it later in another session. I don't know something might went wrong with saving.

But I think there is a bug in the code in floodPseudotimeProcess() function which have URD obj as the parameter but try to access the dm@eigenvectors instead of object@dm@eigenvectors.

Probably dev forgot to initialize the dm first.

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

2 participants