Skip to content

Commit

Permalink
Remove inserted space before /1 and /2 when renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
bede committed Dec 14, 2024
1 parent 82b1650 commit 695d494
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hostile/aligner.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def gen_clean_cmd(
rename_cmd = (
# Preserve header (^@) lines but do not start counting until first non ^@ line
' | awk \'BEGIN {{ FS=OFS="\\t"; line_count=0 }} /^@/ {{ print $0; next }}'
' {{ $1=int(line_count+1)" "; print $0; line_count++ }}\''
" {{ $1=int(line_count+1); print $0; line_count++ }}'"
if rename
else ""
)
Expand Down Expand Up @@ -197,7 +197,7 @@ def gen_paired_clean_cmd(
rename_cmd = (
# Preserve header (^@) lines but do not start counting until first non ^@ line
' | awk \'BEGIN {{ FS=OFS="\\t"; start=0; line_count=1 }} /^@/ {{ print $0; next }}'
' !start && !/^@/ {{ start=1 }} start {{ $1=int((line_count+1)/2)" ";'
" !start && !/^@/ {{ start=1 }} start {{ $1=int((line_count+1)/2);"
" print $0; line_count++ }}'"
if rename
else ""
Expand Down

0 comments on commit 695d494

Please sign in to comment.