-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel15_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."),
  portion_gdc_id STRING OPTIONS(description="Original/submitter portion ID"),
  portion_barcode STRING OPTIONS(description="Original/submitter portion ID"),
  analyte_gdc_id STRING OPTIONS(description="Original/submitter analyte 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 REL15",
  description="Data was generated from file metadata information from the GDC  release 15, February 2019. Aliquot barcodes are mapped to case information. \nMore details: https://docs.gdc.cancer.gov/Data/Release_Notes/Data_Release_Notes/#data-release-150",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("source", "gdc"), ("status", "archived"), ("category", "metadata")]
);

INSERT INTO `isb-cgc.GDC_metadata.rel15_aliquot2caseIDmap` (program_name, project_id, case_gdc_id, case_barcode, sample_gdc_id, sample_barcode, sample_type, sample_type_name, portion_gdc_id, portion_barcode, analyte_gdc_id, analyte_barcode, aliquot_gdc_id, aliquot_barcode) VALUES ('TCGA', 'TCGA-ACC', '0304b12d-7640-4150-a581-2eea2b1f2ad5', 'TCGA-OR-A5LL', 'c32a896a-bc08-455c-8e01-c75fae985a56', 'TCGA-OR-A5LL-01A', '01', 'Primary Tumor', '6e7de852-5c21-4694-9b99-22fe8d927a7f', 'TCGA-OR-A5LL-01A-21-A39K-20', 'NA', 'NA', 'NA', 'NA'), ('TCGA', 'TCGA-ACC', '0304b12d-7640-4150-a581-2eea2b1f2ad5', 'TCGA-OR-A5LL', 'c32a896a-bc08-455c-8e01-c75fae985a56', 'TCGA-OR-A5LL-01A', '01', 'Primary Tumor', 'cd3e1740-9320-44e8-9d65-68a65bb7e85f', 'TCGA-OR-A5LL-01A-11', '043f71d2-19df-47a5-8138-e6ac60a61831', 'TCGA-OR-A5LL-01A-11D', '669b556e-ade1-416e-83b5-0736e2c2b756', 'TCGA-OR-A5LL-01A-11D-A29J-05'), ('TCGA', 'TCGA-ACC', '0304b12d-7640-4150-a581-2eea2b1f2ad5', 'TCGA-OR-A5LL', 'c32a896a-bc08-455c-8e01-c75fae985a56', 'TCGA-OR-A5LL-01A', '01', 'Primary Tumor', 'cd3e1740-9320-44e8-9d65-68a65bb7e85f', 'TCGA-OR-A5LL-01A-11', '043f71d2-19df-47a5-8138-e6ac60a61831', 'TCGA-OR-A5LL-01A-11D', '9bfd4b2e-0577-4c94-8d6c-dafa9104b502', 'TCGA-OR-A5LL-01A-11D-A29I-10'), ('TCGA', 'TCGA-ACC', '0304b12d-7640-4150-a581-2eea2b1f2ad5', 'TCGA-OR-A5LL', 'c32a896a-bc08-455c-8e01-c75fae985a56', 'TCGA-OR-A5LL-01A', '01', 'Primary Tumor', 'cd3e1740-9320-44e8-9d65-68a65bb7e85f', 'TCGA-OR-A5LL-01A-11', '043f71d2-19df-47a5-8138-e6ac60a61831', 'TCGA-OR-A5LL-01A-11D', 'fe311303-e123-4ebb-a729-3a52fa9e7b1e', 'TCGA-OR-A5LL-01A-11D-A29H-01'), ('TCGA', 'TCGA-ACC', '0304b12d-7640-4150-a581-2eea2b1f2ad5', 'TCGA-OR-A5LL', 'c32a896a-bc08-455c-8e01-c75fae985a56', 'TCGA-OR-A5LL-01A', '01', 'Primary Tumor', 'cd3e1740-9320-44e8-9d65-68a65bb7e85f', 'TCGA-OR-A5LL-01A-11', '0f12f38a-3c82-435e-a237-1e7199a6c32b', 'TCGA-OR-A5LL-01A-11W', '5046b039-cace-4bd6-9a8e-23f3e24aadd2', 'TCGA-OR-A5LL-01A-11W-A319-10');