Repository: Lioscro/ngs-tools (language: python)

Issue:
Add STORM-seq chemistry support
Hi @Lioscro - thanks so much for ngs-tools!

I'd love to add STORM-seq (https://www.biorxiv.org/content/10.1101/2022.03.14.484332v3), our plate-based, ribo-reduced single cell total RNA protocol into ngs-tools, and ultimately kallisto and kb. 

I think I've added everything correctly, including an associated test and bumped the patch version to 1.8.1. Please let me know if you'd like anything else added to the PR. Thanks so much!
Add STORM-seq chemistry support
Hi @Lioscro - thanks so much for ngs-tools!

I'd love to add STORM-seq (https://www.biorxiv.org/content/10.1101/2022.03.14.484332v3), our plate-based, ribo-reduced single cell total RNA protocol into ngs-tools, and ultimately kallisto and kb. 

I think I've added everything correctly, including an associated test and bumped the patch version to 1.8.1. Please let me know if you'd like anything else added to the PR. Thanks so much!


Discussion / hints:

Fix patch:
diff --git a/ngs_tools/chemistry/SingleCellChemistry.py b/ngs_tools/chemistry/SingleCellChemistry.py
index f5d4977..bf1da47 100755
--- a/ngs_tools/chemistry/SingleCellChemistry.py
+++ b/ngs_tools/chemistry/SingleCellChemistry.py
@@ -281,6 +281,19 @@ def whitelist_path(self) -> str:
     ),
     umi_parser=SubSequenceParser(SubSequenceDefinition(0, 11, 8)),
 )
+
+_STORMSEQ = SingleCellChemistry(
+    name='STORM-seq',
+    description=(
+        'Plate-based, ribo-reduced single-cell total RNA-seq chemistry developed by Johnson and Rhodes et al. 2022'
+    ),
+    n=2,
+    strand=SequencingStrand.REVERSE,
+    cdna_parser=SubSequenceParser(
+        SubSequenceDefinition(0), SubSequenceDefinition(1, 14, None)
+    ),
+    umi_parser=SubSequenceParser(SubSequenceDefinition(1, 0, 8)),
+)
 _SCI_FATE = SingleCellChemistry(
     name='Sci-fate',
     description=(
@@ -320,7 +333,7 @@ def whitelist_path(self) -> str:
     ),
     umi_parser=SubSequenceParser(SubSequenceDefinition(1, 0, 10)),
 )
-_PLATE_SINGLE_CELL_CHEMISTRIES = [_SMARTSEQ_V2, _SMARTSEQ_V3, _BDWTA]
+_PLATE_SINGLE_CELL_CHEMISTRIES = [_SMARTSEQ_V2, _SMARTSEQ_V3, _BDWTA, _STORMSEQ]
 _DROPLET_SINGLE_CELL_CHEMISTRIES = [
     _DROPSEQ, _10X_V1, _10X_V2, _10X_V3, _10X_V3_ULTIMA, _10X_FB, _10X_ATAC,
     _INDROPS_V1, _INDROPS_V2, _INDROPS_V3, _SURECELL, _SCI_FATE


Test patch:
diff --git a/tests/test_chemistry.py b/tests/test_chemistry.py
index 277eba8..54911f9 100755
--- a/tests/test_chemistry.py
+++ b/tests/test_chemistry.py
@@ -175,6 +175,14 @@ def test_10xv3(self):
         },
                          chemistry.get_chemistry('10xv3').parse([seq1, seq2]))
 
+    def test_stormseq(self):
+        seq1 = 'ABCEDEFGHIJKLMNOPQRSTUVWXYZ'
+        seq2 = 'abcdefghnnnnnnIJKLMNOPQRSTUVWXYZ'
+        self.assertEqual({
+            'umi': ('abcdefgh',),
+            'cdna': ('ABCEDEFGHIJKLMNOPQRSTUVWXYZ', 'IJKLMNOPQRSTUVWXYZ')
+        },
+                         chemistry.get_chemistry('STORM-seq').parse([seq1, seq2]))
     def test_to_kallisto_bus_arguments(self):
         chem = chemistry.get_chemistry('10xv3')
         self.assertEqual({'-x': '0,0,16:0,16,28:1,0,0'},