Skip to content

Commit

Permalink
fix sorting?
Browse files Browse the repository at this point in the history
  • Loading branch information
Phlya committed Mar 27, 2024
1 parent f3b1973 commit a479398
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pairtools/cli/sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def sort_py(
for col in columns:
colindex = int(col) if col.isnumeric() else column_names.index(col) + 1
cols.append(
f"-k {colindex},{colindex}{'n' if isinstance(pairsam_format.DTYPES_PAIRSAM.get(column_names[colindex-1], str), int) else ''}"
f"-k {colindex},{colindex}{'n' if issubclass(pairsam_format.DTYPES_PAIRSAM.get(column_names[colindex-1], str), int) else ''}"
)
cols = " ".join(cols)
command = rf"""
Expand Down
2 changes: 2 additions & 0 deletions tests/data/mock.pairsam
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ readid05 chr2 1 chr3 2 + + UU readid05129chr2160101Mchr320CGFFXS:i:0
readid06 ! 0 chr1 3 - + NU readid06129chr1160101Mchr130CGFFXS:i:0Yt:Z:NU readid0665chr1360101Mchr110ATIIXS:i:0Yt:Z:NU
readid07 ! 0 chr1 3 - + MU readid07129chr1160101Mchr130CGFFXS:i:0Yt:Z:NU readid0765chr1360101Mchr110ATIIXS:i:0Yt:Z:NU
readid08 ! 0 ! 0 - - WW readid08129chr1160101Mchr130CGFFXS:i:0Yt:Z:WW readid0865chr1360101Mchr110ATIIXS:i:0Yt:Z:WW
readid09 chr1 120 chr1 121 + + UU readid09129chr112060101Mchr11210CGFFXS:i:0Yt:Z:UU readid0965chr112160101Mchr110ATIIXS:i:0Yt:Z:UU
readid10 chr1 13 chr1 14 + + UU readid10129chr11360101Mchr1130CGFFXS:i:0Yt:Z:UU readid1065chr11360101Mchr110ATIIXS:i:0Yt:Z:UU

0 comments on commit a479398

Please sign in to comment.