-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel16_fileData_legacy`
(
  dbName STRING OPTIONS(description="Referring to the default/main database at the GDC. In this table, this field is always legacy."),
  file_gdc_id STRING OPTIONS(description="Unique GDC identifier for this file (corresponds to the file_barcode)  --  this can be used to access more information from the GDC data portal like this: https://portal.gdc.cancer.gov/files/c21b332c-06c6-4403-9032-f91c8f407ba3"),
  `access` STRING OPTIONS(description="Data accessibility policy (open or controlled)"),
  acl STRING OPTIONS(description="Access Control List -- if access is controlled, this field contains the dbGaP accession, eg phs000179"),
  archive_gdc_id STRING OPTIONS(description="GDC archive UUID"),
  archive_revision INT64 OPTIONS(description="Archive revision number"),
  archive_state STRING OPTIONS(description="Archive state"),
  archive_submitter_id STRING OPTIONS(description="Original archive submitter name, eg  nationwidechildrens.org_BRCA.bio.Level_1.56"),
  associated_entities__case_gdc_id STRING OPTIONS(description="GDC case uuid for associated case(s)"),
  associated_entities__entity_gdc_id STRING OPTIONS(description="GDC entity uuid for associated entity(ies)"),
  associated_entities__entity_submitter_id STRING OPTIONS(description="Submitter id for associated entity(ies)"),
  associated_entities__entity_type STRING OPTIONS(description="Associated entity type, eg   aliquot   or   case  "),
  case_gdc_id STRING OPTIONS(description="GDC unique identifier"),
  project_dbgap_accession_number STRING OPTIONS(description="Program dbGaP accession number, eg phs000186"),
  project_disease_type STRING OPTIONS(description="The type of disease studied by the project; e.g. Sarcoma,  Breast Invasive Carcinoma,Acute Lymphoblastic Leukemia, etc"),
  project_name STRING OPTIONS(description="Project Name; frequently the same as or similar to the project disease type eg   Acute Lymphoblastic Leukemia - Phase II   or   Breast Invasive Carcinoma   etc"),
  program_dbgap_accession_number STRING OPTIONS(description="Program dbGaP accession number, eg phs000178"),
  program_name STRING OPTIONS(description="Program name, eg TCGA or TARGET"),
  project_short_name STRING OPTIONS(description="Project name abbreviation; the program name appended with a project name abbreviation; eg. TCGA-OV, etc."),
  center_type STRING OPTIONS(description="One of CGC, GSC, BCR, COM (or null)"),
  center_code STRING OPTIONS(description="TCGA codes for the Professional Organization or Group (Center) which has submitted the data, more info: https://gdc.cancer.gov/resources-TCGA-users/TCGA-code-tables/center-codes"),
  center_name STRING OPTIONS(description="Center name, eg BCM, BI, WUGSC "),
  center_short_name STRING OPTIONS(description="Center abbreviation, eg WUSM"),
  created_datetime STRING OPTIONS(description="Timestamp of creation, eg 2016-10-27T21:58:12.297090-05:09"),
  data_category STRING OPTIONS(description="Category description of the underlying data, eg Clinical, Raw Sequencing Data, Simple Nucleotide Variation, Transcriptome Profiling  , etc"),
  data_format STRING OPTIONS(description="File format of the underlying data, eg BCR XML, BAM"),
  data_type STRING OPTIONS(description="Experimental source of the data type, eg Tissue slide image, RNA-Seq"),
  experimental_strategy STRING OPTIONS(description="Experimental strategy used to generate data (where applicable) e.g. WXS, RNA-Seq"),
  file_name STRING OPTIONS(description="Name of file at the GDC"),
  file_size INT64 OPTIONS(description="The size of the file measured in bytes"),
  file_id STRING OPTIONS(description="GDC file identifier. This is a duplicate of file_gdc_id field found in some tables. "),
  index_file_gdc_id STRING OPTIONS(description="Where available, GDC file uuid for index file "),
  index_file_name STRING OPTIONS(description="Where available, GDC file name for index file "),
  index_file_size INT64 OPTIONS(description="Where available, size of the index file in bytes "),
  md5sum STRING OPTIONS(description="Md5sum for GDC data file"),
  metadata_file_id STRING OPTIONS(description="GDC file UUID for metadata (eg mage-tab) file"),
  metadata_file_name STRING OPTIONS(description="Name of GDC metadata file"),
  metadata_file_size STRING OPTIONS(description="Size of metadata file"),
  metadata_file_type STRING OPTIONS(description="Type of metadata file, eg mage-tab"),
  platform STRING OPTIONS(description="Platform used to generate this data, eg  Illumina  , or  Affymetrix SNP 6.9"),
  file_state STRING OPTIONS(description="File state -- either live or submitted"),
  file_submitter_id STRING OPTIONS(description="Original submitter file id (eg CGHub analysis_id)"),
  file_tags STRING OPTIONS(description="Semicolon-delimited list of file tags, eg  coverage , or  hg19;nocnv  , etc"),
  file_type STRING OPTIONS(description="File Type  -- eg aligned_reads , simple_somatic_mutation , gene_expression , etc"),
  updated_datetime STRING OPTIONS(description="Timestamp of latest update, eg 2017-03-04T16:37:26.081298-06:00")
)
OPTIONS(
  friendly_name="FILE DATA LEGACY REL16",
  description="Data was generated from file metadata information from the GDC legacy archive release 16, March 2019. More details: https://docs.gdc.cancer.gov/Data/Release_Notes/Data_Release_Notes/#data-release-160",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("source", "gdc"), ("reference_genome_0", "hg19"), ("status", "archived"), ("category", "metadata")]
);

INSERT INTO `isb-cgc.GDC_metadata.rel16_fileData_legacy` (dbName, file_gdc_id, access, acl, archive_gdc_id, archive_revision, archive_state, archive_submitter_id, associated_entities__case_gdc_id, associated_entities__entity_gdc_id, associated_entities__entity_submitter_id, associated_entities__entity_type, case_gdc_id, project_dbgap_accession_number, project_disease_type, project_name, program_dbgap_accession_number, program_name, project_short_name, center_type, center_code, center_name, center_short_name, created_datetime, data_category, data_format, data_type, experimental_strategy, file_name, file_size, file_id, index_file_gdc_id, index_file_name, index_file_size, md5sum, metadata_file_id, metadata_file_name, metadata_file_size, metadata_file_type, platform, file_state, file_submitter_id, file_tags, file_type, updated_datetime) VALUES ('legacy', '16d340ef-9d2b-424a-b1d9-a832099281cf', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '52292ffc-0902-4d97-b461-20723987a177', '9c681cd9-25fb-42ac-aa6b-bb962882fa22', 'TCGA-DD-A1EJ-01A-11D-A152-10', 'aliquot', '52292ffc-0902-4d97-b461-20723987a177', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-DD-A1EJ-01A-11D-A152-10_IonTorrent_validation.tar.bz2', 491589, '16d340ef-9d2b-424a-b1d9-a832099281cf', NULL, NULL, NULL, 'd6e58e7e6e8906d76b479dad5f418db9', '3821d46f-809d-4563-9680-754f615ef0e0;6d937ae9-7abb-47d7-91fd-66c8d606dfe6;c4077595-9364-403f-847f-488bdd384ca7', '3ba2ce43-e80d-4ee6-bd2d-da70a63b8bb6_analysis.xml;3ba2ce43-e80d-4ee6-bd2d-da70a63b8bb6_experiment.xml;3ba2ce43-e80d-4ee6-bd2d-da70a63b8bb6_run.xml', '4771;51465;151092', NULL, NULL, 'live', '3ba2ce43-e80d-4ee6-bd2d-da70a63b8bb6', NULL, 'file', '2017-03-05T16:41:59.983654-06:00'), ('legacy', '11b6c62e-f394-406b-8452-8161d42e6335', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '56a82a56-0241-4d3d-9de2-696b0c36df91', '1c00925b-7328-4db0-b930-04aab2d80719', 'TCGA-BW-A5NP-01A-11D-A27I-10', 'aliquot', '56a82a56-0241-4d3d-9de2-696b0c36df91', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-BW-A5NP-01A-11D-A27I-10_IonTorrent_validation.tar.bz2', 251594, '11b6c62e-f394-406b-8452-8161d42e6335', NULL, NULL, NULL, 'f1f78af7049a4714fe18a7b342e709e5', NULL, NULL, NULL, NULL, NULL, 'live', 'bbe94730-036b-4d6e-8949-4f058e7a6b47', NULL, 'file', '2017-03-05T12:40:24.187360-06:00'), ('legacy', '3b2cbd33-6b86-4c69-aad4-77b09fc77207', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, 'cca827ca-0066-497d-83dc-477f3b08ea6d', '1041e66f-f2c8-4391-a397-b067e8d51acd', 'TCGA-ED-A7XP-01A-11D-A34Z-10', 'aliquot', 'cca827ca-0066-497d-83dc-477f3b08ea6d', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-ED-A7XP-01A-11D-A34Z-10_IonTorrent_validation.tar.bz2', 255656, '3b2cbd33-6b86-4c69-aad4-77b09fc77207', NULL, NULL, NULL, '47aa8927c565053fb10aed8cad8c2b33', NULL, NULL, NULL, NULL, NULL, 'live', 'bdb33e0d-c11b-427e-b76f-afbae9c96d18', NULL, 'file', '2017-03-05T18:19:57.255497-06:00'), ('legacy', 'ac0bd0c0-cd24-4e62-95a8-b58b69041ccc', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '2fc175d1-9d95-44fd-a53e-820f6f404551', '9d5ee3f8-490f-4865-bb90-fe0a1bbf3643', 'TCGA-KN-8421-11A-01D-2310-10', 'aliquot', '2fc175d1-9d95-44fd-a53e-820f6f404551', NULL, 'Kidney Chromophobe', 'Kidney Chromophobe', 'phs000178', 'TCGA', 'TCGA-KICH', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-KN-8421-11A-01D-2310-10_IonTorrent_validation.tar.bz2', 219682, 'ac0bd0c0-cd24-4e62-95a8-b58b69041ccc', NULL, NULL, NULL, '4a9971e72b7f4c3a31f06bb91779ede3', '0bae73fb-5ada-40a0-b9bb-96c5b1bb3317;b7590cda-513d-4425-9731-985003d9fa99;eca6d45c-cbe3-47b1-8343-6917854db6f9', 'eada72c2-b4cc-4ff3-98a6-feca52a876c4_analysis.xml;eada72c2-b4cc-4ff3-98a6-feca52a876c4_experiment.xml;eada72c2-b4cc-4ff3-98a6-feca52a876c4_run.xml', '2516;33028;74712', NULL, NULL, 'live', 'eada72c2-b4cc-4ff3-98a6-feca52a876c4', NULL, 'file', '2017-03-05T17:56:42.163264-06:00'), ('legacy', 'cb91caaf-985e-426b-affa-b5513fdb9382', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '1c1e8987-676f-417b-b3b4-e0321367df55', 'a3a82e8b-83d5-4f74-8f92-4ccb2b2ee0e4', 'TCGA-DD-A1EF-10A-01D-A12Z-10', 'aliquot', '1c1e8987-676f-417b-b3b4-e0321367df55', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-DD-A1EF-10A-01D-A12Z-10_IonTorrent_validation.tar.bz2', 265675, 'cb91caaf-985e-426b-affa-b5513fdb9382', NULL, NULL, NULL, '024ad23438629ca7d5e34950851d91e7', '9c6972a2-d1f2-4e41-8a7c-38ed1da69c6d;e8ae67fb-71c8-4c3b-8ba3-87f3c2932466;e9b13dfa-7e30-429d-8fea-7a753687184b', 'c2768204-7263-407c-9a6d-948ee02856b2_analysis.xml;c2768204-7263-407c-9a6d-948ee02856b2_experiment.xml;c2768204-7263-407c-9a6d-948ee02856b2_run.xml', '2516;33244;76031', NULL, NULL, 'live', 'c2768204-7263-407c-9a6d-948ee02856b2', NULL, 'file', '2017-03-04T20:59:48.762309-06:00');