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