-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.hiCseq_level1_metadata_r5`
(
  Nucleic_Acid_Source STRING OPTIONS(description="The source of the input nucleic molecule"),
  Ligation_Condition STRING OPTIONS(description="Name of ligase and condition for proximity ligation"),
  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."),
  Total_Reads STRING OPTIONS(description="Total number of reads per sample. Integer"),
  Nuclei_Permeabilization_Method STRING OPTIONS(description="Detergent and treatment condition for nuclei permeabilization and crosslinking softening"),
  Transposition_Reaction STRING OPTIONS(description="Name of the transposase, transposon sequences"),
  Technical_Replicate_Group STRING OPTIONS(description="A common term for all files belonging to the same cell or library. Provide a numbering of each library prep batch (can differ from encapsulation and sequencing batch)"),
  Genomic_Reference STRING OPTIONS(description="Exact version of the human genome reference used in the alignment of reads (e.g. GCF_000001405.39)"),
  Sequencing_Platform STRING OPTIONS(description="A platform is an object aggregate that is the set of instruments and software needed to perform a process [OBI_0000050]. Specific model of the sequencing instrument."),
  HTAN_Parent_Biospecimen_ID STRING OPTIONS(description="HTAN Biospecimen Identifier (eg HTANx_yyy_zzz) indicating the biospecimen(s) from which these files were derived; multiple parent biospecimen should be comma-separated"),
  Biotin_Enrichment STRING OPTIONS(description="Whether biotin is used for enriching ligation product"),
  Filename STRING OPTIONS(description="Name of a file"),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  DNA_Digestion_Condition STRING OPTIONS(description="Enzymes and treatment length/temperature for genome digestion"),
  Protocol_Link STRING OPTIONS(description="Protocols.io ID or DOI link to a free/open protocol resource describing in detail the assay protocol (e.g. surface markers used in Smart-seq, dissociation duration,  lot/batch numbers for key reagents such as primers, sequencing reagent kits, etc.) or the protocol by which the sample was obtained or generated."),
  DNA_Input_Amount STRING OPTIONS(description="Amount of DNA for library construction, in nanograms."),
  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.)"),
  Crosslinking_Condtion STRING OPTIONS(description="Detailed condition for DNA crosslinking"),
  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 1 METADATA R5 VERSIONED",
  description="This table contains the file metadata for the first 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_level1_metadata_r5` (Nucleic_Acid_Source, Ligation_Condition, HTAN_Data_File_ID, Component, Total_Reads, Nuclei_Permeabilization_Method, Transposition_Reaction, Technical_Replicate_Group, Genomic_Reference, Sequencing_Platform, HTAN_Parent_Biospecimen_ID, Biotin_Enrichment, Filename, entityId, DNA_Digestion_Condition, Protocol_Link, DNA_Input_Amount, Id, File_Format, Crosslinking_Condtion, HTAN_Center, Manifest_Id, Manifest_Version, File_Size, md5, Data_Release, CDS_Release) VALUES ('Bulk Nuclei', 'T4 ligase, 4 degree over night', 'HTA10_01_13855081584197260642224401723853', 'HI-C-seqLevel1', '306145362', '0.5% Triton, 0.05% SDS, room temp', 'Diagenode-unloaded Apex-Bio', '1', 'GCA_000001405.28', 'Illumina NovaSeq 6000', 'HTA10_01_007', 'Yes', 'hic_level_1/mhc_A001C007_R1.fastq.gz', 'syn39533306', 'HinP1I, DdeI, CviAII, FspBI, MseI', 'https://doi.org/10.1101/2022.08.26.505505', '300', '65c14dc5-ca89-421a-8c41-68ab70c9573c', 'fastq', '1% Formaldehyde, 10 min', 'HTAN Stanford', 'syn51526303', 2, 52884143684, '138f508bf8e1972606e2224eab72385d', 'Release 4.0', 'v23.10.1.seq'), ('Bulk Nuclei', 'T4 ligase, 4 degree over night', 'HTA10_01_00491395202451674766778335220084', 'HI-C-seqLevel1', '306145362', '0.5% Triton, 0.05% SDS, room temp', 'Diagenode-unloaded Apex-Bio', '1', 'GCA_000001405.29', 'Illumina NovaSeq 6000', 'HTA10_01_007', 'Yes', 'hic_level_1/mhc_A001C007_R2.fastq.gz', 'syn39534225', 'HinP1I, DdeI, CviAII, FspBI, MseI', 'https://doi.org/10.1101/2022.08.26.505506', '300', '559b4583-233c-4955-a5db-e846e2c3009e', 'fastq', '1% Formaldehyde, 10 min', 'HTAN Stanford', 'syn51526303', 2, 47350118436, '0a491d95ca2e5b6747667783352ca084', 'Release 4.0', 'v23.10.1.seq'), ('Bulk Nuclei', 'T4 ligase, 4 degree over night', 'HTA10_01_45508725326355113558835781473395', 'HI-C-seqLevel1', '344133634', '0.5% Triton, 0.05% SDS, room temp', 'Diagenode-unloaded Apex-Bio', '1', 'GCA_000001405.30', 'Illumina NovaSeq 6000', 'HTA10_01_008', 'Yes', 'hic_level_1/mhc_A001C008_R1.fastq.gz', 'syn39534978', 'HinP1I, DdeI, CviAII, FspBI, MseI', 'https://doi.org/10.1101/2022.08.26.505507', '300', '8fa023f1-3dfe-4396-a36e-5b077918f289', 'fastq', '1% Formaldehyde, 10 min', 'HTAN Stanford', 'syn51526303', 2, 58451807692, '4f5a872fd263f51bd5f88df78147dd9f', 'Release 4.0', 'v23.10.1.seq'), ('Bulk Nuclei', 'T4 ligase, 4 degree over night', 'HTA10_01_52135259612255402898298378162222', 'HI-C-seqLevel1', '344133634', '0.5% Triton, 0.05% SDS, room temp', 'Diagenode-unloaded Apex-Bio', '1', 'GCA_000001405.31', 'Illumina NovaSeq 6000', 'HTA10_01_008', 'Yes', 'hic_level_1/mhc_A001C008_R2.fastq.gz', 'syn39536422', 'HinP1I, DdeI, CviAII, FspBI, MseI', 'https://doi.org/10.1101/2022.08.26.505508', '300', 'e9529592-0701-494a-bb3e-56e6d9585a9b', 'fastq', '1% Formaldehyde, 10 min', 'HTAN Stanford', 'syn51526303', 2, 55262522878, 'f2bdf2f9612cf5402898c98d78b622cc', 'Release 4.0', 'v23.10.1.seq'), ('Bulk Nuclei', 'T4 ligase, 4 degree over night', 'HTA10_01_60223501510642509534655714765913', 'HI-C-seqLevel1', '343355772', '0.5% Triton, 0.05% SDS, room temp', 'Diagenode-unloaded Apex-Bio', '1', 'GCA_000001405.32', 'Illumina NovaSeq 6000', 'HTA10_01_011', 'Yes', 'hic_level_1/mhc_A001C011_R1.fastq.gz', 'syn39537341', 'HinP1I, DdeI, CviAII, FspBI, MseI', 'https://doi.org/10.1101/2022.08.26.505509', '300', 'b4d90c4b-f23b-477a-9150-2f6d5e6d5520', 'fastq', '1% Formaldehyde, 10 min', 'HTAN Stanford', 'syn51526303', 2, 54192889912, '6ac235ab510642f095d46557be76591d', 'Release 4.0', 'v23.10.1.seq');