mortazavilab / lapa

Alternative polyadenylation detection from diverse data sources such as 3'-seq, long-read and short-reads.
https://www.biorxiv.org/content/10.1101/2022.11.08.515683v1
23 stars 13 forks source link

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

Open leli-li opened 1 year ago

leli-li commented 1 year ago

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 commented 1 year ago

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

amdreamer commented 1 year ago

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 commented 11 months ago

We are getting the same error

baishengjun commented 10 months ago

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

baishengjun commented 10 months ago

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