-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel21_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 REL21",
  description="Data was generated from file metadata information from the GDC release 21, downloaded Dec 13, 2019. Aliquot barcodes are mapped to case information.\nMore details: https://docs.gdc.cancer.gov/Data/Release_Notes/Data_Release_Notes/#data-release-210\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.rel21_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', '0ee808be-13bc-4d15-a519-e2b7e960e809', 'BLGSP-71-06-00001', '888079d3-cf4e-47d3-8cdd-a424e5349050', 'BLGSP-71-06-00001-01B', '01', 'Primary Tumor', 'True', NULL, '0d1de630-fcf8-4848-9405-ae5cdd46e087', 'BLGSP-71-06-00001-01B-01', '8ee6a770-7215-4795-ad54-5d62248e8313', 'BLGSP-71-06-00001-01B-01S', 'NA', 'NA'), ('CGCI', 'CGCI-BLGSP', '0ee808be-13bc-4d15-a519-e2b7e960e809', 'BLGSP-71-06-00001', '888079d3-cf4e-47d3-8cdd-a424e5349050', 'BLGSP-71-06-00001-01B', '01', 'Primary Tumor', 'True', NULL, '0d1de630-fcf8-4848-9405-ae5cdd46e087', 'BLGSP-71-06-00001-01B-01', 'e2c1016b-c1c6-45fd-b5c3-f84a7bda33af', 'BLGSP-71-06-00001-01B-01E', 'NA', 'NA'), ('CGCI', 'CGCI-BLGSP', '136a1fde-ecc8-43fe-b2f1-f3eee0bdc23f', 'BLGSP-71-08-00036', '01f05d25-5039-445a-a378-2d62f46a8a66', 'BLGSP-71-08-00036-01B', '01', 'Primary Tumor', 'True', NULL, 'ca17180e-e7bf-4354-bd4c-97a73f4316bf', 'BLGSP-71-08-00036-01B-01', '08bc8ee5-7cd3-4062-bbf7-e37021a35408', 'BLGSP-71-08-00036-01B-01E', 'NA', 'NA'), ('CGCI', 'CGCI-BLGSP', '136a1fde-ecc8-43fe-b2f1-f3eee0bdc23f', 'BLGSP-71-08-00036', '01f05d25-5039-445a-a378-2d62f46a8a66', 'BLGSP-71-08-00036-01B', '01', 'Primary Tumor', 'True', NULL, 'ca17180e-e7bf-4354-bd4c-97a73f4316bf', 'BLGSP-71-08-00036-01B-01', '8900c42d-cf2c-4d44-9bd0-f305af367f77', 'BLGSP-71-08-00036-01B-01S', 'NA', 'NA'), ('CGCI', 'CGCI-BLGSP', '213e9f9d-7340-460c-93a3-edd559b42009', 'BLGSP-71-06-00007', 'c912d696-c0c9-42de-8ed5-3e5fe310069b', 'BLGSP-71-06-00007-01B', '01', 'Primary Tumor', 'True', NULL, 'bf7354ca-277d-4e94-94ae-03a25a7d7e5f', 'BLGSP-71-06-00007-01B-01', '9540a5ae-4591-49c4-b1fc-8130c2d439f2', 'BLGSP-71-06-00007-01B-01S', 'NA', 'NA');