-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel22_aliquot2caseIDmap`
(
  program_name STRING OPTIONS(description="Program name, eg TCGA or TARGET"),
  project_id STRING OPTIONS(description="ID of the Project -- e.g. TCGA-BRCA, TARGET-AML, etc."),
  case_gdc_id STRING OPTIONS(description="GDC unique identifier"),
  case_barcode STRING OPTIONS(description="Submitter identifier, eg HCC1954, TCGA-ZX-AA5X, etc"),
  sample_gdc_id STRING OPTIONS(description="Unique GDC identifier for this sample (corresponds to the sample_barcode), eg a1ec9279-c1a6-4e58-97ed-9ec1f36187c5  --  this can be used to access more information from the GDC data portal"),
  sample_barcode STRING OPTIONS(description="Original/submitter sample ID"),
  sample_type STRING OPTIONS(description="Two-digit sample_type code which forms part of the sample barcode eg. 01,11,06, etc."),
  sample_type_name STRING OPTIONS(description="The longer name of the sample type; eg. Primary Tumor, Recurrent Tumor, etc."),
  sample_is_ffpe STRING OPTIONS(description="Whether a smaple is FFPE, either  False,  None ,  True, or null"),
  sample_preservation_method STRING OPTIONS(description="Sample Preservation Method, usually null or  FFPE, also Snap Frozen or Frozen"),
  portion_gdc_id STRING OPTIONS(description="Portion GDC ID"),
  portion_barcode STRING OPTIONS(description="Original/submitter portion ID"),
  analyte_gdc_id STRING OPTIONS(description="Analyte GDC ID"),
  analyte_barcode STRING OPTIONS(description="Original/submitter analyte ID"),
  aliquot_gdc_id STRING OPTIONS(description="Unique GDC identifier for this aliquot (corresponds to the aliquot_barcode), eg 7fbfdb3e-1fd2-4206-8d2e-7f68e4a15844  --  this can be used to access more information from the GDC data portal"),
  aliquot_barcode STRING OPTIONS(description="Original TCGA aliquot barcode, eg TCGA-12-1089-01A-01D-0517-01")
)
OPTIONS(
  friendly_name="ALIQUOT IDS TO CASE IDS REL22",
  description="Data was generated from file metadata information from the GDC release 22, downloaded Jan 22, 2020. Aliquot barcodes are mapped to case information.\nMore details: https://docs.gdc.cancer.gov/Data/Release_Notes/Data_Release_Notes/#data-release-220\nThis table has been deprecated, please see isb-cgc-bq.GDC_case_file_metadata.aliquot2caseIDmap_current for the most current table.",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("source", "gdc"), ("status", "deprecated"), ("category", "metadata")]
);

INSERT INTO `isb-cgc.GDC_metadata.rel22_aliquot2caseIDmap` (program_name, project_id, case_gdc_id, case_barcode, sample_gdc_id, sample_barcode, sample_type, sample_type_name, sample_is_ffpe, sample_preservation_method, portion_gdc_id, portion_barcode, analyte_gdc_id, analyte_barcode, aliquot_gdc_id, aliquot_barcode) VALUES ('CGCI', 'CGCI-BLGSP', '7824ba74-2279-4833-9eb8-0db056a119e0', 'BLGSP-71-22-00347', '54e96524-0c62-46b9-b945-d2787ba2ee1c', 'BLGSP-71-22-00347-01A', '01', 'Slides', 'True', NULL, 'c97f3775-d1d9-4d53-a0cc-5dcbc14d8fec', 'BLGSP-71-22-00347-01A-12', '0dbb188b-f222-49be-9c58-74802dce59ab', 'BLGSP-71-22-00347-01A-12E', '98d8a8ef-1c7c-44a4-8de9-00dd01711f10', 'BLGSP-71-22-00347-01A-12E-A634-33'), ('CGCI', 'CGCI-BLGSP', '7824ba74-2279-4833-9eb8-0db056a119e0', 'BLGSP-71-22-00347', '54e96524-0c62-46b9-b945-d2787ba2ee1c', 'BLGSP-71-22-00347-01A', '01', 'Slides', 'True', NULL, 'c97f3775-d1d9-4d53-a0cc-5dcbc14d8fec', 'BLGSP-71-22-00347-01A-12', '5893d072-0ff6-4000-bfcb-26c3da51539c', 'BLGSP-71-22-00347-01A-12S', 'd3f1be61-a4fa-4a08-a909-69ce904509d4', 'BLGSP-71-22-00347-01A-12S-A633-33'), ('CGCI', 'CGCI-BLGSP', '2843599b-b36f-460b-8563-2e022974103f', 'BLGSP-71-22-00339', '63cef160-41f7-41f2-a507-cfaa1d3ed84d', 'BLGSP-71-22-00339-01A', '01', 'FFPE Scrolls', 'True', NULL, '9b0814cd-479a-4c7f-b4bb-0c85d563f8a2', 'BLGSP-71-22-00339-01A-01', '3e76f8bc-0aa6-4d8a-a7f5-6bf826728fe9', 'BLGSP-71-22-00339-01A-01E', '43c169c4-5701-4678-b976-84a03801f090', 'BLGSP-71-22-00339-01A-01E-A634-33'), ('CGCI', 'CGCI-BLGSP', '2843599b-b36f-460b-8563-2e022974103f', 'BLGSP-71-22-00339', '63cef160-41f7-41f2-a507-cfaa1d3ed84d', 'BLGSP-71-22-00339-01A', '01', 'FFPE Scrolls', 'True', NULL, '9b0814cd-479a-4c7f-b4bb-0c85d563f8a2', 'BLGSP-71-22-00339-01A-01', 'd2ab35b9-2b81-4efa-a8b8-ba32c4e4fa4a', 'BLGSP-71-22-00339-01A-01S', '2d9d9b48-419d-4082-827b-d1bff8e6f216', 'BLGSP-71-22-00339-01A-01S-A633-33'), ('TCGA', 'TCGA-LUAD', '30f276a8-3a4b-4de8-aea0-7f605d100401', 'TCGA-93-A4JP', '5c122be7-4fad-430a-9bfe-a9c85c548f61', 'TCGA-93-A4JP-01D', '01', 'FFPE Scrolls', 'True', NULL, 'cf8c89d5-9316-47f4-9c3a-a6a56d0a8858', 'TCGA-93-A4JP-01D-01', 'eda22383-8dc1-4fb1-ad88-24fc82a557c1', 'TCGA-93-A4JP-01D-01D', '7feba848-0500-45f0-b711-42f9574c7481', 'TCGA-93-A4JP-01D-01D-A38P-08');