-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel15_slide2caseIDmap`
(
  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 INT64 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; e.g. Primary Tumor, Recurrent Tumor, etc."),
  portion_gdc_id STRING OPTIONS(description="Original/submitter portion ID"),
  portion_barcode STRING OPTIONS(description="Original/submitter portion ID"),
  slide_gdc_id STRING OPTIONS(description="Slide GDC uuid"),
  slide_barcode STRING OPTIONS(description="Slide submitter ID")
)
OPTIONS(
  friendly_name="SLIDE IMAGES TO CASE IDS REL15",
  description="Data was generated from file metadata information from the GDC release 15, February 2019. Image slides 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_slide2caseIDmap` (program_name, project_id, case_gdc_id, case_barcode, sample_gdc_id, sample_barcode, sample_type, sample_type_name, portion_gdc_id, portion_barcode, slide_gdc_id, slide_barcode) VALUES ('TCGA', 'TCGA-COAD', 'cee553c8-460d-436b-b55d-8f41624816cc', 'TCGA-G4-6317', '45c8544c-ec60-447e-91ee-62e41e72a82f', 'TCGA-G4-6317-02A', 2, 'Recurrent Tumor', '2b820f48-7713-4877-b5ea-a5060943810a', 'TCGA-G4-6317-02A-11', '870c2e2e-7f4f-4d06-bac3-5e48c4d9d09d', 'TCGA-G4-6317-02A-01-BS1'), ('TCGA', 'TCGA-COAD', 'cee553c8-460d-436b-b55d-8f41624816cc', 'TCGA-G4-6317', '45c8544c-ec60-447e-91ee-62e41e72a82f', 'TCGA-G4-6317-02A', 2, 'Recurrent Tumor', '2b820f48-7713-4877-b5ea-a5060943810a', 'TCGA-G4-6317-02A-11', 'a9998a46-09fd-493d-92fe-4a2b4820b3bf', 'TCGA-G4-6317-02A-01-TS1'), ('TCGA', 'TCGA-GBM', '0078b0c4-68a9-483b-9aab-61156d263213', 'TCGA-14-1034', 'afd6abee-dd83-4b1a-b66f-8fd50190287b', 'TCGA-14-1034-02B', 2, 'Recurrent Tumor', '17abeae2-1116-4ebf-bfed-23dfc701ee16', 'TCGA-14-1034-02B-01', '1aa50373-01dd-452c-9a62-b8aad37b05e8', 'TCGA-14-1034-02B-01-TS1'), ('TCGA', 'TCGA-GBM', '0078b0c4-68a9-483b-9aab-61156d263213', 'TCGA-14-1034', 'afd6abee-dd83-4b1a-b66f-8fd50190287b', 'TCGA-14-1034-02B', 2, 'Recurrent Tumor', '17abeae2-1116-4ebf-bfed-23dfc701ee16', 'TCGA-14-1034-02B-01', '70cd1f7a-ac1c-43da-b627-47a40bc5445c', 'TCGA-14-1034-02B-01-BS1'), ('TCGA', 'TCGA-GBM', '01a92062-967a-4900-8dc7-a5ecd3b3f8e2', 'TCGA-06-0171', '87f7c7d4-533a-401d-aca4-5e36ee815109', 'TCGA-06-0171-02A', 2, 'Recurrent Tumor', 'd7d6194a-07e4-4bf7-b868-c1f73cc9822b', 'TCGA-06-0171-02A-11', '5a821a81-1ac8-4f76-96a2-89bee97c82cd', 'TCGA-06-0171-02A-01-BS1');