Skip to content

Commit

Permalink
release 0.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
y9c committed Apr 22, 2024
1 parent 3e1faab commit 1f7c057
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 14 deletions.
Binary file added cutseq/debug_short_R1.fastq.gz
Binary file not shown.
Binary file added cutseq/debug_short_R2.fastq.gz
Binary file not shown.
Binary file added cutseq/debug_trimmed_R1.fastq.gz
Binary file not shown.
Binary file added cutseq/debug_trimmed_R2.fastq.gz
Binary file not shown.
Binary file added cutseq/debug_untrimmed_R1.fastq.gz
Binary file not shown.
Binary file added cutseq/debug_untrimmed_R2.fastq.gz
Binary file not shown.
25 changes: 12 additions & 13 deletions cutseq/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import importlib.metadata
import logging
import re
import subprocess
import sys

from cutadapt.adapters import (
Expand Down Expand Up @@ -176,18 +175,6 @@ def __init__(self):
self.threads = 1


def run_steps(steps, dry_run=False):
if dry_run:
print(
" |\\\n".join([(" " + s if i > 0 else s) for i, s in enumerate(steps)])
)
process = subprocess.run("true", shell=True, capture_output=True)
else:
cmd = " | ".join(steps)
process = subprocess.run(cmd, shell=True, capture_output=True)
return process.stdout.decode(), process.stderr.decode()


def pipeline_single(input1, output1, short1, untrimmed1, barcode, settings):
modifiers = []
# step 1: remove suffix in the read name
Expand Down Expand Up @@ -260,6 +247,12 @@ def pipeline_single(input1, output1, short1, untrimmed1, barcode, settings):
logging.warn("Library is + strand, but reverse complement is enabled.")
modifiers.append(ReverseComplementConverter())

# dry run and exit code
if settings.dry_run:
for i, m in enumerate(modifiers, 1):
print(f"Step {i}: {m}")
return

inpaths = InputPaths(input1)

with make_runner(inpaths, cores=settings.threads) as runner:
Expand Down Expand Up @@ -452,6 +445,12 @@ def pipeline_paired(
logging.warn("Library is + strand, but reverse complement is enabled.")
modifiers.append((ReverseComplementConverter(), ReverseComplementConverter()))

# dry run and exit code
if settings.dry_run:
for i, m in enumerate(modifiers, 1):
print(f"Step {i}: {m}")
return

inpaths = InputPaths(input1, input2)

with make_runner(inpaths, cores=settings.threads) as runner:
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.9"
version = "0.0.10"
description = "Automatically cut adapter / barcode / UMI from NGS data"
authors = ["Ye Chang <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 1f7c057

Please sign in to comment.