-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel19_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-f91c8f407ba5"),
  `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 sumbitter 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 phs000189"),
  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:11"),
  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.11"),
  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 REL19",
  description="Data was generated from file metadata information from the GDC legacy archive release 19, downloaded October 19, 2019. \nMore details: https://docs.gdc.cancer.gov/Data/Release_Notes/Data_Release_Notes/#data-release-190",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("source", "gdc"), ("reference_genome_0", "hg19"), ("status", "archived"), ("category", "metadata")]
);

INSERT INTO `isb-cgc.GDC_metadata.rel19_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', 'abfa0d85-9068-4cb1-aa6b-f85a8d44ac94', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, 'a6af3061-1484-4f6c-bb4b-c8f4626b4161', 'b3dc66b5-ad21-46ef-bea2-13b364e8f7ee', 'TCGA-CC-5263-01A-01D-A12Z-10', 'aliquot', 'a6af3061-1484-4f6c-bb4b-c8f4626b4161', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-CC-5263-01A-01D-A12Z-10_IonTorrent_validation.tar.bz2', 495757, 'abfa0d85-9068-4cb1-aa6b-f85a8d44ac94', NULL, NULL, NULL, 'c1a9b897970e937d0754fa4a9c0aa73e', '3718fc60-a4d7-43da-9424-7f8e4c91178c;40a34479-4638-4169-b7b7-7a451aa04b93;c6527047-bcdf-42c2-88d7-694474a5910c', '2ce1a098-ce8e-4bc6-a248-c8845579a2a9_analysis.xml;2ce1a098-ce8e-4bc6-a248-c8845579a2a9_experiment.xml;2ce1a098-ce8e-4bc6-a248-c8845579a2a9_run.xml', '4771;51071;149502', NULL, NULL, 'live', '2ce1a098-ce8e-4bc6-a248-c8845579a2a9', NULL, 'file', '2017-03-05T18:34:01.549050-06:00'), ('legacy', '451f917a-8378-4eb4-ba52-4b7e9a455426', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '8eef926b-f316-4fdb-b84a-262010258feb', 'ebf05fa8-848e-4a45-85ad-42311dac4923', 'TCGA-UB-A7MF-10A-01D-A33K-10', 'aliquot', '8eef926b-f316-4fdb-b84a-262010258feb', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-UB-A7MF-10A-01D-A33K-10_IonTorrent_validation.tar.bz2', 266583, '451f917a-8378-4eb4-ba52-4b7e9a455426', NULL, NULL, NULL, 'dde12017453a1df76f940e1ab15d59ae', NULL, NULL, NULL, NULL, NULL, 'live', '3ffea22a-fcbd-4c07-a0e7-5ae2439053b9', NULL, 'file', '2017-03-05T11:39:23.380851-06:00'), ('legacy', 'edbe5c76-6112-4169-bebf-77d5c9bf4ee6', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '8153a862-0790-4a33-80db-ed47fedcd4ef', '84a0bc36-9f29-4b23-aee1-bf5ff71f697b', 'TCGA-DD-A1E9-01A-21D-A152-10', 'aliquot', '8153a862-0790-4a33-80db-ed47fedcd4ef', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-DD-A1E9-01A-21D-A152-10_IonTorrent_validation.tar.bz2', 496374, 'edbe5c76-6112-4169-bebf-77d5c9bf4ee6', NULL, NULL, NULL, '5a74f896b4325166f2c2a0552fb112ea', NULL, NULL, NULL, NULL, NULL, 'live', '0981951f-55c4-4a8e-a474-cb9385f9ac44', NULL, 'file', '2017-03-05T11:43:23.527902-06:00'), ('legacy', '505ff57b-3ce8-4a5a-a5a4-e58d3ba97b0f', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '79f9331c-9e00-4277-a9d1-7c848e132134', 'ffe9f06b-c676-4f9f-8bc5-cd6a3db3f2ca', 'TCGA-DD-A73C-01A-12D-A33K-10', 'aliquot', '79f9331c-9e00-4277-a9d1-7c848e132134', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-DD-A73C-01A-12D-A33K-10_IonTorrent_validation.tar.bz2', 268053, '505ff57b-3ce8-4a5a-a5a4-e58d3ba97b0f', NULL, NULL, NULL, '72a32fa056aebde27233f5ab35a73da6', NULL, NULL, NULL, NULL, NULL, 'live', 'd06420d0-3754-43a6-bfad-645c8922611f', NULL, 'file', '2017-03-05T10:23:36.058190-06:00'), ('legacy', 'fb90775d-34e2-46e4-8580-866f160e5eff', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '2d1dc64d-27de-4c83-a7fa-88da5b48bf24', '559b7362-9b75-4be3-b8bc-5f3e28b71cd8', 'TCGA-RC-A6M4-01A-11D-A32G-10', 'aliquot', '2d1dc64d-27de-4c83-a7fa-88da5b48bf24', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-RC-A6M4-01A-11D-A32G-10_IonTorrent_validation.tar.bz2', 256573, 'fb90775d-34e2-46e4-8580-866f160e5eff', NULL, NULL, NULL, 'de7151f060b491b9014afd5eab319e3d', '25a88006-5f6a-4c4b-b28e-1979f8f925cc;7450291d-b77b-4f5a-a7f8-6c5963ddc709;fd2676e6-ab73-495b-875f-baa7d1921d0a', 'edd530a2-2c09-4530-8f55-e61bd855d8f2_analysis.xml;edd530a2-2c09-4530-8f55-e61bd855d8f2_experiment.xml;edd530a2-2c09-4530-8f55-e61bd855d8f2_run.xml', '2516;33043;75232', NULL, NULL, 'live', 'edd530a2-2c09-4530-8f55-e61bd855d8f2', NULL, 'file', '2017-03-05T00:18:12.307676-06:00');