def list_samples(self): sample_names = self.samples_config.list_sample_names() samples = [] for name in sample_names: mates = [Mate.from_dict(mate) for mate in self.samples_config.list_mates_for_sample(name)] samples.append(Sample(mates, name)) return samples
def get_sample_by_name(self, name): mates = self.samples_config.list_mates_for_sample(name) mates = [Mate.from_dict(mate) for mate in mates] sample = Sample(mates, name) return sample
def get_mate_by_name(self, name): mate_dict = self.samples_config.get_mate_by_name(name) return Mate.from_dict(mate_dict)
def list_project_mates(self): mates = self.samples_config.list_mates() return [Mate.from_dict(mate) for mate in mates]
def list_mates_to_align(self): cnfg = SamplesConfig("Config/samples_config.yaml") mates_to_align = [Mate.from_dict(mate) for mate in cnfg.list_mates()] mates_to_align = filter(lambda x: x.align, mates_to_align) return mates_to_align