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

Cannot compute TSSes or TESes without strand info #6

Open
EmilVorsteveld opened this issue May 7, 2024 · 4 comments
Open

Cannot compute TSSes or TESes without strand info #6

EmilVorsteveld opened this issue May 7, 2024 · 4 comments

Comments

@EmilVorsteveld
Copy link

Using GTF files from GENCODE, I get the following error:

cerberus gtf_to_bed --gtf gencode.v45.annotation.gtf -o gencode.v45.annotation.out --mode tss

Exception: Cannot compute TSSes or TESes without strand info. Perhaps use extend() or subsequence() or spliced_subsequence() instead?

@fairliereese
Copy link
Member

Without digging into the issue too much, I have a feeling this might be caused by strange PyRanges stranded vs. unstranded behavior that I've been encountering lately (see this issue). Either way, I recommend installing my version of PyRanges for use with Cerberus. Try this and let me know if it solves your issue!

@EmilVorsteveld
Copy link
Author

This indeed solves this issue, thanks.
Unfortunately, for me, the agg_ics function throws the following error:
File "/Users/emilvorsteveld/miniforge3/envs/cerberus/lib/python3.9/site-packages/pandas/core/internals/base.py", line 57, in _validate_set_axis
raise ValueError(
ValueError: Length mismatch: Expected axis has 4 elements, new values have 3 elements

I have tried older pandas versions (1.3.0 and 1.5.3), but not luck...

@fairliereese
Copy link
Member

Hi, sorry for the delay. Can you please attach the complete error message stack trace so I can see what line in Cerberus threw the error?

Thanks!

@Yuej24
Copy link

Yuej24 commented Nov 5, 2024

Hi, I also met the same problem (ValueError: Length mismatch: Expected axis has 4 elements, new values have 3 elements). Here is my complete error message trace:
Traceback (most recent call last):
File "/usr/local/bin/cerberus", line 8, in
sys.exit(cli())
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/cerberus/main.py", line 71, in agg_ics_command
return agg_ics_config(input, o)
File "/usr/local/lib/python3.8/site-packages/cerberus/cerberus.py", line 2272, in agg_ics_con
fig
ics, refs, sources = parse_agg_ics_config(input)
File "/usr/local/lib/python3.8/site-packages/cerberus/cerberus.py", line 1713, in parse_agg_i
cs_config
df.columns = ['fname', 'ref', 'source']
File "/usr/local/lib/python3.8/site-packages/pandas/core/generic.py", line 6002, in __setattr
__
return object.setattr(self, name, value)
File "pandas/_libs/properties.pyx", line 69, in pandas._libs.properties.AxisProperty.set
File "/usr/local/lib/python3.8/site-packages/pandas/core/generic.py", line 730, in _set_axis
self._mgr.set_axis(axis, labels)
File "/usr/local/lib/python3.8/site-packages/pandas/core/internals/managers.py", line 225, in
set_axis
self._validate_set_axis(axis, new_labels)
File "/usr/local/lib/python3.8/site-packages/pandas/core/internals/base.py", line 70, in _validate_set_axis
raise ValueError(
ValueError: Length mismatch: Expected axis has 4 elements, new values have 3 elements

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

3 participants