-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.hiCseq_level2_metadata_r5`
(
  Tool STRING OPTIONS(description="Were any software or computational tools generated for this content"),
  Aligned_Read_Length STRING OPTIONS(description="Read length used for alignment if hard trimming was applied"),
  Filename STRING OPTIONS(description="Name of a file"),
  HTAN_Parent_Data_File_ID STRING OPTIONS(description="HTAN Data File Identifier indicating the file(s) from which these files were derived"),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  Id STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  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)"),
  Resolution STRING OPTIONS(description="Binning size used for generating contact matrix, in basepair."),
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  Normalization_Method STRING OPTIONS(description="Description of Normalization Process"),
  Genomic_Reference STRING OPTIONS(description="Exact version of the human genome reference used in the alignment of reads (e.g. GCF_000001405.39)"),
  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 HICSEQ LEVEL 2 METADATA R5 VERSIONED",
  description="This table contains the file metadata for the second level of Hi-C sequencing. Data was 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.hiCseq_level2_metadata_r5` (Tool, Aligned_Read_Length, Filename, HTAN_Parent_Data_File_ID, entityId, Id, HTAN_Data_File_ID, Resolution, Component, Normalization_Method, Genomic_Reference, File_Format, HTAN_Center, Manifest_Id, Manifest_Version, File_Size, md5, Data_Release, CDS_Release) VALUES ('Yes', '150*2', 'hic_level_2/A001C007.hg38.nodups.pairs.hic', 'HTA10_01_13855081584197260642224401723853', 'syn39637837', 'fc0f21ea-3c35-48fd-88a9-18fe75c76f5a', 'HTA10_01_02111112505221117092515353123518', '100', 'HI-C-seqLevel2', 'KR balancing', 'GCA_000001405.28', 'hic', 'HTAN Stanford', 'syn51702921', 8, 4540228517, '0c111112f05c2b1b709cf1fd5d12d5b8', 'Release 4.0', 'v23.10.1.seq'), ('Yes', '150*2', 'hic_level_2/A001C008.hg38.nodups.pairs.hic', 'HTA10_01_45508725326355113558835781473395', 'syn39637223', 'a3dba9dc-74a0-4018-9422-5751887bac51', 'HTA10_01_92428387570152424939805371405065', '100', 'HI-C-seqLevel2', 'KR balancing', 'GCA_000001405.29', 'hic', 'HTAN Stanford', 'syn51702921', 8, 4849622351, '9cec8387f7abf2ece939805d71ea5a65', 'Release 4.0', 'v23.10.1.seq'), ('Yes', '150*2', 'hic_level_2/A001C011.hg38.nodups.pairs.hic', 'HTA10_01_60223501510642509534655714765913', 'syn39638034', '20a80d66-71d1-4eae-a585-2a7b9a748bba', 'HTA10_01_52061529106121724881009714575106', '100', 'HI-C-seqLevel2', 'KR balancing', 'GCA_000001405.30', 'hic', 'HTAN Stanford', 'syn51702921', 8, 4134456585, 'fca615c9106bc172e881a09714575ba6', 'Release 4.0', 'v23.10.1.seq'), ('Yes', '150*2', 'hic_level_2/A001C013.hg38.nodups.pairs.hic', 'HTA10_01_41891372348257922110552002908032', 'syn39637874', '2fb13e89-1472-4265-ac6d-6e83ec013e88', 'HTA10_01_35123932611103079255145644433426', '100', 'HI-C-seqLevel2', 'KR balancing', 'GCA_000001405.31', 'hic', 'HTAN Stanford', 'syn51702921', 8, 4556801630, 'd5b239326b11a3a792ff1456444dd426', 'Release 4.0', 'v23.10.1.seq'), ('Yes', '150*2', 'hic_level_2/A001C019.hg38.nodups.pairs.hic', 'HTA10_01_14452248040501055198543084828670', 'syn39638194', '85391634-d22e-427c-899b-8c91fb6210df', 'HTA10_01_16408682308497015292452990911510', '100', 'HI-C-seqLevel2', 'KR balancing', 'GCA_000001405.32', 'hic', 'HTAN Stanford', 'syn51702921', 8, 4273884453, '164a8682d08497abfc9ce529909115ba', 'Release 4.0', 'v23.10.1.seq');