def initAliquots(self):    
        q = "SELECT al.aliquot_barcode, al.aliquot_analysis_type, al.aliquot_analyte_type, al.aliquot_batch, s.sample_barcode, s.case_barcode, s.sample_type, cl.case_project, cl.case_sex \
             FROM biospecimen.aliquots AS al \
                 INNER JOIN biospecimen.samples AS s ON al.sample_barcode = s.sample_barcode \
                 INNER JOIN clinical.cases AS cl ON cl.case_barcode = s.case_barcode;"
    
        res = self.query(q, cursor_factory = psycopg2.extras.RealDictCursor)

        self.aliquots = build_dict(res, "aliquot_barcode")
 def initPairs(self):
     q = "SELECT pair_barcode, tumor_barcode, normal_barcode, case_barcode \
          FROM analysis.pairs pa \
          INNER JOIN biospecimen.aliquots AS al ON al.aliquot_barcode = pa.tumor_barcode \
          INNER JOIN biospecimen.samples AS s ON s.sample_barcode = al.sample_barcode;"
     
     res = self.query(q, cursor_factory = psycopg2.extras.RealDictCursor)
     
     self.pairs = build_dict(res, "pair_barcode")
    def initFiles(self):
        q = "SELECT f.aliquot_barcode, f.file_name, f.file_format, f.file_path, cl.case_source, al.aliquot_analyte_type \
             FROM analysis.files AS f \
                 INNER JOIN biospecimen.aliquots AS al ON al.aliquot_barcode = f.aliquot_barcode \
                 INNER JOIN biospecimen.samples AS s ON al.sample_barcode = s.sample_barcode \
                 INNER JOIN clinical.cases AS cl ON cl.case_barcode = s.case_barcode;"
        
        res = self.query(q, cursor_factory = psycopg2.extras.RealDictCursor)

        self.files = build_dict(res, "file_name")