def test_report_concise(self): """report: report run in 'concise' mode """ # Make a mock auto-process directory mockdir = MockAnalysisDirFactory.bcl2fastq2( '170901_M00879_0087_000000000-AGEW9', 'miseq', metadata={ "source": "testing", "run_number": 87, "assay": "Nextera" }, project_metadata={ "AB": { "User": "******", "Library type": "RNA-seq", "Organism": "Human", "PI": "Audrey Bower" }, "CDE": { "User": "******", "Library type": "ChIP-seq", "Organism": "Mouse", "PI": "Colin Delaney Eccleston" } }, top_dir=self.dirn) mockdir.create() # Make autoprocess instance ap = AutoProcess(analysis_dir=mockdir.dirn) # Generate concise report self.assertEqual( report_concise(ap), "Paired end: 'AB': Alison Bell, Human RNA-seq (PI: Audrey Bower) (2 samples); 'CDE': Charles David Edwards, Mouse ChIP-seq (PI: Colin Delaney Eccleston) (2 samples)" )
def test_report_concise_no_projects(self): """report: report run with no projects in 'concise' mode """ # Make a mock auto-process directory mockdir = MockAnalysisDirFactory.bcl2fastq2( '170901_M00879_0087_000000000-AGEW9', 'miseq', metadata={ "source": "testing", "run_number": 87, }, top_dir=self.dirn) mockdir.create(no_project_dirs=True) # Make autoprocess instance ap = AutoProcess(analysis_dir=mockdir.dirn) # Generate concise report self.assertEqual( report_concise(ap), "Paired end: no projects found; contents of 'bcl2fastq' are: 'AB' (2 samples), 'CDE' (2 samples)" )