예제 #1
0
    def test_params_form(self):

        # -------------------
        # VCF file test
        # -------------------
        self.assertTrue(self.dataset_vcf.is_vcf_file(), "Should be a VCF file")

        self.assertTrue(not self.dataset_vcf.is_fastq_file(),
                        "Should not be FastQ file")

        self.assertEqual(self.dataset_vcf.get_file_patterns(),\
                    GENTB_VCF_FILE_PATTERNS)

        pipeline_runner = PipelineScriptRunner(self.dataset_vcf)

        script_directory = pipeline_runner.step1_get_script_directory_info()
        self.assertTrue(script_directory is not None)
        script_command = pipeline_runner.step2_get_script_command(
            script_directory)
        print script_command

        self.assertTrue(script_command is not None)
        #if script_command is not NOne:
        #    pipeline_runner.step3_run_command(script_command)

        # -------------------
        # FastQ file test
        # -------------------
        self.assertTrue(not self.dataset_fastq.is_vcf_file(),
                        "Should NOT be a VCF file")

        self.assertTrue(self.dataset_fastq.is_fastq_file(),
                        "Should be a FastQ file")

        self.assertEqual(self.dataset_fastq.get_file_patterns(),\
                    GENTB_FASTQ_FILE_PATTERNS)
        pipeline_runner = PipelineScriptRunner(self.dataset_fastq)

        script_directory = pipeline_runner.step1_get_script_directory_info()
        self.assertTrue(script_directory is not None)

        script_command = pipeline_runner.step2_get_script_command(
            script_directory)
        print script_command

        self.assertTrue(script_command is not None)