cutseq 0.0.45__tar.gz → 0.0.47__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.45
3
+ Version: 0.0.47
4
4
  Summary: Automatically cut adapter / barcode / UMI from NGS data
5
5
  Home-page: https://github.com/y9c/cutseq
6
6
  License: MIT
@@ -99,9 +99,8 @@ logging.basicConfig(
99
99
 
100
100
 
101
101
  def reverse_complement(b):
102
- return "".join(
103
- [dict(zip("ATGCNatgcn", "TACGNtacgn"))[x] for x in b[::-1] if x in "ATGCNatgcn"]
104
- )
102
+ comp_map = dict(zip("ATGCatgc", "TACGtacg"))
103
+ return "".join([comp_map.get(x, x) for x in b[::-1]])
105
104
 
106
105
 
107
106
  def remove_fq_suffix(f):
@@ -122,6 +121,11 @@ class BarcodeSeq:
122
121
  self.rc = reverse_complement(seq)
123
122
  self.len = len(seq)
124
123
 
124
+ def __repr__(self):
125
+ if self.len == 0:
126
+ return ""
127
+ return f"{self.fw} ({self.rc})"
128
+
125
129
 
126
130
  class BarcodeConfig:
127
131
  """
@@ -640,8 +644,20 @@ def pipeline_paired(
640
644
 
641
645
  # dry run and exit code
642
646
  if settings.dry_run:
647
+ for b in [
648
+ "p5",
649
+ "p7",
650
+ "inline5",
651
+ "inline3",
652
+ "umi5",
653
+ "umi3",
654
+ "mask5",
655
+ "mask3",
656
+ "strand",
657
+ ]:
658
+ print(f"{b}: {getattr(barcode, b)}")
643
659
  for i, m in enumerate(modifiers, 1):
644
- print(f"Step {i}: {m}")
660
+ logging.info(f"Step {i}: {m}")
645
661
  return
646
662
 
647
663
  inpaths = InputPaths(input1, input2)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "cutseq"
3
- version = "0.0.45"
3
+ version = "0.0.47"
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