Ejemplo n.º 1
0
def test_run_comHet_proband_plus_NA12878():
    ''' '''
    # Variables
    args = {
        'inputfile': 'tests/files/input_comHet.vcf',
        'outputfile': 'tests/files/main_test.out',
        'trio': ['NA12879_sample', 'NA12878_sample'],
        'VEPtag': 'VEP',
        'allow_undef': None,
        'filter_cmpHet': True,
        'verbose': None,
        'sep': None,
        'impact': None,
        'SpliceAItag': None
    }
    # Run
    main_comHet(args)
    # Tests
    assert [row for row in open('tests/files/main_test.out')] == [
        row for row in open('tests/files/input_comHet_plus_NA12878.out')
    ]
    # Clean
    os.remove('tests/files/main_test.out')
    os.remove('tests/files/main_test.out.summary')
    os.remove('tests/files/main_test.out.json')
Ejemplo n.º 2
0
def test_run_trio_error():  # NA12879
    ''' '''
    # Variables
    args = {
        'inputfile':
        'tests/files/input_comHet.vcf',
        'outputfile':
        'tests/files/main_test.out',
        'trio':
        ['NA12879_sample', 'NA12878_sample', 'NA12877_sample', 'extra_sample'],
        'VEPtag':
        'VEP',
        'allow_undef':
        None,
        'filter_cmpHet':
        True,
        'verbose':
        None,
        'sep':
        None,
        'impact':
        None,
        'SpliceAItag':
        None
    }
    # Run and Tests
    with pytest.raises(SystemExit) as e:
        assert main_comHet(args)
    assert str(
        e.value
    ) == '\nERROR in parsing arguments: too many sample IDs provided for trio\n'
    # Clean
    os.remove('tests/files/main_test.out')