def reload(self): # drop the whole database self._db.connection.drop_database(self._db.name) for cohort in self.cohorts: self._annotator.add_vcf_file_to_annotator(cohort['vcf']) indiv_ids = vcf_stuff.get_ids_from_vcf_path(cohort['vcf']) self.add_family(cohort['slug'], 'control_cohort', indiv_ids) self.load_family_set(cohort['vcf'], [(cohort['slug'], 'control_cohort')])
def indivs_missing_from_vcf(family, vcf_file): """ Return list of indiv_ids in family that are not in vcf_file Empty list if all individuals are in vcf """ in_vcf = set(vcf_stuff.get_ids_from_vcf_path(vcf_file)) not_in_vcf = [] for indiv_id in family['individuals'].keys(): if not indiv_id in in_vcf: not_in_vcf.append(indiv_id) return not_in_vcf
def sample_id_list(self): return vcf_stuff.get_ids_from_vcf_path(self.path())