def load(self): """A second __init__ that is delayed, solves some circular references""" # Automatic paths # self.base_dir = self.out_dir + self.id_name + '/' self.p = AutoPaths(self.base_dir, self.all_paths) # Make an alias to the json # self.p.info_json.link_from(self.json_path, safe=True) # Children # self.samples.load() # Raw file pairs # self.fwd_path = home + "ILLUMITAG/INBOX/%s/%s/%s" % (self.run.label, self.label, self.info['forward_reads']) self.rev_path = home + "ILLUMITAG/INBOX/%s/%s/%s" % (self.run.label, self.label, self.info['reverse_reads']) self.fwd = FASTQ(self.fwd_path) self.rev = FASTQ(self.rev_path) self.fastq = PairedFASTQ(self.fwd.path, self.rev.path, self) # Barcode length # self.bar_len = self.samples.bar_len # Make Outcomes # self.no_barcodes = NoBarcode(self) self.one_barcodes = OneBarcode(self) self.same_barcodes = SameBarcode(self) self.bad_barcodes = BadBarcode(self) self.good_barcodes = GoodBarcode(self) self.outcomes = (self.good_barcodes, self.no_barcodes, self.one_barcodes, self.same_barcodes, self.bad_barcodes) self.children = self.outcomes # The good reads # self.quality_reads = QualityReads(self.good_barcodes.assembled.good_primers.len_filtered, self) self.fractions = Fractions(self) # Runner # self.runner = PoolRunner(self) # Graphs # self.graphs = [getattr(pool_plots, cls_name)(self) for cls_name in pool_plots.__all__] # Loaded # self.loaded = True # Return self for convenience # return self