Skip to content

Commit dbfe973

Browse files
authored
msp() and mp() got the columns wrong in header (#50)
1 parent 52fe96d commit dbfe973

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

CHANGELOG.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# 0.0.58 (24.10.19)
1+
# 0.0.58 (25.10.19)
2+
- fix merge print functions
23
- make pickleable
34
- add iter as alias for itergrs in pr. namespace
45
- gr.length() shows nucleotide length (sum of all interval lengths)

pyranges/tostring2.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,16 @@ def tostring(self, n=8, merge_position=False, formatting=None, sort=False):
302302

303303
if merge_position:
304304
df = show_pos_merge_position(df)
305-
columns_dtypes["- Position -"] = "Multiple types"
306305
for k in "Chromosome Start End Strand".split():
307306
if k in columns_dtypes:
308307
del columns_dtypes[k]
309308

309+
_columns_dtypes = {}
310+
_columns_dtypes["- Position -"] = "Multiple types"
311+
for k, v in columns_dtypes.items():
312+
_columns_dtypes[k] = v
313+
columns_dtypes = _columns_dtypes
314+
310315
df = df.astype(object).reset_index(drop=True)
311316
if len(self) > n:
312317
middle = int(n / 2)

0 commit comments

Comments
 (0)