-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel22_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 REL22",
  description="Data was generated from file metadata information from the GDC legacy archive release 22, downloaded Jan 22, 2020. \nMore details: https://docs.gdc.cancer.gov/Data/Release_Notes/Data_Release_Notes/#data-release-220\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"), ("source", "gdc"), ("status", "deprecated"), ("category", "metadata")]
);

INSERT INTO `isb-cgc.GDC_metadata.rel22_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', '69ac0162-0469-431e-b85b-8b049deeec74', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '470d52b8-3d74-4789-b714-b9869a96657b', '4fd69f63-3ae5-4678-8647-a7e5eabd7486', 'TCGA-ED-A7PX-10A-01D-A34Z-10', 'aliquot', '470d52b8-3d74-4789-b714-b9869a96657b', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-ED-A7PX-10A-01D-A34Z-10_IonTorrent_validation.tar.bz2', 266867, '69ac0162-0469-431e-b85b-8b049deeec74', NULL, NULL, NULL, 'd35f544f49d72983cde2b8dbddcb13d9', NULL, NULL, NULL, NULL, NULL, 'live', 'a407a8d1-f4a8-417f-8875-4f9cd7ca40fa', NULL, 'file', '2017-03-05T10:18:24.647843-06:00'), ('legacy', '644ccef5-a6b6-49a6-b287-e3cfee4b052d', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '52a7f734-da07-49c5-861d-c70da37ff959', 'dffa8289-f2b6-40cf-96d6-0fd8a3c4a607', 'TCGA-DD-A4NR-11A-11D-A30V-10', 'aliquot', '52a7f734-da07-49c5-861d-c70da37ff959', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-DD-A4NR-11A-11D-A30V-10_IonTorrent_validation.tar.bz2', 258238, '644ccef5-a6b6-49a6-b287-e3cfee4b052d', NULL, NULL, NULL, 'ff386f43e97b2faa5ab6331250d88c74', NULL, NULL, NULL, NULL, NULL, 'live', '01982e3d-55c1-4ee9-88ef-bb443209dd14', NULL, 'file', '2017-03-05T11:00:22.460578-06:00'), ('legacy', '7a5d1fa1-7df2-4a74-86cf-6f1e4c409301', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '0697436f-e487-45db-b0bc-ad9246f70196', '47e52141-87f5-4718-8497-950711774cd8', 'TCGA-KL-8324-01A-11D-2310-10', 'aliquot', '0697436f-e487-45db-b0bc-ad9246f70196', NULL, 'Kidney Chromophobe', 'Kidney Chromophobe', 'phs000178', 'TCGA', 'TCGA-KICH', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-KL-8324-01A-11D-2310-10_IonTorrent_validation.tar.bz2', 218698, '7a5d1fa1-7df2-4a74-86cf-6f1e4c409301', NULL, NULL, NULL, '6791ab0e9bedef117f863806a3938973', NULL, NULL, NULL, NULL, NULL, 'live', '305a1ac4-74d7-4368-960c-adfc17ef1312', NULL, 'file', '2017-03-05T11:13:47.143941-06:00'), ('legacy', 'b806c373-d658-4250-83fa-2c8cb57b7126', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '23d8e6a0-fa79-4323-a0a6-2dea2a319667', '02ae91b2-04c4-42aa-a17e-acc1cd567538', 'TCGA-CC-A5UE-01A-11D-A28X-10', 'aliquot', '23d8e6a0-fa79-4323-a0a6-2dea2a319667', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-CC-A5UE-01A-11D-A28X-10_IonTorrent_validation.tar.bz2', 272853, 'b806c373-d658-4250-83fa-2c8cb57b7126', NULL, NULL, NULL, 'f9216255372f78f975ace04a3332bb96', '725e3663-75be-4c36-8165-4ff5d53fa26f;b4097d51-1068-457e-ab2d-7ee1dd053ec8;b7b4f4f3-50a5-4064-94c3-13b22ee121af', 'bc691bda-ea07-4664-8a68-d9b4b4765083_analysis.xml;bc691bda-ea07-4664-8a68-d9b4b4765083_experiment.xml;bc691bda-ea07-4664-8a68-d9b4b4765083_run.xml', '2516;33244;76031', NULL, NULL, 'live', 'bc691bda-ea07-4664-8a68-d9b4b4765083', NULL, 'file', '2017-03-05T16:30:32.274191-06:00'), ('legacy', '34ceea15-6c00-44d0-a099-522cba8e90a6', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '5b8d04b2-ef40-4216-a3bb-42520efbe863', '85d5f17f-7a02-4e34-aeb5-0a41708f9af4', 'TCGA-DD-A4NK-01A-11D-A28X-10', 'aliquot', '5b8d04b2-ef40-4216-a3bb-42520efbe863', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-DD-A4NK-01A-11D-A28X-10_IonTorrent_validation.tar.bz2', 271976, '34ceea15-6c00-44d0-a099-522cba8e90a6', NULL, NULL, NULL, 'd10ad26835b77509b8a15a7af3832c6a', '4f59cc41-a94b-4822-a69d-6483d6bbd915;b3a00721-d5de-4a7c-9ce5-781e43db37b6;e7db4f47-1810-4cfe-a7b7-adc21dfac9f0', '212b8124-57e3-4303-8edb-989fd1401e0e_analysis.xml;212b8124-57e3-4303-8edb-989fd1401e0e_experiment.xml;212b8124-57e3-4303-8edb-989fd1401e0e_run.xml', '2516;33043;75232', NULL, NULL, 'live', '212b8124-57e3-4303-8edb-989fd1401e0e', NULL, 'file', '2017-03-05T16:32:41.678414-06:00');