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 while running sub-command fit #36

Open
AntoniaChroni opened this issue Nov 9, 2023 · 3 comments
Open

Error while running sub-command fit #36

AntoniaChroni opened this issue Nov 9, 2023 · 3 comments

Comments

@AntoniaChroni
Copy link

AntoniaChroni commented Nov 9, 2023

Hey,

I have successfully run the traxerx example provided but am running into the following error when using my dataset. Do you have any insights on what is going on here? Is it related to the format of the input file?

Here is the command line used:

pyclone-vi fit -i examples/my_dataset.tsv -o output/my_dataset.h5 -c 40 -d beta-binomial -r 10

and this is the error:

Removing 24423 mutations with major copy number zero

Traceback (most recent call last):
  File "/Users/chronia/anaconda3/envs/pyclone-vi/bin/pyclone-vi", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/chronia/anaconda3/envs/pyclone-vi/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chronia/anaconda3/envs/pyclone-vi/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/chronia/anaconda3/envs/pyclone-vi/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chronia/anaconda3/envs/pyclone-vi/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chronia/anaconda3/envs/pyclone-vi/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chronia/anaconda3/envs/pyclone-vi/lib/python3.11/site-packages/pyclone_vi/cli.py", line 113, in fit
    pyclone_vi.run.fit(**kwargs)
  File "/Users/chronia/anaconda3/envs/pyclone-vi/lib/python3.11/site-packages/pyclone_vi/run.py", line 29, in fit
    log_p_data, mutations, samples = load_data(in_file, density, num_grid_points, precision=precision)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chronia/anaconda3/envs/pyclone-vi/lib/python3.11/site-packages/pyclone_vi/data.py", line 11, in load_data
    data, mutations, samples = load_pyclone_data(file_name)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chronia/anaconda3/envs/pyclone-vi/lib/python3.11/site-packages/pyclone_vi/data.py", line 78, in load_pyclone_data
    cn, mu, log_pi = cn_priors[(
                     ^^^^^^^^^^^
TypeError: unhashable type: 'Series'
@aroth85
Copy link
Collaborator

aroth85 commented Nov 10, 2023

Likely an input issue. Usually these errors happen when there is something unexpected in a column. Could you post the input? Also the configuration of your conda environment might help. Could be a version issue with Pandas or something similar.

@AntoniaChroni
Copy link
Author

Github doesn't allow me to share tsv files. Is there another way to share this?

As for the conda environment, I set it up as suggested at Github. BTW what version of Pandas is reccommended?

@AntoniaChroni
Copy link
Author

This issue was created by duplicated entries. Once removed, this was fixed. Thank you!

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