Package: pyranges / 0.0.111+ds-4

fix_dtype.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Description: Explicitly case variable to category dtype
Author: Nilesh Patra <nilesh@debian.org>
Last-Update: 2021-11-03
--- a/pyranges/methods/concat.py
+++ b/pyranges/methods/concat.py
@@ -43,7 +43,8 @@
     if any(strand_info) and not all(strand_info):
         new_res = {}
         for k, v in res.items():
-            v.loc[:, "Strand"] = v.Strand.cat.add_categories(["."])
+            type_v = v.Strand.astype('category')
+            v.loc[:, "Strand"] = type_v.cat.add_categories(["."])
             new_res[k] = v.assign(Strand=v.Strand.fillna("."))
         res = pr.PyRanges(new_res)
         res.Strand = res.Strand