-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel15_fileData_current`
(
  dbName STRING OPTIONS(description="Referring to the default/main database at the GDC. In this table, this field is always current."),
  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-f91c8f407ba0"),
  `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"),
  analysis_input_file_gdc_ids STRING OPTIONS(description="GDC file UUIDs for input file(s)"),
  analysis_workflow_link STRING OPTIONS(description="Link to GDC workflow on github"),
  analysis_workflow_type STRING OPTIONS(description="Workflow name eg  STAR 2-Pass  "),
  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 phs000182"),
  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."),
  created_datetime STRING OPTIONS(description="Timestamp of creation, eg 2016-10-27T21:58:12.297090-05:06"),
  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"),
  downstream_analyses__output_file_gdc_ids STRING OPTIONS(description="Semicolon-separated list of GDC file UUIDs"),
  downstream_analyses__workflow_link STRING OPTIONS(description="Name of GDC workflow, eg VarScan2 Annotation (if applicable, NULL where no information is available)"),
  downstream_analyses__workflow_type STRING OPTIONS(description="Name of GDC workflow, eg VarScan2 Annotation (if applicable, NULL where no information is available)"),
  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"),
  platform STRING OPTIONS(description="Platform used to generate this data, eg  Illumina  , or  Affymetrix SNP 6.6"),
  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_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 ACTIVE REL15",
  description="Data was generated from file metadata information from the GDC active archive release 15, February 2019. \nMore 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", "hg38"), ("status", "archived"), ("category", "metadata")]
);

INSERT INTO `isb-cgc.GDC_metadata.rel15_fileData_current` (dbName, file_gdc_id, access, acl, analysis_input_file_gdc_ids, analysis_workflow_link, analysis_workflow_type, 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, created_datetime, data_category, data_format, data_type, downstream_analyses__output_file_gdc_ids, downstream_analyses__workflow_link, downstream_analyses__workflow_type, experimental_strategy, file_name, file_size, file_id, index_file_gdc_id, index_file_name, index_file_size, md5sum, platform, file_state, file_submitter_id, file_type, updated_datetime) VALUES ('current', '6eb86925-6c0a-4789-905f-60f29e722048', 'open', 'open', NULL, NULL, NULL, 'a3e26259-732b-49fb-bc95-2f0ec7a0494e', '86fa0bbe-e71b-4451-8b78-a801394d9a85', 'TCGA-61-1743-01A-01-TS1', 'slide', 'a3e26259-732b-49fb-bc95-2f0ec7a0494e', NULL, 'Ovarian Serous Cystadenocarcinoma', 'Ovarian Serous Cystadenocarcinoma', 'phs000178', 'TCGA', 'TCGA-OV', '2018-02-23T15:24:13.037200-06:00', 'Biospecimen', 'SVS', 'Slide Image', NULL, NULL, NULL, 'Tissue Slide', 'TCGA-61-1743-01A-01-TS1.86fa0bbe-e71b-4451-8b78-a801394d9a85.svs', 219735395, '6eb86925-6c0a-4789-905f-60f29e722048', NULL, NULL, NULL, '742c04a00bf6d3ec1ea19226cebbec83', NULL, 'released', 'TCGA-61-1743-01A-01-TS1_slide_image', 'slide_image', '2018-11-30T05:02:52.836756+00:00'), ('current', 'f3ac4b6c-9c3a-4ca4-8ef7-e5fb9d7f9114', 'open', 'open', NULL, NULL, NULL, 'ae5fa7cb-1984-423f-aa88-571314860943', 'eaec24d8-522d-463b-84ff-808b9a5fcf3a', 'TCGA-23-2649-01A-01-BS1', 'slide', 'ae5fa7cb-1984-423f-aa88-571314860943', NULL, 'Ovarian Serous Cystadenocarcinoma', 'Ovarian Serous Cystadenocarcinoma', 'phs000178', 'TCGA', 'TCGA-OV', '2018-02-23T15:24:13.037200-06:00', 'Biospecimen', 'SVS', 'Slide Image', NULL, NULL, NULL, 'Tissue Slide', 'TCGA-23-2649-01A-01-BS1.eaec24d8-522d-463b-84ff-808b9a5fcf3a.svs', 143371549, 'f3ac4b6c-9c3a-4ca4-8ef7-e5fb9d7f9114', NULL, NULL, NULL, '0163abf3c2b63d3bdbd4651133b5eb70', NULL, 'released', 'TCGA-23-2649-01A-01-BS1_slide_image', 'slide_image', '2018-11-30T05:02:52.836756+00:00'), ('current', '33b90217-200d-445c-8dfd-811661a314ed', 'open', 'open', NULL, NULL, NULL, '6c43727d-631a-40fb-b1a1-242a12889eaa', '149f133d-6e85-4a1b-b6dd-e3a64c82a7e1', 'TCGA-04-1369-01A-01-BS1', 'slide', '6c43727d-631a-40fb-b1a1-242a12889eaa', NULL, 'Ovarian Serous Cystadenocarcinoma', 'Ovarian Serous Cystadenocarcinoma', 'phs000178', 'TCGA', 'TCGA-OV', '2018-02-23T15:24:13.037200-06:00', 'Biospecimen', 'SVS', 'Slide Image', NULL, NULL, NULL, 'Tissue Slide', 'TCGA-04-1369-01A-01-BS1.149f133d-6e85-4a1b-b6dd-e3a64c82a7e1.svs', 202032625, '33b90217-200d-445c-8dfd-811661a314ed', NULL, NULL, NULL, '7d5c00415c110855f45fc39025bb28c5', NULL, 'released', 'TCGA-04-1369-01A-01-BS1_slide_image', 'slide_image', '2018-11-30T05:02:52.836756+00:00'), ('current', '3f432b8c-5c49-4e2f-b0d4-b55aa93adfa7', 'open', 'open', NULL, NULL, NULL, 'a8c4a333-6b67-44c8-9000-516f8ccea788', 'bed2de0b-65ae-49a2-8fc6-a1ad85be2972', 'TCGA-24-2271-01A-01-BS1', 'slide', 'a8c4a333-6b67-44c8-9000-516f8ccea788', NULL, 'Ovarian Serous Cystadenocarcinoma', 'Ovarian Serous Cystadenocarcinoma', 'phs000178', 'TCGA', 'TCGA-OV', '2018-02-23T15:24:13.037200-06:00', 'Biospecimen', 'SVS', 'Slide Image', NULL, NULL, NULL, 'Tissue Slide', 'TCGA-24-2271-01A-01-BS1.bed2de0b-65ae-49a2-8fc6-a1ad85be2972.svs', 126641871, '3f432b8c-5c49-4e2f-b0d4-b55aa93adfa7', NULL, NULL, NULL, '72598c5c2d3e4b5d68c286343b443be0', NULL, 'released', 'TCGA-24-2271-01A-01-BS1_slide_image', 'slide_image', '2018-11-30T05:02:52.836756+00:00'), ('current', 'cadec3bf-3d7a-45c9-8e11-792c5f74c532', 'open', 'open', NULL, NULL, NULL, '8fe44099-b313-4bfd-a94a-27e72f2a818c', '3710a5cd-90f0-4d8a-9b23-a85b0640f834', 'TCGA-13-0766-01A-02-BS2', 'slide', '8fe44099-b313-4bfd-a94a-27e72f2a818c', NULL, 'Ovarian Serous Cystadenocarcinoma', 'Ovarian Serous Cystadenocarcinoma', 'phs000178', 'TCGA', 'TCGA-OV', '2018-02-23T15:24:13.037200-06:00', 'Biospecimen', 'SVS', 'Slide Image', NULL, NULL, NULL, 'Tissue Slide', 'TCGA-13-0766-01A-02-BS2.3710a5cd-90f0-4d8a-9b23-a85b0640f834.svs', 144162307, 'cadec3bf-3d7a-45c9-8e11-792c5f74c532', NULL, NULL, NULL, '14f4fb7d68c2bbe153120fd74618ab9f', NULL, 'released', 'TCGA-13-0766-01A-02-BS2_slide_image', 'slide_image', '2018-11-30T05:02:52.836756+00:00');