示例#1
0
 def test_check_illumina_qc_outputs_singlecell_some_missing(self):
     """
     check_illumina_qc_outputs: some illumina_qc.sh outputs missing (singlecell)
     """
     # Make mock analysis project
     p = MockAnalysisProject("PJB", (
         "PJB1_S1_R1_001.fastq.gz",
         "PJB1_S1_R2_001.fastq.gz",
     ),
                             metadata={'Organism': 'Human'})
     p.create(top_dir=self.wd)
     # Add QC artefacts
     project = AnalysisProject("PJB", os.path.join(self.wd, "PJB"))
     UpdateAnalysisProject(project).add_qc_outputs(
         include_fastq_strand=False, include_multiqc=False)
     # Remove some outputs
     for f in (
             "PJB1_S1_R2_001_fastqc.html",
             "PJB1_S1_R2_001_model_organisms_screen.txt",
     ):
         os.remove(os.path.join(project.qc_dir, f))
     # Check
     self.assertEqual(
         check_illumina_qc_outputs(project,
                                   qc_dir="qc",
                                   qc_protocol="singlecell"),
         [os.path.join(project.fastq_dir, "PJB1_S1_R2_001.fastq.gz")])
示例#2
0
 def test_check_illumina_qc_outputs_standardSE_all_missing(self):
     """
     check_illumina_qc_outputs: all illumina_qc.sh outputs missing (standardSE)
     """
     # Make mock analysis project
     p = MockAnalysisProject("PJB", ("PJB1_S1_R1_001.fastq.gz", ),
                             metadata={'Organism': 'Human'})
     p.create(top_dir=self.wd)
     # Get the outputs
     project = AnalysisProject("PJB", os.path.join(self.wd, "PJB"))
     # Check
     self.assertEqual(
         check_illumina_qc_outputs(project,
                                   qc_dir="qc",
                                   qc_protocol="standardSE"),
         project.fastqs)
示例#3
0
 def test_check_illumina_qc_outputs_standardSE_all_present(self):
     """
     check_illumina_qc_outputs: all illumina_qc.sh outputs present (standardSE)
     """
     # Make mock analysis project
     p = MockAnalysisProject("PJB", ("PJB1_S1_R1_001.fastq.gz", ),
                             metadata={'Organism': 'Human'})
     p.create(top_dir=self.wd)
     # Add QC artefacts
     project = AnalysisProject("PJB", os.path.join(self.wd, "PJB"))
     UpdateAnalysisProject(project).add_qc_outputs(
         include_fastq_strand=False, include_multiqc=False)
     # Check
     self.assertEqual(
         check_illumina_qc_outputs(project,
                                   qc_dir="qc",
                                   qc_protocol="standardSE"), [])