예제 #1
0
def test_genome_coverage_samples_second_scale(testdir, mock_testclass):
    samples = Path(__file__).parent.joinpath('samples.txt')
    genome = Path(__file__).parent.joinpath('sizes.txt')
    scale = 1.5
    gc.sample_splits_genome_coverage = MagicMock()
    gc.genome_coverage_samples(samples, genome, scale=scale, index=1)
    gc.sample_splits_genome_coverage.assert_called_once_with('ASDURF', genome, scale, None, '', '-cov', None, None, ())
예제 #2
0
def test_genome_coverage_samples_all_three(testdir, mock_testclass):
    samples = Path(__file__).parent.joinpath('samples.txt')
    genome = Path(__file__).parent.joinpath('sizes.txt')
    gc.sample_splits_genome_coverage = MagicMock()
    gc.genome_coverage_samples(samples, genome, genomecov_args=('-3',))
    gc.sample_splits_genome_coverage.assert_any_call('POLR2A', genome, None, None, '', '-cov', None, None, ('-3',))
    gc.sample_splits_genome_coverage.assert_any_call('ASDURF', genome, None, None, '', '-cov', None, None, ('-3',))
    gc.sample_splits_genome_coverage.assert_any_call('POLR1C', genome, None, None, '', '-cov', None, None, ('-3',))
예제 #3
0
def test_genome_coverage_samples(testdir, mock_testclass):
    samples = Path(__file__).parent.joinpath('samples.txt')
    genome = 'sacCer3.chrom.sizes'
    copyfile(Path(__file__).parent.joinpath('sizes.txt'), genome)
    gc.sample_splits_genome_coverage = MagicMock()
    gc.genome_coverage_samples(samples)
    gc.sample_splits_genome_coverage.assert_any_call('POLR2A', genome, None, None, '', '-cov', None, None, ())
    gc.sample_splits_genome_coverage.assert_any_call('ASDURF', genome, None, None, '', '-cov', None, None, ())
    gc.sample_splits_genome_coverage.assert_any_call('POLR1C', genome, None, None, '', '-cov', None, None, ())
예제 #4
0
def test_genome_coverage_samples_all_scale_positivestrand(testdir, mock_testclass):
    samples = Path(__file__).parent.joinpath('samples.txt')
    genome = Path(__file__).parent.joinpath('sizes.txt')
    scale = 1.5
    strand = '+'
    gc.sample_splits_genome_coverage = MagicMock()
    gc.genome_coverage_samples(samples, genome, scale=scale, strand=strand)
    gc.sample_splits_genome_coverage.assert_any_call('POLR2A', genome, scale, strand, '', '-cov', None, None, ())
    gc.sample_splits_genome_coverage.assert_any_call('ASDURF', genome, scale, strand, '', '-cov', None, None, ())
    gc.sample_splits_genome_coverage.assert_any_call('POLR1C', genome, scale, strand, '', '-cov', None, None, ())
예제 #5
0
def test_genome_coverage_samples_parameters(testdir, mock_testclass):
    samples = Path(__file__).parent.joinpath('samples.txt')
    genome = 'sacCer3.chrom.sizes'
    copyfile(Path(__file__).parent.joinpath('sizes.txt'), genome)
    scale = 1.5
    strand = '+'
    input_suffix = '-forcov'
    output_suffix = '-outcov'
    spike_suffix = '-pombe'
    control_suffix = '-input'
    gc.sample_splits_genome_coverage = MagicMock()
    gc.genome_coverage_samples(samples, genome, scale, strand, input_suffix, output_suffix, spike_suffix, control_suffix, genomecov_args=('-5',))
    gc.sample_splits_genome_coverage.assert_any_call('POLR2A', genome, scale, strand, input_suffix, output_suffix, spike_suffix, control_suffix, ('-5',))
    gc.sample_splits_genome_coverage.assert_any_call('ASDURF', genome, scale, strand, input_suffix, output_suffix, spike_suffix, control_suffix, ('-5',))
    gc.sample_splits_genome_coverage.assert_any_call('POLR1C', genome, scale, strand, input_suffix, output_suffix, spike_suffix, control_suffix, ('-5',))