예제 #1
0
    def run(self):
        brca_resources_dir = self.cfg.resources_dir
        artifacts_dir = pipeline_utils.create_path_if_nonexistent(
            self.cfg.output_dir + "/release/artifacts")

        os.chdir(gnomAD_method_dir)

        args = [
            "python", "gnomad_to_vcf.py", "-i",
            self.input().path, "-o",
            self.output().path, "-a", "gnomADAnnotation", "-r",
            brca_resources_dir + "/refseq_annotation.hg19.gp", "-g",
            brca_resources_dir + "/hg19.fa", "-l",
            artifacts_dir + "/gnomAD_error_variants.log", "-s", "gnomAD"
        ]

        logger.info("Running gnomad_to_vcf.py with the following args: %s",
                    args)

        sp = subprocess.Popen(args,
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE)
        pipeline_utils.print_subprocess_output_and_error(sp)

        pipeline_utils.check_file_for_contents(self.output().path)
예제 #2
0
    def run(self):
        with open(self.output().path, 'w') as f:
            args = ["vcf-sort", self.input().path]
            logger.info("Running vcf-sort with the following args: %s", args)
            sp = subprocess.Popen(args, stdout=f, stderr=subprocess.PIPE)
            pipeline_utils.print_subprocess_output_and_error(sp)

        pipeline_utils.check_file_for_contents(self.output().path)
        logger.info("Sorting of concatenated files complete.")
예제 #3
0
    def run(self):
        brca_resources_dir = self.cfg.resources_dir

        args = ["CrossMap.py", "vcf", brca_resources_dir + "/hg19ToHg38.over.chain.gz",
                self.gnomAD_file_dir + "/gnomAD.clean.hg19.vcf", brca_resources_dir + "/hg38.fa",
                self.gnomAD_file_dir + "/gnomAD.clean.hg38.vcf"]

        logger.info("Running CrossMap.py with the following args: %s", args)

        sp = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        pipeline_utils.print_subprocess_output_and_error(sp)

        pipeline_utils.check_file_for_contents(self.output().path)
예제 #4
0
    def run(self):
        sorted_concatenated_brca_output_file = self.output().path
        concatenated_brca_output_file = self.input().path

        with open(sorted_concatenated_brca_output_file, 'w') as f:
            args = ["vcf-sort", concatenated_brca_output_file]
            logger.info("Calling vcf-sort with the following args: %s", args)
            sp = subprocess.Popen(args, stdout=f, stderr=subprocess.PIPE)
            pipeline_utils.print_subprocess_output_and_error(sp)

        pipeline_utils.check_file_for_contents(
            sorted_concatenated_brca_output_file)
        logger.info("Sorting of concatenated files complete.")
    def run(self):
        concatenated_brca_output_file = self.output().path

        with open(concatenated_brca_output_file, 'w') as f:
            # Note: requires correct installation of VCF tools and export PERL5LIB=/path/to/your/vcftools-directory/src/perl/ in path
            args = ["vcf-concat"]
            args.extend([t.path for t in self.input()])

            logger.info("Calling vcf-concat with the following args: %s", args)
            sp = subprocess.Popen(args, stdout=f, stderr=subprocess.PIPE)
            pipeline_utils.print_subprocess_output_and_error(sp)

        pipeline_utils.check_file_for_contents(concatenated_brca_output_file)
        logger.info("Concatenation complete.")
예제 #6
0
    def run(self):
        concatenated_brca_output_file = self.output().path

        with open(concatenated_brca_output_file, 'w') as f:
            # Note: requires correct installation of VCF tools and export PERL5LIB=/path/to/your/vcftools-directory/src/perl/ in path
            args = ["vcf-concat"]
            args.extend([t.path for t in self.input()])

            logger.info("Calling vcf-concat with the following args: %s", args)
            sp = subprocess.Popen(args, stdout=f, stderr=subprocess.PIPE)
            pipeline_utils.print_subprocess_output_and_error(sp)

        pipeline_utils.check_file_for_contents(concatenated_brca_output_file)
        logger.info("Concatenation complete.")
예제 #7
0
    def run(self):
        artifacts_dir = pipeline_utils.create_path_if_nonexistent(
            self.cfg.output_dir + "/release/artifacts")
        os.chdir(gnomAD_method_dir)

        args = [
            "python", "download_gnomad_data.py", "-o",
            self.output().path, "-l",
            artifacts_dir + "/download_gnomAD_data.log"
        ]
        sp = subprocess.Popen(args,
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE)

        pipeline_utils.print_subprocess_output_and_error(sp)

        pipeline_utils.check_file_for_contents(self.output().path)
예제 #8
0
    def run(self):
        os.chdir(gnomAD_method_dir)

        args = [
            "python", "parse_gnomad_data.py", "-i",
            self.input().path, "-o",
            self.output().path
        ]

        logger.info("Running parse_gnomad_data.py with the following args: %s",
                    args)

        sp = subprocess.Popen(args,
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE)
        pipeline_utils.print_subprocess_output_and_error(sp)

        pipeline_utils.check_file_for_contents(self.output().path)
예제 #9
0
    def run(self):
        pipeline_utils.create_path_if_nonexistent(
            os.path.dirname(self.output().path))

        copy(self.req_task.output().path, self.output().path)
        pipeline_utils.check_file_for_contents(self.output().path)
예제 #10
0
    def run(self):
        pipeline_utils.create_path_if_nonexistent(
            os.path.dirname(self.output().path))

        copy(self.req_task.output().path, self.output().path)
        pipeline_utils.check_file_for_contents(self.output().path)