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")])
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)
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"), [])