-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel21_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 REL21",
  description="Data was generated from file metadata information from the GDC legacy archive release 21, downloaded Dec 13, 2019. \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.fileData_legacy_current for the most current table.",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("reference_genome_0", "hg19"), ("source", "gdc"), ("status", "deprecated"), ("category", "metadata")]
);

INSERT INTO `isb-cgc.GDC_metadata.rel21_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', '212849d8-f636-4b83-9323-febef95f47e2', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, 'dc8dbf62-b687-4362-8839-2fac69703f64', '61026c67-aa07-4509-b221-ca1f26ffead1', 'TCGA-KO-8408-01A-11D-2310-10', 'aliquot', 'dc8dbf62-b687-4362-8839-2fac69703f64', NULL, 'Kidney Chromophobe', 'Kidney Chromophobe', 'phs000178', 'TCGA', 'TCGA-KICH', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-KO-8408-01A-11D-2310-10_IonTorrent_validation.tar.bz2', 219088, '212849d8-f636-4b83-9323-febef95f47e2', NULL, NULL, NULL, 'dd89fc8f2ea8fda5a07d62453ee2eb38', NULL, NULL, NULL, NULL, NULL, 'live', 'fcf693d4-1f44-4037-a5c3-b5216b086220', NULL, 'file', '2017-03-05T11:32:29.757610-06:00'), ('legacy', '572aede1-4f03-42fe-a869-bec39883bb71', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '08a96dec-e658-493a-9308-83f7ace3b3b6', '8df1eeb4-dfc9-4a0a-8f93-98460c3ab489', 'TCGA-KO-8409-01A-11D-2310-10', 'aliquot', '08a96dec-e658-493a-9308-83f7ace3b3b6', NULL, 'Kidney Chromophobe', 'Kidney Chromophobe', 'phs000178', 'TCGA', 'TCGA-KICH', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-KO-8409-01A-11D-2310-10_IonTorrent_validation.tar.bz2', 219271, '572aede1-4f03-42fe-a869-bec39883bb71', NULL, NULL, NULL, '99fb291dc967d4ce8c082c8472bee81d', '30dcf5dd-8af6-48e5-b76a-31d383c5bf1b;3ff2986e-12dc-4800-81a6-ae50933bf658;711e9436-c1f8-40a6-8c54-6a1d952a949e', 'd0fc5a10-6a4d-4643-bf42-f12fc9c89fae_analysis.xml;d0fc5a10-6a4d-4643-bf42-f12fc9c89fae_experiment.xml;d0fc5a10-6a4d-4643-bf42-f12fc9c89fae_run.xml', '2516;33043;75326', NULL, NULL, 'live', 'd0fc5a10-6a4d-4643-bf42-f12fc9c89fae', NULL, 'file', '2017-03-05T00:16:07.527840-06:00'), ('legacy', '4d4b277d-09ae-43e1-84bd-2df96240d7bc', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, 'd680df09-368e-42b5-b540-45c41ed31042', '4904d56f-0fe7-4482-8f6d-9e54d261f399', 'TCGA-FV-A2QQ-01A-11D-A22F-10', 'aliquot', 'd680df09-368e-42b5-b540-45c41ed31042', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-FV-A2QQ-01A-11D-A22F-10_IonTorrent_validation.tar.bz2', 497487, '4d4b277d-09ae-43e1-84bd-2df96240d7bc', NULL, NULL, NULL, '1daaaa925052fef64ce3affa3612cd5a', NULL, NULL, NULL, NULL, NULL, 'live', '663e0ce9-dde7-4bc1-ada6-32423d5cfed6', NULL, 'file', '2017-03-05T18:15:29.510787-06:00'), ('legacy', 'c848b5bc-177c-439b-a431-e0bd69c46060', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, 'c618da6d-3c66-4a6a-8832-3526a3b75410', '85af03fa-9e34-4b29-8897-d39a1b1773e2', 'TCGA-LG-A6GG-01A-11D-A30V-10', 'aliquot', 'c618da6d-3c66-4a6a-8832-3526a3b75410', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-LG-A6GG-01A-11D-A30V-10_IonTorrent_validation.tar.bz2', 250294, 'c848b5bc-177c-439b-a431-e0bd69c46060', NULL, NULL, NULL, 'ff5d9b8e2719377fb0bff9d581117daf', NULL, NULL, NULL, NULL, NULL, 'live', 'b0628f34-71d4-4aa5-966a-36f298c89a53', NULL, 'file', '2017-03-04T20:50:29.506652-06:00'), ('legacy', '70c0ff51-68c0-41d2-b25d-2b39b06f47f8', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '8afa3140-dcbd-44c0-ab13-4ada6a0444d4', '09f38dcc-7c27-47ae-921f-d5ba8b92cbc1', 'TCGA-FV-A496-11A-12D-A25V-10', 'aliquot', '8afa3140-dcbd-44c0-ab13-4ada6a0444d4', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-FV-A496-11A-12D-A25V-10_IonTorrent_validation.tar.bz2', 269590, '70c0ff51-68c0-41d2-b25d-2b39b06f47f8', NULL, NULL, NULL, 'e21f75b222e24839048bbec8736f4ca1', NULL, NULL, NULL, NULL, NULL, 'live', 'c52f7e61-0a94-49ef-af04-0d5038ff889d', NULL, 'file', '2017-03-05T16:43:46.428601-06:00');