def test_debug_option(self): """ test whether we can set up the class with the debug option """ counter = 0 total_trios = 1 known_genes = {} self.vcf_loader = LoadVCFs(total_trios, known_genes, "1", "10000") # check that the debug filter function got set correctly self.assertEqual(SNV.passes_filters, SNV.passes_filters_with_debug)
def setUp(self): """ define a default LoadVCFs object """ total_trios = 1 known_genes = {"ATRX": {"inheritance": {"Hemizygous": \ {"Loss of function"}}, "start": 1, "chrom": "1", \ "confirmed_status": {"Confirmed DD Gene"}, "end": 20000000}} self.vcf_loader = LoadVCFs(total_trios, known_genes, None, None) # make a temp directory for the cache file self.temp_dir = tempfile.mkdtemp()
def filter_trios(self): """ loads trio variants, and screens for candidate variants """ self.vcf_loader = LoadVCFs(len(self.families), self.known_genes, \ self.debug_chrom, self.debug_pos) # load the trio paths into the current path setup for family_ID in sorted(self.families): self.family = self.families[family_ID] # some families have more than one child in the family, so run # through each child. self.family.set_child() while self.family.child is not None: if self.family.child.is_affected(): variants = self.vcf_loader.get_trio_variants( self.family, self.pp_filter) self.vcf_provenance = self.vcf_loader.get_trio_provenance() self.analyse_trio(variants) self.family.set_child_examined() sys.exit(0)