Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/cutadapt/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,11 +1105,13 @@ def make_adapter_cutter(
def make_shortener(length1: Optional[int], length2: Optional[int], paired: bool):
if paired:
if length1 is not None and length2 is not None:
# If -l and -L are given, shorten both reads.
yield Shortener(length1), Shortener(length2)
elif length1 is not None and length2 is None:
# If -L not given, use same setting for both
yield Shortener(length1), Shortener(length1)
# If only -l is given, shorten read 1.
yield Shortener(length1), None
elif length1 is None and length2 is not None:
# If only -L is given, shorten read 2.
yield None, Shortener(length2)
else:
if length1 is not None:
Expand Down