-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel15_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-f91c8f407ba1"),
  `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 phs000183"),
  project_disease_type STRING OPTIONS(description="The type of disease studied by the project; eg. 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:07"),
  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.7"),
  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 REL15",
  description="Data was generated from file metadata information from the GDC legacy archive release 15, February 2019. More details: https://docs.gdc.cancer.gov/Data/Release_Notes/Data_Release_Notes/#data-release-150",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("source", "gdc"), ("reference_genome_0", "hg19"), ("status", "archived"), ("category", "metadata")]
);

INSERT INTO `isb-cgc.GDC_metadata.rel15_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', '52547010-7cda-4dd8-8a4c-94526fbbd5f9', 'controlled', 'phs000218;phs000471', NULL, NULL, NULL, NULL, 'a52a85e7-38b0-5f29-879f-f898ed20f2ee', '2a7e05a7-0f48-5742-872f-4978ec6dc424', 'TARGET-50-PAJNZK-11A-01D', 'aliquot', 'a52a85e7-38b0-5f29-879f-f898ed20f2ee', 'phs000471', 'High-Risk Wilms Tumor', 'High-Risk Wilms Tumor', 'phs000218', 'TARGET', 'TARGET-WT', 'CGCC', '45', 'St. Jude Children''s Research Hospital', 'STJUDE', '2017-06-02T12:46:45.676741-05:00', NULL, NULL, NULL, NULL, 'TARGET-50-PAJNZK-11A-01D.CEL', 69051760, '52547010-7cda-4dd8-8a4c-94526fbbd5f9', NULL, NULL, NULL, '64f825362f4a6666d8398e1f70a82404', NULL, NULL, NULL, NULL, NULL, 'submitted', 'Controlled/WT/copy_number_array/L1/TARGET-50-PAJNZK-11A-01D.CEL', NULL, 'file', '2017-12-16T00:40:43.572900-06:00'), ('legacy', '391156ab-6be5-4cf5-a5cc-3009982d0404', 'controlled', 'phs000218;phs000470', NULL, NULL, NULL, NULL, 'b5f20676-727b-50b0-9b5a-582cd8572d6d', '7205b92e-f0cb-52ec-8066-8f8c53b717cd', 'TARGET-00-NAAEMC-20.3A-01D', 'aliquot', 'b5f20676-727b-50b0-9b5a-582cd8572d6d', 'phs000470', 'Rhabdoid Tumor', 'Rhabdoid Tumor', 'phs000218', 'TARGET', 'TARGET-RT', 'GSC', '34', 'Canada''s Michael Smith Genome Sciences Centre', 'BCGSC', '2017-06-02T12:33:51.718358-05:00', NULL, NULL, NULL, NULL, 'TARGET-00-NAAEMC-20.3A-01D.SLX-CHIP_Control_Embryo-Embryonic-Stem_Cell.bw', 3681138432, '391156ab-6be5-4cf5-a5cc-3009982d0404', NULL, NULL, NULL, 'cf9c293e0ab0f3e490ea9cb3cad91782', NULL, NULL, NULL, NULL, NULL, 'submitted', 'Controlled/RT/ChIP-seq/L3/BCCA/TARGET-00-NAAEMC-20.3A-01D.SLX-CHIP_Control_Embryo-Embryonic-Stem_Cell.bw', NULL, 'file', '2017-12-16T00:45:16.022812-06:00'), ('legacy', 'a2ec3bd5-3471-4cbf-b55a-2b36a036a7c5', 'controlled', 'phs000218;phs000471', NULL, NULL, NULL, NULL, '5dc9328b-b5a0-5542-bda9-752bac0b0178', '06949b10-0fe3-59b0-83cd-a11049fb4c91', 'TARGET-50-CAAAAS-01A-01D', 'aliquot', '5dc9328b-b5a0-5542-bda9-752bac0b0178', 'phs000471', 'High-Risk Wilms Tumor', 'High-Risk Wilms Tumor', 'phs000218', 'TARGET', 'TARGET-WT', 'CGCC', '45', 'St. Jude Children''s Research Hospital', 'STJUDE', '2017-06-02T12:45:10.317189-05:00', NULL, NULL, NULL, NULL, 'TARGET-50-CAAAAS-01A-01D.CEL', 69057328, 'a2ec3bd5-3471-4cbf-b55a-2b36a036a7c5', NULL, NULL, NULL, '5fcc4869565c355939e09fad6373ce5e', NULL, NULL, NULL, NULL, NULL, 'submitted', 'Controlled/WT/copy_number_array/L1/TARGET-50-CAAAAS-01A-01D.CEL', NULL, 'file', '2017-12-16T00:40:43.572900-06:00'), ('legacy', '2bb92885-9629-4223-a34b-72e9e914e89c', 'controlled', 'phs000218;phs000471', NULL, NULL, NULL, NULL, 'c71b52c9-0fb0-57df-9257-d033521c23f0', '54446223-0580-5e34-8c01-c4dcbc4702de', 'TARGET-50-PAJLNJ-01A-01R', 'aliquot', 'c71b52c9-0fb0-57df-9257-d033521c23f0', 'phs000471', 'High-Risk Wilms Tumor', 'High-Risk Wilms Tumor', 'phs000218', 'TARGET', 'TARGET-WT', 'GSC', '34', 'Canada''s Michael Smith Genome Sciences Centre', 'BCGSC', '2017-06-23T19:36:04.379384-05:00', NULL, NULL, NULL, NULL, 'TARGET-50-PAJLNJ-01A-01R.isoform.quantification.txt', 402022, '2bb92885-9629-4223-a34b-72e9e914e89c', NULL, NULL, NULL, '96c7d8b7e69fb2b0964c8c78ab734f25', NULL, NULL, NULL, NULL, NULL, 'submitted', 'Public/WT/miRNA-seq/L3/expression/BCCA/TARGET-50-PAJLNJ-01A-01R.isoform.quantification.txt', NULL, 'file', '2017-12-16T00:40:43.572900-06:00'), ('legacy', 'a7aa4a53-ce71-441d-988b-a6eb418d4725', 'controlled', 'phs000218;phs000471', NULL, NULL, NULL, NULL, 'c06f0889-dee7-5e70-bd0d-854a1230d11d', '9e52fafa-a863-5a9b-9b60-23c6f825b960', 'TARGET-50-PAJLPX-01A-01R', 'aliquot', 'c06f0889-dee7-5e70-bd0d-854a1230d11d', 'phs000471', 'High-Risk Wilms Tumor', 'High-Risk Wilms Tumor', 'phs000218', 'TARGET', 'TARGET-WT', 'GSC', '34', 'Canada''s Michael Smith Genome Sciences Centre', 'BCGSC', '2017-06-23T19:36:10.397198-05:00', NULL, NULL, NULL, NULL, 'TARGET-50-PAJLPX-01A-01R.mirna.quantification.txt', 49940, 'a7aa4a53-ce71-441d-988b-a6eb418d4725', NULL, NULL, NULL, 'db4eab59a7cc1c0b670b31459a8caffb', NULL, NULL, NULL, NULL, NULL, 'submitted', 'Public/WT/miRNA-seq/L3/expression/BCCA/TARGET-50-PAJLPX-01A-01R.mirna.quantification.txt', NULL, 'file', '2017-12-16T00:40:43.572900-06:00');