-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.bulkRNAseq_level1_metadata_r3`
(
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  Filename STRING OPTIONS(description="Name of a file"),
  File_Format STRING OPTIONS(description="Format of a file (e.g. txt, csv, fastq, bam, etc.)"),
  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"),
  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)"),
  Library_Layout STRING OPTIONS(description="Sequencing read type"),
  Read_Indicator STRING OPTIONS(description="Indicate if this is Read 1 (R1) or Read 2 (R2)"),
  Nucleic_Acid_Source STRING OPTIONS(description="The source of the input nucleic molecule"),
  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."),
  Sequencing_Batch_ID STRING OPTIONS(description="Links samples to a specific local sequencer run. Can be string or 'null'"),
  Read_Length STRING OPTIONS(description="The length of the sequencing reads. Can be integer, null"),
  Library_Selection_Method STRING OPTIONS(description="How the molecules are isolated."),
  Library_Preparation_Kit_Name STRING OPTIONS(description="Name of Library Preparation Kit. String"),
  Library_Preparation_Kit_Vendor STRING OPTIONS(description="Vendor of Library Preparation Kit. String"),
  Library_Preparation_Kit_Version STRING OPTIONS(description="Version of Library Preparation Kit. String"),
  Library_Preparation_Days_from_Index STRING OPTIONS(description="Number of days between sample for assay was received in lab and the libraries were prepared for sequencing [number]. If not applicable please enter 'Not Applicable'"),
  Spike_In STRING OPTIONS(description="A set of known synthetic RNA molecules with known sequence that are added to the cell lysis mix"),
  Adapter_Name STRING OPTIONS(description="Name of the sequencing adapter. String"),
  Adapter_Sequence STRING OPTIONS(description="Base sequence of the sequencing adapter. String"),
  Base_Caller_Name STRING OPTIONS(description="Name of the base caller. String"),
  Base_Caller_Version STRING OPTIONS(description="Version of the base caller. String"),
  Flow STRING OPTIONS(description="Description not available. Contact HTAN DCC for more information."),
  Cell_Barcode STRING OPTIONS(description="Description not available. Contact HTAN DCC for more information."),
  Fragment_Maximum_Length STRING OPTIONS(description="Maximum length of the sequenced fragments (e.g., as predicted by Agilent Bioanalyzer). Integer"),
  Fragment_Mean_Length STRING OPTIONS(description="Mean length of the sequenced fragments (e.g., as predicted by Agilent Bioanalyzer). Number"),
  Fragment_Minimum_Length STRING OPTIONS(description="Minimum length of the sequenced fragments (e.g., as predicted by Agilent Bioanalyzer). Integer"),
  Fragment_Standard_Deviation_Length STRING OPTIONS(description="Standard deviation of the sequenced fragments length (e.g., as predicted by Agilent Bioanalyzer). Number"),
  Lane_Number STRING OPTIONS(description="The basic machine unit for sequencing. For Illumina machines, this reflects the physical lane number. Wrong or missing information may affect analysis results. Integer"),
  Library_Strand STRING OPTIONS(description="Library stranded-ness."),
  Multiplex_Barcode STRING OPTIONS(description="The barcode/index sequence used. Wrong or missing information may affect analysis results. String"),
  Size_Selection_Range STRING OPTIONS(description="Range of size selection. String"),
  Target_Depth STRING OPTIONS(description="The targeted read depth prior to sequencing. Integer"),
  To_Trim_Adapter_Sequence STRING OPTIONS(description="Does the user suggest adapter trimming?"),
  Transcript_Integrity_Number STRING OPTIONS(description="Used to describe the quality of the starting material, esp. in regards to FFPE samples. Number"),
  RIN STRING OPTIONS(description="A numerical assessment of the integrity of RNA based on the entire electrophoretic trace of the RNA sample including the presence or absence of degradation products. Number"),
  DV200 STRING OPTIONS(description="Represents the percentage of RNA fragments that are >200 nucleotides in size. Number"),
  Adapter_Content STRING OPTIONS(description="State classification given by FASTQC for the metric. Metric specific details about the states are available on their website."),
  Basic_Statistics STRING OPTIONS(description="State classification given by FASTQC for the metric. Metric specific details about the states are available on their website."),
  Encoding STRING OPTIONS(description="Version of ASCII encoding of quality values found in the file. String"),
  Kmer_Content STRING OPTIONS(description="State classification given by FASTQC for the metric. Metric specific details about the states are available on their website."),
  Overrepresented_Sequences STRING OPTIONS(description="State classification given by FASTQC for the metric. Metric specific details about the states are available on their website."),
  Per_Base_N_Content STRING OPTIONS(description="State classification given by FASTQC for the metric. Metric specific details about the states are available on their website."),
  Per_Base_Sequence_Content STRING OPTIONS(description="State classification given by FASTQC for the metric. Metric specific details about the states are available on their website."),
  Per_Base_Sequence_Quality STRING OPTIONS(description="State classification given by FASTQC for the metric. Metric specific details about the states are available on their website."),
  Per_Sequence_GC_Content STRING OPTIONS(description="State classification given by FASTQC for the metric. Metric specific details about the states are available on their website."),
  Per_Sequence_Quality_Score STRING OPTIONS(description="State classification given by FASTQC for the metric. Metric specific details about the states are available on their website."),
  Per_Tile_Sequence_Quality STRING OPTIONS(description="State classification given by FASTQC for the metric. Metric specific details about the states are available on their website."),
  Percent_GC_Content STRING OPTIONS(description="The overall %GC of all bases in all sequences. Integer"),
  Sequence_Duplication_Levels STRING OPTIONS(description="State classification given by FASTQC for the metric. Metric specific details about the states are available on their website."),
  Sequence_Length_Distribution STRING OPTIONS(description="State classification given by FASTQC for the metric. Metric specific details about the states are available on their website."),
  Total_Reads STRING OPTIONS(description="Total number of reads per sample. Integer"),
  QC_Workflow_Type STRING OPTIONS(description="Generic name for the workflow used to analyze a data set. String"),
  QC_Workflow_Version STRING OPTIONS(description="Major version for a workflow. String"),
  QC_Workflow_Link STRING OPTIONS(description="Link to workflow used. String"),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  HTAN_Center STRING OPTIONS(description="Name of HTAN Center e.g. HTAN HTAPP"),
  Data_Release STRING OPTIONS(description="Inclusion in HTAN Data Release e.g. Release 1.0"),
  Manifest_Version INT64 OPTIONS(description="Latest version of metadata manifest"),
  Uuid STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  File_Size INT64 OPTIONS(description="Size of file (bucket object) in bytes"),
  md5 STRING OPTIONS(description="md5 hash of file"),
  CDS_Release STRING OPTIONS(description="CDS transfer package in which file was included e.g. v22.6.1.seq")
)
OPTIONS(
  friendly_name="HTAN BULKRNASEQ LEVEL 1 METADATA R3 VERSIONED",
  description="This table contains the file metadata for first level (i.e. fastq) bulk RNA sequencing data extracted from HTAN Synapse projects in April 2023. More details: see https://data.humantumoratlas.org/standard/sequencing",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("program", "htan"), ("source", "htan"), ("status", "current"), ("category", "metadata")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.bulkRNAseq_level1_metadata_r3` (Component, Filename, File_Format, HTAN_Parent_Biospecimen_ID, HTAN_Data_File_ID, Library_Layout, Read_Indicator, Nucleic_Acid_Source, Sequencing_Platform, Sequencing_Batch_ID, Read_Length, Library_Selection_Method, Library_Preparation_Kit_Name, Library_Preparation_Kit_Vendor, Library_Preparation_Kit_Version, Library_Preparation_Days_from_Index, Spike_In, Adapter_Name, Adapter_Sequence, Base_Caller_Name, Base_Caller_Version, Flow, Cell_Barcode, Fragment_Maximum_Length, Fragment_Mean_Length, Fragment_Minimum_Length, Fragment_Standard_Deviation_Length, Lane_Number, Library_Strand, Multiplex_Barcode, Size_Selection_Range, Target_Depth, To_Trim_Adapter_Sequence, Transcript_Integrity_Number, RIN, DV200, Adapter_Content, Basic_Statistics, Encoding, Kmer_Content, Overrepresented_Sequences, Per_Base_N_Content, Per_Base_Sequence_Content, Per_Base_Sequence_Quality, Per_Sequence_GC_Content, Per_Sequence_Quality_Score, Per_Tile_Sequence_Quality, Percent_GC_Content, Sequence_Duplication_Levels, Sequence_Length_Distribution, Total_Reads, QC_Workflow_Type, QC_Workflow_Version, QC_Workflow_Link, entityId, HTAN_Center, Data_Release, Manifest_Version, Uuid, File_Size, md5, CDS_Release) VALUES ('BulkRNA-seqLevel1', 'bulk_RNAseq_level_1/ht056p-s1paa2y2e1_1.CAGTGGACCA-CTTCGGAATC.HFLKKDSXY_CAGTGGACCA-CTTCGGAATC_L001_R1.fastq.gz', 'fastq', 'HTA12_1_8', 'HTA12_1_1015', 'Paired End', 'R1', 'Bulk Whole Cell', 'Illumina NovaSeq 6000', 's4861', '150', 'rRNA Depletion', 'QIAseq FastSelect', 'Qiagen', 'QIAseq FastSelect –rRNA HMR Kit', NULL, 'PhiX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'syn24994808', 'HTAN WUSTL', 'Release 1.0', 1, '997359b4-d61e-4ca6-b4c4-6839a734fe14', 3886969325, '84ae753728d3c7e234211dd72b89e664', 'v21.9.1.seq'), ('BulkRNA-seqLevel1', 'bulk_RNAseq_level_1/ht056p-s1paa2y2e1_1.CAGTGGACCA-CTTCGGAATC.HFLKKDSXY_CAGTGGACCA-CTTCGGAATC_L004_R1.fastq.gz', 'fastq', 'HTA12_1_8', 'HTA12_1_1017', 'Paired End', 'R1', 'Bulk Whole Cell', 'Illumina NovaSeq 6000', 's4861', '150', 'rRNA Depletion', 'QIAseq FastSelect', 'Qiagen', 'QIAseq FastSelect –rRNA HMR Kit', NULL, 'PhiX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'syn24994811', 'HTAN WUSTL', 'Release 1.0', 1, 'c6a2e95e-eed2-4e41-88a9-154667126be5', 1485040849, '3dbf29b8d46ba7bb46abc1fb923881e2', 'v21.9.1.seq'), ('BulkRNA-seqLevel1', 'bulk_RNAseq_level_1/ht056p-s1pba1y3e1_1.ACTTAACGCG-GATGCGCATA.HFLKKDSXY_ACTTAACGCG-GATGCGCATA_L001_R1.fastq.gz', 'fastq', 'HTA12_1_9', 'HTA12_1_1019', 'Paired End', 'R1', 'Bulk Whole Cell', 'Illumina NovaSeq 6000', 's4861', '150', 'rRNA Depletion', 'QIAseq FastSelect', 'Qiagen', 'QIAseq FastSelect –rRNA HMR Kit', NULL, 'PhiX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'syn24994810', 'HTAN WUSTL', 'Release 1.0', 1, 'ce8e8c67-5255-4bcf-a7cc-fd32cca8724e', 3644636637, 'ebcb1a22a921d30ec71e71cda825b1d6', 'v21.9.1.seq'), ('BulkRNA-seqLevel1', 'bulk_RNAseq_level_1/ht056p-s1pba1y3e1_1.ACTTAACGCG-GATGCGCATA.HFLKKDSXY_ACTTAACGCG-GATGCGCATA_L004_R1.fastq.gz', 'fastq', 'HTA12_1_9', 'HTA12_1_1021', 'Paired End', 'R1', 'Bulk Whole Cell', 'Illumina NovaSeq 6000', 's4861', '150', 'rRNA Depletion', 'QIAseq FastSelect', 'Qiagen', 'QIAseq FastSelect –rRNA HMR Kit', NULL, 'PhiX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'syn24994813', 'HTAN WUSTL', 'Release 1.0', 1, '804f849a-a24c-4f5a-98af-bd9edef10f57', 1411434960, '411644bff4b216040b7348a6d24ef5d7', 'v21.9.1.seq'), ('BulkRNA-seqLevel1', 'bulk_RNAseq_level_1/ht056p-s1r1a4y3e1_1.CCGCCAATAA-ACACATTGAC.HFLKKDSXY_CCGCCAATAA-ACACATTGAC_L001_R1.fastq.gz', 'fastq', 'HTA12_1_10', 'HTA12_1_1023', 'Paired End', 'R1', 'Bulk Whole Cell', 'Illumina NovaSeq 6000', 's4861', '150', 'rRNA Depletion', 'QIAseq FastSelect', 'Qiagen', 'QIAseq FastSelect –rRNA HMR Kit', NULL, 'PhiX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'syn24995051', 'HTAN WUSTL', 'Release 1.0', 1, 'c6dd794c-e025-42f6-9de9-118c1516110c', 3853772261, 'aeec4ceda360e773d14977ee0e06c0b1', 'v21.9.1.seq');