Skip to content

Commit

Permalink
release 0.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
y9c committed Apr 22, 2024
1 parent 8b7906b commit 8e69a91
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions cutseq/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Created: 2024-04-19 18:57

import argparse
import importlib.metadata
import logging
import re
import subprocess
Expand All @@ -31,6 +32,7 @@
)
from cutadapt.pipeline import PairedEndPipeline, SingleEndPipeline
from cutadapt.predicates import Predicate, TooShort
from cutadapt.report import Statistics
from cutadapt.runners import make_runner
from cutadapt.steps import (
PairedEndFilter,
Expand All @@ -40,6 +42,22 @@
)
from cutadapt.utils import Progress

# monkey patching ....
original_method = Statistics._collect_modifier


def patched_problematic_method(self, *args, **kwargs):
try:
return original_method(self, *args, **kwargs)
except AssertionError:
pass


Statistics._collect_modifier = patched_problematic_method


__version__ = importlib.metadata.version(__package__ or __name__)

logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(levelname)s - %(message)s",
Expand Down Expand Up @@ -578,6 +596,11 @@ def main():
action="store_true",
help="Print command instead of running it.",
)

parser.add_argument(
"-V", "--version", action="version", version=f"%(prog)s {__version__}"
)

args = parser.parse_args()

if args.adapter_name is not None:
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.5"
version = "0.0.6"
description = "Automatically cut adapter / barcode / UMI from NGS data"
authors = ["Ye Chang <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 8e69a91

Please sign in to comment.