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

ComputeError in motif discovery #77

Open
Ge0rges opened this issue Oct 12, 2024 · 2 comments
Open

ComputeError in motif discovery #77

Ge0rges opened this issue Oct 12, 2024 · 2 comments

Comments

@Ge0rges
Copy link

Ge0rges commented Oct 12, 2024

Hello,

I wanted to report this error when running motif discovery.

Traceback (most recent call last):
  File "/Accounts/gkanaan/miniconda3/nanomotif/bin/nanomotif", line 8, in <module>
    sys.exit(main())
  File "/Accounts/gkanaan/miniconda3/nanomotif/lib/python3.9/site-packages/nanomotif/main.py", line 563, in main
    motif_discovery(args)
  File "/Accounts/gkanaan/miniconda3/nanomotif/lib/python3.9/site-packages/nanomotif/main.py", line 361, in motif_discovery
    bin_consensus(args, pileup=pileup, assembly=assembly, motifs=motifs, motifs_scored=scored_all)
  File "/Accounts/gkanaan/miniconda3/nanomotif/lib/python3.9/site-packages/nanomotif/main.py", line 315, in bin_consensus
    output = nm.bin_consensus.within_bin_motifs_consensus(pileup.pileup, assembly, motifs, motifs_scored, bins)
  File "/Accounts/gkanaan/miniconda3/nanomotif/lib/python3.9/site-packages/nanomotif/bin_consensus.py", line 49, in within_bin_motifs_consensus
    bin_motifs = contig_motifs.groupby("bin", "motif", "mod_position", "mod_type") \
  File "/Accounts/gkanaan/miniconda3/nanomotif/lib/python3.9/site-packages/polars/dataframe/frame.py", line 8054, in with_columns
    return self.lazy().with_columns(*exprs, **named_exprs).collect(_eager=True)
  File "/Accounts/gkanaan/miniconda3/nanomotif/lib/python3.9/site-packages/polars/lazyframe/frame.py", line 1810, in collect
    return wrap_df(ldf.collect())
polars.exceptions.ComputeError: ComputeError: The output type of the 'apply' function cannot be determined.
The function was never called because 'skip_nulls=True' and all values are null.
Consider setting 'skip_nulls=False' or setting the 'return_dtype'.
@SorenHeidelbach
Copy link
Collaborator

SorenHeidelbach commented Oct 15, 2024

Can you provide the freeze of the enviroment you are using (pip freeze or conda list if using conda)? And possibly the output in motif.tsv in the nanomotif output folder?

Thank you!

@Ge0rges
Copy link
Author

Ge0rges commented Oct 15, 2024

Sure here they are.
conda_list.txt
motifs.txt
pip_freeze.txt

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