cutseq 0.0.7__tar.gz → 0.0.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cutseq
3
- Version: 0.0.7
3
+ Version: 0.0.8
4
4
  Summary: Automatically cut adapter / barcode / UMI from NGS data
5
5
  Home-page: https://github.com/y9c/cutseq
6
6
  License: MIT
@@ -83,7 +83,7 @@ class ReverseComplementConverter(SingleEndModifier):
83
83
  self.rcd = False
84
84
 
85
85
  def __repr__(self):
86
- return f"UnconditionalCutter(length={self.length})"
86
+ return "ReverseComplementConverter()"
87
87
 
88
88
  def __call__(self, read, info):
89
89
  return read.reverse_complement()
@@ -256,6 +256,8 @@ def pipeline_single(input1, output1, short1, untrimmed1, barcode, settings):
256
256
 
257
257
  # step 9: reverse complement the read
258
258
  if settings.reverse_complement:
259
+ if barcode.strand == "+":
260
+ logging.warn("Library is + strand, but reverse complement is enabled.")
259
261
  modifiers.append(ReverseComplementConverter())
260
262
 
261
263
  inpaths = InputPaths(input1)
@@ -267,14 +269,16 @@ def pipeline_single(input1, output1, short1, untrimmed1, barcode, settings):
267
269
  interleaved=False,
268
270
  )
269
271
  steps = []
272
+ # TODO: report info
273
+ # --info-file=info.txt
274
+ # PairedSingleEndStep(InfoFileWriter(outfiles.open_text("info.txt"))),
270
275
  steps.append(
271
- # --info-file=info.txt
272
- # PairedSingleEndStep(InfoFileWriter(outfiles.open_text("info.txt"))),
273
276
  # -m 10
274
277
  SingleEndFilter(
275
278
  TooShort(settings.min_length), outfiles.open_record_writer(short1)
276
279
  ),
277
280
  )
281
+ # TODO: --max-n=0 support
278
282
  if (
279
283
  settings.ensure_inline_barcode
280
284
  and barcode.inline5.len + barcode.inline3.len > 0
@@ -285,7 +289,6 @@ def pipeline_single(input1, output1, short1, untrimmed1, barcode, settings):
285
289
  if barcode.inline3.len > 0:
286
290
  ref_adapters.append(adapter_inline3)
287
291
  steps.append(
288
- # TODO: --max-n=0 support
289
292
  SingleEndFilter(
290
293
  IsUntrimmedAny(ref_adapters),
291
294
  outfiles.open_record_writer(untrimmed1, interleaved=False),
@@ -444,6 +447,8 @@ def pipeline_paired(
444
447
 
445
448
  # step 9: reverse complement the read
446
449
  if settings.reverse_complement:
450
+ if barcode.strand == "+":
451
+ logging.warn("Library is + strand, but reverse complement is enabled.")
447
452
  modifiers.append((ReverseComplementConverter(), ReverseComplementConverter()))
448
453
 
449
454
  inpaths = InputPaths(input1, input2)
@@ -465,12 +470,12 @@ def pipeline_paired(
465
470
  outfiles.open_record_writer(short1, short2, interleaved=False),
466
471
  )
467
472
  )
473
+ # TODO: --max-n=0 support
468
474
  if (
469
475
  settings.ensure_inline_barcode
470
476
  and barcode.inline5.len + barcode.inline3.len > 0
471
477
  ):
472
478
  steps.append(
473
- # TODO: --max-n=0 support
474
479
  PairedEndFilter(
475
480
  IsUntrimmedAny([adapter_inline5])
476
481
  if barcode.inline5.len > 0
@@ -495,7 +500,7 @@ def pipeline_paired(
495
500
 
496
501
 
497
502
  def run_cutseq(args):
498
- barcode_config = BarcodeConfig(args.adapter_scheme.upper())
503
+ barcode_config = BarcodeConfig(args.replace(" ", "").adapter_scheme.upper())
499
504
  settings = CutadaptConfig()
500
505
  settings.rname_suffix = args.with_rname_suffix
501
506
  settings.ensure_inline_barcode = args.ensure_inline_barcode
@@ -630,6 +635,11 @@ def main():
630
635
  "-V", "--version", action="version", version=f"%(prog)s {__version__}"
631
636
  )
632
637
 
638
+ # Check if no arguments were provided
639
+ if len(sys.argv) == 1:
640
+ parser.print_help(sys.stdout)
641
+ sys.exit(0)
642
+
633
643
  args = parser.parse_args()
634
644
 
635
645
  if args.adapter_name is not None:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "cutseq"
3
- version = "0.0.7"
3
+ version = "0.0.8"
4
4
  description = "Automatically cut adapter / barcode / UMI from NGS data"
5
5
  authors = ["Ye Chang <yech1990@gmail.com>"]
6
6
  license = "MIT"
File without changes
File without changes