diff --git a/README.md b/README.md index abb4601..a0145c4 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,12 @@ Instrument types supported in checkQC are the following: - HiSeq2500 - MiSeq - NovaSeq + - ISeq + - NextSeq Install instructions -------------------- -CheckQC **requires Python 3.5** (or higher to run). CheckQC can be installed with pip. +CheckQC **requires Python 3.5 or Python3.6**. CheckQC can be installed with pip. ``` pip install checkqc diff --git a/checkQC/default_config/config.yaml b/checkQC/default_config/config.yaml index 424b842..a4430b6 100644 --- a/checkQC/default_config/config.yaml +++ b/checkQC/default_config/config.yaml @@ -316,7 +316,7 @@ miseq_v3: error: 9 # 50 % of threshold for clusters pass filter iseq_v1: - 300: + 301: handlers: - name: ClusterPFHandler warning: 4 # Millons of clusters @@ -331,3 +331,38 @@ iseq_v1: - name: ReadsPerSampleHandler warning: unknown error: 2 # 50 % of threshold for clusters pass filter + +# TODO The nextseq really has a high and a mid-output mode. +# This needs to be supported here later. +# /JD 2018-09-13 +nextseq_v1: + 76: + handlers: + - name: ClusterPFHandler + warning: 400 # Millons of clusters + error: unknown + - name: Q30Handler + warning: 80 # Give percentage for reads greater than Q30 + error: unknown # Give percentage for reads greater than Q30 + - name: ErrorRateHandler + allow_missing_error_rate: False + warning: 1.5 + error: unknown + - name: ReadsPerSampleHandler + warning: unknown + error: 200 # 50 % of threshold for clusters pass filter + 151: + handlers: + - name: ClusterPFHandler + warning: 400 # Millons of clusters + error: unknown + - name: Q30Handler + warning: 75 # Give percentage for reads greater than Q30 + error: unknown # Give percentage for reads greater than Q30 + - name: ErrorRateHandler + allow_missing_error_rate: False + warning: 1.5 + error: unknown + - name: ReadsPerSampleHandler + warning: unknown + error: 200 # 50 % of threshold for clusters pass filter diff --git a/checkQC/run_type_recognizer.py b/checkQC/run_type_recognizer.py index 81a4e3f..c893c66 100644 --- a/checkQC/run_type_recognizer.py +++ b/checkQC/run_type_recognizer.py @@ -56,6 +56,15 @@ def reagent_version(runtype_recognizer): """ raise NotImplementedError +class NextSeq(IlluminaInstrument): + @staticmethod + def name(): + return "nextseq" + + @staticmethod + def reagent_version(runtype_recognizer): + return "v1" + class ISeq(IlluminaInstrument): @staticmethod @@ -176,7 +185,8 @@ def instrument_type(self): "D": "hiseq2500", "ST": "hiseqx", "A": "novaseq", - "FFSP": "iseq"} + "FFSP": "iseq", + "NS": "nextseq"} for key, value in machine_type_mappings.items(): if instrument_name.startswith(key): diff --git a/tests/test_run_type_recognizer.py b/tests/test_run_type_recognizer.py index a190c2f..846c822 100644 --- a/tests/test_run_type_recognizer.py +++ b/tests/test_run_type_recognizer.py @@ -4,7 +4,7 @@ import os from checkQC.exceptions import RunModeUnknown, ReagentVersionUnknown -from checkQC.run_type_recognizer import RunTypeRecognizer, HiSeq2500, MiSeq, NovaSeq, ISeq +from checkQC.run_type_recognizer import RunTypeRecognizer, HiSeq2500, MiSeq, NovaSeq, ISeq, NextSeq from checkQC.runfolder_reader import RunfolderReader @@ -48,6 +48,11 @@ def test_returns_iseq(self): actual = runtyperecognizer.instrument_type() self.assertTrue(isinstance(actual, ISeq)) + def test_returns_nextseq(self): + runtyperecognizer = self._create_runtype_recognizer("NS500559") + actual = runtyperecognizer.instrument_type() + self.assertTrue(isinstance(actual, NextSeq)) + class TestIlluminaInstrument(TestCase): @@ -60,6 +65,7 @@ def setUp(self): self.miseq = MiSeq() self.novaseq = NovaSeq() self.iseq = ISeq() + self.nextseq = NextSeq() def test_all_is_well(self): runtype_dict = {"RunParameters": {"Setup": {"RunMode": "RapidHighOutput", "Sbs": "HiSeq SBS Kit v4"}}} @@ -117,3 +123,7 @@ def test_novaseq_reagent_version_raises(self): with self.assertRaises(ReagentVersionUnknown): self.novaseq.reagent_version(mock_runtype_recognizer) + + def test_nextseq(self): + self.assertEqual(self.nextseq.name(), "nextseq") + self.assertEqual(self.nextseq.reagent_version(self.MockRunTypeRecognizer(None)), "v1")