pyranges: left join broken with ValueError and TypeError
Thanks for the package- and all the hard work that’s gone into it. Came across this issue:
f1 = pr.from_dict(
{'Chromosome': ['chr1', 'chr1', 'chr1'],
'Start': [3, 8, 12],
'Strand': ['+', '-', '+'],
'End': [4, 9, 13],
'Name': ['interval1', 'interval3', 'interval2']
}, int64=True)
f2 = pr.from_dict(
{
'Chromosome': ['chr1'],
'Start': [6],
'Strand': ['-'],
'End': [10],
'GeneName': ['test']
}, int64=True)
I’m trying to annotate f1 with f2.
f3 = f1.join(f2, strandedness="same", slack=0)
works as expected
f3 = f1.join(f2, how="left", strandedness="same", slack=0)
Fails with an error
TypeError: Cannot set a Categorical with another, without identical categories
Version is '0.0.125
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 22 (3 by maintainers)
Commits related to this issue
- 0.0.128 Fix left join category error #342 — committed to pyranges/pyranges by deleted user a year ago
- 0.0.128 Fix left join category error #342 — committed to pyranges/pyranges by deleted user a year ago
- 0.0.128 Fix left join category error #342 (#343) Co-authored-by: endre bakken stovner <endrebakkenstovner@endres-MacBook-Air.local> — committed to pyranges/pyranges by endrebak a year ago
I’ll try to fix this today. Will have to check on different pandas versions 😄