Skip to content

Commit

Permalink
Fix bug in SE sorted_fastqs
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacovercast committed Sep 3, 2024
1 parent 72afb9c commit 0462ce6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ipyrad/assemble/names_to_fastqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,12 @@ def get_stripped_length(path: Path) -> str:
"""
# strip ugly endings
name = str(path.name)
suffs = [".", "_", "_R", ".gz", ".fq", ".fastq", "_1"]
suffs = [".", "_", "_R1", ".gz", ".fq", ".fastq", "_1"]
while any(name.endswith(i) for i in suffs):
for suff in suffs:
name = name.rstrip(suff)
# rstrip(suff) treats suff as a list of characters to remove
# and not as a suffix, so we need to use removesuffix(suff)
name = name.removesuffix(suff)
return len(path.name) - len(name)


Expand Down

0 comments on commit 0462ce6

Please sign in to comment.