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

ValueError: Buffer dtype mismatch, expected 'const long' but got 'long long' #7

Open
sterneck opened this issue Jul 31, 2024 · 1 comment

Comments

@sterneck
Copy link

Hi,

I am using a GFF file produced by SMRT LInk from Pacific Biosciences. This was converted to a GTF file (version 3) by AGAT using Galaxy. I sorted the GTF file using IGV tools. Then, I tried to use Cerberus to generate the list of TSS and TES sites.

At first, I received the error "Cannot compute TSSes or TESes without strand info", which was described in an earlier case. I followed the advice to install your version of pyranges (https://github.com/fairliereese/pyranges). However, when I tried again, I obtained this message:

Traceback (most recent call last):
File "C:\Users\sterneck.conda\envs\cerberus6\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\sterneck.conda\envs\cerberus6\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\sterneck.conda\envs\cerberus6\Scripts\cerberus.exe_main
.py", line 7, in
File "C:\Users\sterneck.conda\envs\cerberus6\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\sterneck.conda\envs\cerberus6\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\sterneck.conda\envs\cerberus6\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\sterneck.conda\envs\cerberus6\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\sterneck.conda\envs\cerberus6\lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Users\sterneck.conda\envs\cerberus6\lib\site-packages\cerberus\main.py", line 29, in gtf_to_bed_command
return gtf_to_bed(gtf, mode, o, dist, slack)
File "C:\Users\sterneck.conda\envs\cerberus6\lib\site-packages\cerberus\cerberus.py", line 2245, in gtf_to_bed
bed = get_ends_from_gtf(gtf, mode, dist, slack)
File "C:\Users\sterneck.conda\envs\cerberus6\lib\site-packages\cerberus\cerberus.py", line 1784, in get_ends_from_gtf bed = bed.merge(strand=True,
File "C:\Users\sterneck.conda\envs\cerberus6\lib\site-packages\pyranges\pyranges_main.py", line 3145, in merge
df = pyrange_apply_single(_merge_by, self, **kwargs)
File "C:\Users\sterneck.conda\envs\cerberus6\lib\site-packages\pyranges\multithreaded.py", line 331, in pyrange_apply_single
result = call_f_single(function, nparams, df, **kwargs)
File "C:\Users\sterneck.conda\envs\cerberus6\lib\site-packages\pyranges\multithreaded.py", line 28, in call_f_single
return f.remote(df, **kwargs)
File "C:\Users\sterneck.conda\envs\cerberus6\lib\site-packages\pyranges\methods\merge.py", line 65, in _merge_by
ids, starts, ends, number = merge_by(cdf.Start.values, cdf.End.values, cdf.ClusterBy.values, slack)
File "sorted_nearest\src\merge_by.pyx", line 10, in sorted_nearest.src.merge_by.merge_by
ValueError: Buffer dtype mismatch, expected 'const long' but got 'long long'

Any helpful suggestions?

Very many thanks!

@sterneck
Copy link
Author

I was able to make it work by making two changes.

First, instead of using python 3.9, I used python 3.8.6
Second, I used pyranges version 0.0.125.

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