-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.bulkWES_level3_metadata_r5`
(
  Structural_Variant_Workflow_URL STRING OPTIONS(description="Link to workflow document. DockStore.org recommended. URL"),
  Germline_Variants_Workflow_URL STRING OPTIONS(description="Link to workflow document, e.g. Github, DockStore.org recommended"),
  Custom_Germline_Variants_Workflow_Type STRING OPTIONS(description="Specify the name of a custom alignment workflow"),
  HTAN_Data_File_ID STRING OPTIONS(description="Self-identifier for this data file - HTAN ID of this file HTAN ID SOP (eg HTANx_yyy_zzz)"),
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  Somatic_Variants_Workflow_Type STRING OPTIONS(description="Generic name for the workflow used to analyze a data set."),
  HTAN_Parent_Data_File_ID STRING OPTIONS(description="HTAN Data File Identifier indicating the file(s) from which these files were derived"),
  Genomic_Reference_URL STRING OPTIONS(description="Link to human genome sequence (e.g. ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_34/GRCh38.primary_assembly.genome.fa.gz)"),
  Custom_Structural_Variant_Workflow_Type STRING OPTIONS(description="Specify the name of a custom workflow name"),
  Genomic_Reference STRING OPTIONS(description="Exact version of the human genome reference used in the alignment of reads (e.g. GCF_000001405.39)"),
  Structural_Variant_Workflow_Type STRING OPTIONS(description="Generic name for the workflow used to analyze a data set."),
  Germline_Variants_Workflow_Type STRING OPTIONS(description="Generic name for the workflow used to analyze a data set"),
  Filename STRING OPTIONS(description="Name of a file"),
  Custom_Somatic_Variants_Workflow_Type STRING OPTIONS(description="Specify the name of a custom workflow name"),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  Somatic_Variants_Workflow_URL STRING OPTIONS(description="Generic name for the workflow used to analyze a data set."),
  Somatic_Variants_Sample_Type STRING OPTIONS(description="Is the sample case or control in somatic variant analysis"),
  Id STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  File_Format STRING OPTIONS(description="Format of a file (e.g. txt, csv, fastq, bam, etc.)"),
  HTAN_Center STRING OPTIONS(description="Name of HTAN Center e.g. HTAN HTAPP"),
  Manifest_Id STRING OPTIONS(description="Synapse ID of manifest containing file annotation"),
  Manifest_Version INT64 OPTIONS(description="Latest version of metadata manifest"),
  File_Size INT64 OPTIONS(description="Size of file (bucket object) in bytes"),
  md5 STRING OPTIONS(description="md5 hash of file"),
  Data_Release STRING OPTIONS(description="Inclusion in HTAN Data Release e.g. Release 1.0"),
  CDS_Release STRING OPTIONS(description="CDS transfer package in which file was included e.g. v22.6.1.seq")
)
OPTIONS(
  friendly_name="HTAN BULKWES LEVEL 3 METADATA R5 VERSIONED",
  description="This table contains the file metadata for third level (i.e. expression quantification, variant call files) bulk whole exome sequencing data extracted from HTAN Synapse projects in April 2024 and corresponds to HTAN Data Release 5.1. More details: see https://data.humantumoratlas.org/standard/sequencing",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("program", "htan"), ("source", "htan"), ("category", "metadata"), ("status", "current")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.bulkWES_level3_metadata_r5` (Structural_Variant_Workflow_URL, Germline_Variants_Workflow_URL, Custom_Germline_Variants_Workflow_Type, HTAN_Data_File_ID, Component, Somatic_Variants_Workflow_Type, HTAN_Parent_Data_File_ID, Genomic_Reference_URL, Custom_Structural_Variant_Workflow_Type, Genomic_Reference, Structural_Variant_Workflow_Type, Germline_Variants_Workflow_Type, Filename, Custom_Somatic_Variants_Workflow_Type, entityId, Somatic_Variants_Workflow_URL, Somatic_Variants_Sample_Type, Id, File_Format, HTAN_Center, Manifest_Id, Manifest_Version, File_Size, md5, Data_Release, CDS_Release) VALUES ('Not Applicable', 'https://gatk.broadinstitute.org/hc/en-us/articles/360035535932-Germline-short-variant-discovery-SNPs-Indels-', NULL, 'HTA11_99999967905_8421523111', 'BulkWESLevel3', NULL, 'HTA11_99999967905_8421522111', 'https://console.cloud.google.com/storage/browser/_details/broad-references/hg19/v0/Homo_sapiens_assembly19.fasta', NULL, 'Hg19', NULL, 'GATK4', 'whole_exome_seq_level_3/VCF/WD84215_freq0.001_filtered.vcf', NULL, 'syn27079499', 'Not Applicable', 'Not Applicable', 'fa3ae674-af3f-465d-94c0-9f8c8573ede6', 'vcf', 'HTAN Vanderbilt', 'syn39059825', 8, 78465, '29e30cb338a2829084f46ad7225c0890', 'Release 2.0', NULL), ('Not Applicable', 'https://gatk.broadinstitute.org/hc/en-us/articles/360035535932-Germline-short-variant-discovery-SNPs-Indels-', NULL, 'HTA11_99999954273_8421623111', 'BulkWESLevel3', NULL, 'HTA11_99999954273_8421622111', 'https://console.cloud.google.com/storage/browser/_details/broad-references/hg19/v0/Homo_sapiens_assembly19.fasta', NULL, 'Hg19', NULL, 'GATK4', 'whole_exome_seq_level_3/VCF/WD84216_freq0.001_filtered.vcf', NULL, 'syn27079500', 'Not Applicable', 'Not Applicable', '2ca49426-412d-4ca4-a1f5-e99c4a227a56', 'vcf', 'HTAN Vanderbilt', 'syn39059825', 8, 73885, '48c0c4ab83eb8e215f990554011bd923', 'Release 2.0', NULL), ('Not Applicable', 'https://gatk.broadinstitute.org/hc/en-us/articles/360035535932-Germline-short-variant-discovery-SNPs-Indels-', NULL, 'HTA11_99999956032_8421723111', 'BulkWESLevel3', NULL, 'HTA11_99999956032_8421722111', 'https://console.cloud.google.com/storage/browser/_details/broad-references/hg19/v0/Homo_sapiens_assembly19.fasta', NULL, 'Hg19', NULL, 'GATK4', 'whole_exome_seq_level_3/VCF/WD84217_freq0.001_filtered.vcf', NULL, 'syn27079501', 'Not Applicable', 'Not Applicable', '079fe9e6-1055-48f1-8571-44bcc722d70d', 'vcf', 'HTAN Vanderbilt', 'syn39059825', 8, 42721, '3581cf7a29310ae5d949f1dab68dc7ac', 'Release 2.0', NULL), ('Not Applicable', 'https://gatk.broadinstitute.org/hc/en-us/articles/360035535932-Germline-short-variant-discovery-SNPs-Indels-', NULL, 'HTA11_99999943360_8421823111', 'BulkWESLevel3', NULL, 'HTA11_99999943360_8421822111', 'https://console.cloud.google.com/storage/browser/_details/broad-references/hg19/v0/Homo_sapiens_assembly19.fasta', NULL, 'Hg19', NULL, 'GATK4', 'whole_exome_seq_level_3/VCF/WD84218_freq0.001_filtered.vcf', NULL, 'syn27079502', 'Not Applicable', 'Not Applicable', '141b04d6-9322-4acc-ad8e-cb96767f7b13', 'vcf', 'HTAN Vanderbilt', 'syn39059825', 8, 102997, 'e261ff89436e7a425b9330f6f9a79169', 'Release 2.0', NULL), ('Not Applicable', 'https://gatk.broadinstitute.org/hc/en-us/articles/360035535932-Germline-short-variant-discovery-SNPs-Indels-', NULL, 'HTA11_99999915775_8421923111', 'BulkWESLevel3', NULL, 'HTA11_99999915775_8421922111', 'https://console.cloud.google.com/storage/browser/_details/broad-references/hg19/v0/Homo_sapiens_assembly19.fasta', NULL, 'Hg19', NULL, 'GATK4', 'whole_exome_seq_level_3/VCF/WD84219_freq0.001_filtered.vcf', NULL, 'syn27079503', 'Not Applicable', 'Not Applicable', 'c85195a8-f231-4226-871b-b4d87b59c8a1', 'vcf', 'HTAN Vanderbilt', 'syn39059825', 8, 26978, '842d1a3da62ac45117d7ead372452869', 'Release 2.0', NULL);