예제 #1
0
    def setDefaults(self, config_dict):
        """
        Check mandatory keys and set defaults for any missing keys
        :param config_dict: config dictionary
        :return: config dictionary with defaults
        """
        # check mandatory keys
        config_dict = utils.checkKeys(
            config_dict,
            keys=["htmlOutputPath", "root", "sampleAnnotation"],
            check_files=True)
        config_dict["geneAnnotation"] = utils.checkKeys(
            config_dict["geneAnnotation"], keys=None, check_files=True)

        config_dict["wBuildPath"] = utils.getWBuildPath()

        setKey = utils.setKey
        setKey(config_dict, None, "fileRegex", ".*\.(R|md)")
        setKey(config_dict, None, "genomeAssembly", "hg19")

        # set submodule dictionaries
        setKey(config_dict, None, "aberrantExpression", dict())
        setKey(config_dict, None, "aberrantSplicing", dict())
        setKey(config_dict, None, "mae", dict())
        setKey(config_dict, None, "exportCounts", dict())

        # commandline tools
        setKey(config_dict, None, "tools", dict())
        setKey(config_dict, ["tools"], "samtoolsCmd", "samtools")
        setKey(config_dict, ["tools"], "bcftoolsCmd", "bcftools")
        setKey(config_dict, ["tools"], "gatkCmd", "gatk")

        return config_dict
예제 #2
0
    def setDefaults(self, config_dict):
        """
        Check mandatory keys and set defaults for any missing keys
        :param config_dict: config dictionary
        :return: config dictionary with defaults
        """
        # check mandatory keys
        config_dict = utils.checkKeys(
            config_dict,
            keys=["htmlOutputPath", "root", "sampleAnnotation"],
            check_files=True)
        config_dict["geneAnnotation"] = utils.checkKeys(
            config_dict["geneAnnotation"], keys=None, check_files=True)

        config_dict["wBuildPath"] = utils.getWBuildPath()

        setKey = utils.setKey
        setKey(config_dict, None, "fileRegex", r".*\.(R|md)")
        setKey(config_dict, None, "genomeAssembly", "hg19")

        hpo_url = 'https://www.cmm.in.tum.de/public/paper/drop_analysis/resource/hpo_genes.tsv.gz'
        setKey(config_dict, None, "hpoFile", hpo_url)

        # set submodule dictionaries
        setKey(config_dict, None, "aberrantExpression", dict())
        setKey(config_dict, None, "aberrantSplicing", dict())
        setKey(config_dict, None, "mae", dict())
        setKey(config_dict, None, "rnaVariantCalling", dict())

        setKey(config_dict, None, "exportCounts", dict())

        # Legacy check: If mae still defines genome print warning, otherwise use the
        # globally defined genome
        try:
            genome_files = self.get("mae")["genome"]
            logger.info(
                "WARNING: Using the mae defined genome instead of the globally defined one.\n"
                "This will be deprecated in the future to allow for reference genomes to"
                " be defined in the sample annotation table. Please update your config "
                "and sample annotation table\n")
        except KeyError:
            genome_files = self.get("genome")
        setKey(config_dict, None, "genome", genome_files)

        # commandline tools
        setKey(config_dict, None, "tools", dict())
        setKey(config_dict, ["tools"], "samtoolsCmd", "samtools")
        setKey(config_dict, ["tools"], "bcftoolsCmd", "bcftools")
        setKey(config_dict, ["tools"], "gatkCmd", "gatk")

        return config_dict
예제 #3
0
 def setDefaultKeys(self, dict_):
     super().setDefaultKeys(dict_)
     setKey = utils.setKey
     dict_ = utils.checkKeys(dict_, keys=["repeat_mask"], check_files=True)
     groups = setKey(dict_, None, "groups", self.sa.getGroups(assay="RVC"))
     setKey(dict_, None, "knownVCFs", [])
     setKey(dict_, None, "repeat_mask", "")
     setKey(dict_, None, "hcArgs", "")
     setKey(dict_, None, "minAlt", 3)
     return dict_
예제 #4
0
 def setDefaultKeys(self, dict_):
     super().setDefaultKeys(dict_)
     setKey = utils.setKey
     dict_ = utils.checkKeys(dict_, keys=["qcVcf"], check_files=True)
     groups = setKey(dict_, None, "groups", self.sa.getGroups(assay="DNA"))
     setKey(dict_, None, "qcGroups", groups)
     setKey(dict_, None, "gatkIgnoreHeaderCheck", True)
     setKey(dict_, None, "padjCutoff", .05)
     setKey(dict_, None, "allelicRatioCutoff", 0.8)
     setKey(dict_, None, "maxAF", .001)
     setKey(dict_, None, "gnomAD", False)
     return dict_