Esempio n. 1
0
 def setUp(self): 
     self.options = Args()
     self.options.config_file = get_file('defaults.cfg')
     self.config = parse_config(self.options)
     self.options.output_prefix = 'CEU'
     self.options.chromosome = '5'
     self.options.vcf_input = 'testcase.vcf'
     self.template = CommandTemplate(self.options,self.config)
Esempio n. 2
0
class TestRunPipeline(unittest.TestCase):
   
    def setUp(self): 
        self.options = Args()
        self.options.config_file = get_file('defaults.cfg')
        self.config = parse_config(self.options)
        self.options.output_prefix = 'CEU'
        self.options.chromosome = '5'
        self.options.vcf_input = 'testcase.vcf'
        self.template = CommandTemplate(self.options,self.config)

    def test_run_impute2(self):
        (cmd_template, prefix) = self.template.run_impute2('test.haps')
        assert prefix == \
            self.options.output_prefix + self.options.chromosome +\
            '_impute2'
        assert cmd_template[0] == '/home/smilefreak/selectionTools/bin/impute2'
        assert len(cmd_template) == 10

    def test_remove_indels_vcf(self):
        (cmd,output_name) = self.template.run_remove_indels_from_vcf()
        assert output_name == 'testcase.recode.vcf'
        assert len(cmd) == 7
        assert cmd[0] == '/home/smilefreak/selectionTools/bin/vcftools'