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

random_state.choice value error when passing arguments in simulate/perturbations #6

Open
DanielYuhangLi opened this issue Jan 20, 2023 · 4 comments

Comments

@DanielYuhangLi
Copy link

Hi! Been working through this tool and encountering some issues passing arguments through. I have tried to rerun everything on the vignette data and experiencing some similar issues.
One thing that has occurred for me is in the images below (hopefully it loads properly). Basically, when adding in tp_subset argument, I encounter the value error with the random state choice function. Trying to trace back (not too familiar with python) the issue seems to arise when passing the torch file labels for the time points. For some reason, it is not properly being sent as an integer - for example if I use tp 0, the value that is being read is '0'. This also occurs when I add in the tp_subset for the perturbation function as well.
Been trying at it for the week and hoping to get some input. Appreciate your time and thanks in advance!

image

@DanielYuhangLi
Copy link
Author

DanielYuhangLi commented Jan 20, 2023

When I hard code 0 or any other value into tp_subset, the code will run again. However, I am not sure if the actual output is as expected.

For my own data, I am not sure how to start asking my question. I encounter an error in a similar area of the code, seems like a data input issue again (see image below). Perhaps I am not preparing my input file properly though it is a top variable feature matrix that is transposed like the data file and metadata recoded so timepoints are sequential and I have tried both objects as well as integers for the assigned cluster to no avail.
Of note, I am running things separately on a cpu only machine as well with some small tweaks to the code.

image

@DanielYuhangLi
Copy link
Author

Just an update, changing the input in the simulate trajectories script to accept tp as integer seemed to resolve this formatting issue. The number of PC's in perturbation analysis is also hard coded as 30 which can cause mismatched matrixes for downstream analysis.

@sachitsaksena
Copy link
Collaborator

sachitsaksena commented Jan 30, 2023

Major apologies for missing this issue request - somehow we did not get a notification. Thank you for identifying and subsequently finding a solution to your issue! We will try to incorporate the type change and make PCs a variable when time permits.

@DanielYuhangLi
Copy link
Author

Thanks so much, actually, I've noticed that when the celltype is a string, I can't enter it alongside an integer for the time point data. I would then have to manually make some changes and my workaround has been just making my celltypes integers as well. Similarly, if I don't enter anything in for those arguments, my hardcoding of the input as integer will break things... my beginner coding skills limits me here.It's difficult for me to really tell if adding these things in alter my initializing cells.

I was curious if you are able to comment on the number of steps that's recommended for the perturbation analysis. I don't have an intuitive sense if I should keep it at 10 or increase things. I am still working on figuring out how to plot the cell proportions from looking at your example code - if there's any guidance on that, would be much appreciated =)

Thanks for your time!

Dan

@DanielYuhangLi DanielYuhangLi reopened this Feb 1, 2023
ekernf01 added a commit to ekernf01/prescient that referenced this issue Mar 7, 2024
ekernf01 added a commit to ekernf01/prescient that referenced this issue Mar 12, 2024
ekernf01 added a commit to ekernf01/prescient that referenced this issue Mar 13, 2024
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