def test_get_fastq_input_files_if_no_disambiguation(self): fq_files = ( '/path/to/1_1_trimmed.fq.gz', '/path/to/1_2_trimmed.fq.gz' ) sample_config = {'files': list(fq_files)} result = ericscript.prepare_input_data(sample_config) assert result == fq_files
def test_get_disambiguated_bam(self, mocker): sample_config = { 'config': { 'algorithm': { 'disambiguate': ['mm9'], } }, 'work_bam': '/path/to/disambiguate_star/Test1.nsorted.human.sorted.bam', 'dirs': { 'work': '/path/to/workdir' }, } convert = mocker.patch('bcbio.rnaseq.ericscript.convert_bam_to_fastq') result = ericscript.prepare_input_data(sample_config) convert.assert_called_once_with(sample_config['work_bam'], sample_config['dirs']['work'], None, None, sample_config) assert result == convert.return_value
def test_get_disambiguated_bam(self, mocker): sample_config = { 'config': { 'algorithm': { 'disambiguate': ['mm9'], } }, 'work_bam': '/path/to/disambiguate_star/Test1.nsorted.human.sorted.bam', 'dirs': {'work': '/path/to/workdir'}, } convert = mocker.patch('bcbio.rnaseq.ericscript.convert_bam_to_fastq') result = ericscript.prepare_input_data(sample_config) convert.assert_called_once_with( sample_config['work_bam'], sample_config['dirs']['work'], None, None, sample_config ) assert result == convert.return_value