-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.hiCseq_level1_metadata_r4`
(
  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"),
  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)"),
  DNA_Input_Amount STRING OPTIONS(description="Amount of DNA for library construction, in nanograms."),
  Ligation_Condition STRING OPTIONS(description="Name of ligase and condition for proximity ligation"),
  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."),
  Crosslinking_Condtion STRING OPTIONS(description="Detailed condition for DNA crosslinking"),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  Genomic_Reference STRING OPTIONS(description="Exact version of the human genome reference used in the alignment of reads (e.g. GCF_000001405.39)"),
  DNA_Digestion_Condition STRING OPTIONS(description="Enzymes and treatment length/temperature for genome digestion"),
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  Transposition_Reaction STRING OPTIONS(description="Name of the transposase, transposon sequences"),
  Biotin_Enrichment STRING OPTIONS(description="Whether biotin is used for enriching ligation product"),
  Nucleic_Acid_Source STRING OPTIONS(description="The source of the input nucleic molecule"),
  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"),
  File_Format STRING OPTIONS(description="Format of a file (e.g. txt, csv, fastq, bam, etc.)"),
  Filename STRING OPTIONS(description="Name of a file"),
  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."),
  Nuclei_Permeabilization_Method STRING OPTIONS(description="Detergent and treatment condition for nuclei permeabilization and crosslinking softening"),
  Total_Reads STRING OPTIONS(description="Total number of reads per sample. Integer"),
  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 R4 VERSIONED",
  description="This table contains the file metadata for the first 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_level1_metadata_r4` (HTAN_Data_File_ID, Id, Technical_Replicate_Group, DNA_Input_Amount, Ligation_Condition, Protocol_Link, Crosslinking_Condtion, entityId, Genomic_Reference, DNA_Digestion_Condition, Component, Transposition_Reaction, Biotin_Enrichment, Nucleic_Acid_Source, HTAN_Parent_Biospecimen_ID, File_Format, Filename, Sequencing_Platform, Nuclei_Permeabilization_Method, Total_Reads, HTAN_Center, Manifest_Id, Manifest_Version, File_Size, md5, Data_Release, CDS_Release) VALUES ('HTA10_01_13855081584197260642224401723853', '65c14dc5-ca89-421a-8c41-68ab70c9573c', '1', '300', 'T4 ligase, 4 degree over night', 'https://doi.org/10.1101/2022.08.26.505505', '1% Formaldehyde, 10 min', 'syn39533306', 'GCA_000001405.28', 'HinP1I, DdeI, CviAII, FspBI, MseI', 'HI-C-seqLevel1', 'Diagenode-unloaded Apex-Bio', 'Yes', 'Bulk Nuclei', 'HTA10_01_007', 'fastq', 'hic_level_1/mhc_A001C007_R1.fastq.gz', 'Illumina NovaSeq 6000', '0.5% Triton, 0.05% SDS, room temp', '306145362', 'HTAN Stanford', 'syn51526303', 2, 52884143684, '138f508bf8e1972606e2224eab72385d', 'Release 4.0', NULL), ('HTA10_01_00491395202451674766778335220084', '559b4583-233c-4955-a5db-e846e2c3009e', '1', '300', 'T4 ligase, 4 degree over night', 'https://doi.org/10.1101/2022.08.26.505506', '1% Formaldehyde, 10 min', 'syn39534225', 'GCA_000001405.29', 'HinP1I, DdeI, CviAII, FspBI, MseI', 'HI-C-seqLevel1', 'Diagenode-unloaded Apex-Bio', 'Yes', 'Bulk Nuclei', 'HTA10_01_007', 'fastq', 'hic_level_1/mhc_A001C007_R2.fastq.gz', 'Illumina NovaSeq 6000', '0.5% Triton, 0.05% SDS, room temp', '306145362', 'HTAN Stanford', 'syn51526303', 2, 47350118436, '0a491d95ca2e5b6747667783352ca084', 'Release 4.0', NULL), ('HTA10_01_45508725326355113558835781473395', '8fa023f1-3dfe-4396-a36e-5b077918f289', '1', '300', 'T4 ligase, 4 degree over night', 'https://doi.org/10.1101/2022.08.26.505507', '1% Formaldehyde, 10 min', 'syn39534978', 'GCA_000001405.30', 'HinP1I, DdeI, CviAII, FspBI, MseI', 'HI-C-seqLevel1', 'Diagenode-unloaded Apex-Bio', 'Yes', 'Bulk Nuclei', 'HTA10_01_008', 'fastq', 'hic_level_1/mhc_A001C008_R1.fastq.gz', 'Illumina NovaSeq 6000', '0.5% Triton, 0.05% SDS, room temp', '344133634', 'HTAN Stanford', 'syn51526303', 2, 58451807692, '4f5a872fd263f51bd5f88df78147dd9f', 'Release 4.0', NULL), ('HTA10_01_52135259612255402898298378162222', 'e9529592-0701-494a-bb3e-56e6d9585a9b', '1', '300', 'T4 ligase, 4 degree over night', 'https://doi.org/10.1101/2022.08.26.505508', '1% Formaldehyde, 10 min', 'syn39536422', 'GCA_000001405.31', 'HinP1I, DdeI, CviAII, FspBI, MseI', 'HI-C-seqLevel1', 'Diagenode-unloaded Apex-Bio', 'Yes', 'Bulk Nuclei', 'HTA10_01_008', 'fastq', 'hic_level_1/mhc_A001C008_R2.fastq.gz', 'Illumina NovaSeq 6000', '0.5% Triton, 0.05% SDS, room temp', '344133634', 'HTAN Stanford', 'syn51526303', 2, 55262522878, 'f2bdf2f9612cf5402898c98d78b622cc', 'Release 4.0', NULL), ('HTA10_01_60223501510642509534655714765913', 'b4d90c4b-f23b-477a-9150-2f6d5e6d5520', '1', '300', 'T4 ligase, 4 degree over night', 'https://doi.org/10.1101/2022.08.26.505509', '1% Formaldehyde, 10 min', 'syn39537341', 'GCA_000001405.32', 'HinP1I, DdeI, CviAII, FspBI, MseI', 'HI-C-seqLevel1', 'Diagenode-unloaded Apex-Bio', 'Yes', 'Bulk Nuclei', 'HTA10_01_011', 'fastq', 'hic_level_1/mhc_A001C011_R1.fastq.gz', 'Illumina NovaSeq 6000', '0.5% Triton, 0.05% SDS, room temp', '343355772', 'HTAN Stanford', 'syn51526303', 2, 54192889912, '6ac235ab510642f095d46557be76591d', 'Release 4.0', NULL);