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

AssertionError: Can only do stranded operations when both PyRanges contain strand info #21

Open
leli-li opened this issue Jul 13, 2023 · 5 comments

Comments

@leli-li
Copy link

leli-li commented Jul 13, 2023

I use LAPA on aligned pacbio data from minimap2

I got the following error:

File "/usr/nzx-cluster/apps/lapa/python3.8.11/bin/lapa", line 8, in
sys.exit(cli_lapa())
File "/usr/nzx-cluster/apps/lapa/python3.8.11/lib/python3.8/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/usr/nzx-cluster/apps/lapa/python3.8.11/lib/python3.8/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/nzx-cluster/apps/lapa/python3.8.11/lib/python3.8/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/nzx-cluster/apps/lapa/python3.8.11/lib/python3.8/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/usr/nzx-cluster/apps/lapa/python3.8.11/lib/python3.8/site-packages/lapa/main.py", line 112, in cli_lapa
lapa(alignment, fasta, annotation, chrom_sizes, output_dir,
File "/usr/nzx-cluster/apps/lapa/python3.8.11/lib/python3.8/site-packages/lapa/lapa.py", line 497, in lapa
_lapa(alignment)
File "/usr/nzx-cluster/apps/lapa/python3.8.11/lib/python3.8/site-packages/lapa/lapa.py", line 297, in call
df_cluster = self.annotate_cluster(df_cluster)
File "/usr/nzx-cluster/apps/lapa/python3.8.11/lib/python3.8/site-packages/lapa/lapa.py", line 155, in annotate_cluster
df = self.create_genomic_regions().annotate(gr)
File "/usr/nzx-cluster/apps/lapa/python3.8.11/lib/python3.8/site-packages/lapa/genomic_regions.py", line 66, in annotate
gr_ann = pr.PyRanges(gr.df, int64=True).join(
File "/usr/nzx-cluster/apps/lapa/python3.8.11/lib/python3.8/site-packages/pyranges/pyranges_main.py", line 2433, in join
dfs = pyrange_apply(_write_both, self, other, **kwargs)
File "/usr/nzx-cluster/apps/lapa/python3.8.11/lib/python3.8/site-packages/pyranges/multithreaded.py", line 207, in pyrange_apply
assert (
AssertionError: Can only do stranded operations when both PyRanges contain strand info

@amdreamer
Copy link

Same error on aligned nanopore cDNA data. Do you have solution now?

@amdreamer
Copy link

amdreamer commented Jul 15, 2023

I also tired the test data but still get the error. Here is my script running test data:
lapa
--alignment ./lapa/tests/data/brc1_pb.bam
--fasta ~/Database/genome/human/GRCh38.primary_assembly.genome.chrOnly.fa
--annotation ./lapa/tests/data/brca1.gtf
--chrom_sizes ~/Database/genome/human/GRCh38.primary_assembly.sizes.genome
--output_dir ./LAPA_test
--counting_method tail
--min_tail_len 10

The error:
Traceback (most recent call last):
File "/home/wangmr_cw/install/anaconda3/bin/lapa", line 8, in
sys.exit(cli_lapa())
File "/home/wangmr_cw/install/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/home/wangmr_cw/install/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/wangmr_cw/install/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/wangmr_cw/install/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/wangmr_cw/install/anaconda3/lib/python3.9/site-packages/lapa/main.py", line 112, in cli_lapa
lapa(alignment, fasta, annotation, chrom_sizes, output_dir,
File "/home/wangmr_cw/install/anaconda3/lib/python3.9/site-packages/lapa/lapa.py", line 497, in lapa
_lapa(alignment)
File "/home/wangmr_cw/install/anaconda3/lib/python3.9/site-packages/lapa/lapa.py", line 297, in call
df_cluster = self.annotate_cluster(df_cluster)
File "/home/wangmr_cw/install/anaconda3/lib/python3.9/site-packages/lapa/lapa.py", line 155, in annotate_cluster
df = self.create_genomic_regions().annotate(gr)
File "/home/wangmr_cw/install/anaconda3/lib/python3.9/site-packages/lapa/genomic_regions.py", line 66, in annotate
gr_ann = pr.PyRanges(gr.df, int64=True).join(
File "/home/wangmr_cw/install/anaconda3/lib/python3.9/site-packages/pyranges/pyranges_main.py", line 2433, in join
dfs = pyrange_apply(_write_both, self, other, **kwargs)
File "/home/wangmr_cw/install/anaconda3/lib/python3.9/site-packages/pyranges/multithreaded.py", line 207, in pyrange_apply
assert (
AssertionError: Can only do stranded operations when both PyRanges contain strand info

@mgandal
Copy link

mgandal commented Oct 12, 2023

We are getting the same error

@baishengjun
Copy link

baishengjun commented Nov 20, 2023

We are getting the same error. Does anyone solve this problem?
Thanks

@baishengjun
Copy link

I resolved my error using pip install pyranges==0.0.111
Hope this can help someone.

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

4 participants