Skip to content

Commit

Permalink
release 0.0.51
Browse files Browse the repository at this point in the history
  • Loading branch information
y9c committed Jul 2, 2024
1 parent dae0188 commit 9a28111
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
35 changes: 18 additions & 17 deletions cutseq/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def __init__(self):
self.ensure_inline_barcode = False
self.trim_polyA = False
self.trim_polyA_wo_direction = False
self.read_through = False
self.conditional_cutter = False
self.min_length = 20
self.min_quality = 20
self.auto_rc = False
Expand Down Expand Up @@ -568,17 +568,17 @@ def pipeline_paired(
modifiers.append(
(
UnconditionalCutter(barcode.umi5.len),
UnconditionalCutter(-barcode.umi5.len)
if settings.read_through
else ConditionalCutter(-barcode.umi5.len),
ConditionalCutter(-barcode.umi5.len)
if settings.conditional_cutter
else UnconditionalCutter(-barcode.umi5.len),
),
)
if barcode.umi3.len > 0:
modifiers.append(
(
UnconditionalCutter(-barcode.umi3.len)
if settings.read_through
else ConditionalCutter(-barcode.umi3.len),
ConditionalCutter(-barcode.umi3.len)
if settings.conditional_cutter
else UnconditionalCutter(-barcode.umi3.len),
UnconditionalCutter(barcode.umi3.len),
)
)
Expand All @@ -592,17 +592,17 @@ def pipeline_paired(
modifiers.append(
(
UnconditionalCutter(barcode.mask5.len),
UnconditionalCutter(-barcode.mask5.len)
if settings.read_through
else ConditionalCutter(-barcode.mask5.len),
ConditionalCutter(-barcode.mask5.len)
if settings.conditional_cutter
else UnonditionalCutter(-barcode.mask5.len),
)
)
if barcode.mask3.len > 0:
modifiers.append(
(
UnconditionalCutter(-barcode.mask3.len)
if settings.read_through
else ConditionalCutter(-barcode.mask3.len),
ConditionalCutter(-barcode.mask3.len)
if settings.conditional_cutter
else UnconditionalCutter(-barcode.mask3.len),
UnconditionalCutter(barcode.mask3.len),
)
)
Expand Down Expand Up @@ -756,7 +756,7 @@ def run_cutseq(args):
settings.ensure_inline_barcode = args.ensure_inline_barcode
settings.trim_polyA = args.trim_polyA
settings.trim_polyA_wo_direction = args.trim_polyA_wo_direction
settings.read_through = args.read_through
settings.conditional_cutter = args.conditional_cutter
settings.threads = args.threads
settings.min_length = args.min_length
settings.dry_run = args.dry_run
Expand Down Expand Up @@ -882,10 +882,11 @@ def main():
)

parser.add_argument(
"--read-through",
"--conditional-cutter",
action=argparse.BooleanOptionalAction,
default=True,
help="Read through in the sequencing.",
default=False,
help="If true, only trim the UMI if the adapter is found. "
"But enforce cutting if the read length is longer than 50.",
)

parser.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cutseq"
version = "0.0.50"
version = "0.0.51"
description = "Automatically cut adapter / barcode / UMI from NGS data"
authors = ["Ye Chang <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 9a28111

Please sign in to comment.