Пример #1
0
def main():
    """ run the clinical filtering analyses
    """

    args = get_options()

    # set the level of logging to generate
    numeric_level = getattr(logging, args.loglevel.upper(), None)

    log_filename = "clinical-filter.log"
    if args.ped is not None:
        log_filename = args.ped + ".log"

    logging.basicConfig(level=numeric_level, filename=log_filename)

    families = get_families(args)
    count = sum([y.is_affected() for x in families for y in x.children])

    finder = Filter(args.populations, count, args.known_genes, args.genes_date,
                    args.regions, args.lof_sites, args.pp_filter,
                    args.sum_x_lr2_file, args.output, args.export_vcf,
                    args.debug_chrom, args.debug_pos)

    for family in families:
        finder.filter_trio(family)
    def setUp(self):
        """ create a default Filter object to test
        """

        count = 1
        regions = None
        known_genes, genes_date = None, None
        output_path, export_vcf = None, None
        debug_chrom, debug_pos = None, None
        pp_filter = 0.9
        lof_sites = None
        population_tags = [
            "AFR_AF", "AMR_AF", "ASN_AF", "DDD_AF", "EAS_AF", "ESP_AF",
            "EUR_AF", "MAX_AF", "SAS_AF", "UK10K_cohort_AF"
        ]
        sum_x_lr2 = None  #

        self.finder = Filter(population_tags, count, known_genes, genes_date,
                             regions, lof_sites, pp_filter, sum_x_lr2,
                             output_path, export_vcf, debug_chrom, debug_pos)