-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.bulkRNAseq_level1_metadata_r4`
(
  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."),
  Encoding STRING OPTIONS(description="Version of ASCII encoding of quality values found in the file. String"),
  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)"),
  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."),
  Id STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  Basic_Statistics STRING OPTIONS(description="State classification given by FASTQC for the metric. Metric specific details about the states are available on their website."),
  Adapter_Content STRING OPTIONS(description="State classification given by FASTQC for the metric. Metric specific details about the states are available on their website."),
  QC_Workflow_Version STRING OPTIONS(description="Major version for a workflow. String"),
  Adapter_Sequence STRING OPTIONS(description="Base sequence of the sequencing adapter. String"),
  Transcript_Integrity_Number STRING OPTIONS(description="Used to describe the quality of the starting material, esp. in regards to FFPE samples. Number"),
  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_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."),
  Library_Selection_Method STRING OPTIONS(description="How RNA molecules are isolated."),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  Adapter_Name STRING OPTIONS(description="Name of the sequencing adapter. String"),
  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."),
  Spike_In_Concentration STRING OPTIONS(description="The final concentration or dilution (for commercial sets) of the spike in mix [PMID:21816910]"),
  QC_Workflow_Link STRING OPTIONS(description="Link to workflow used. String"),
  Flow_Cell_Barcode STRING OPTIONS(description="Flow cell barcode. Wrong or missing information may affect analysis results. String"),
  Fragment_Maximum_Length STRING OPTIONS(description="Maximum length of the sequenced fragments (e.g., as predicted by Agilent Bioanalyzer). Integer"),
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  ROI_Tag STRING OPTIONS(description="The tag or grouping used to identify the ROI in micro-regional RNA sequencing (if applicable). Must match the ROI tag within the count matrix in level 3."),
  Library_Preparation_Kit_Vendor STRING OPTIONS(description="Vendor of Library Preparation Kit. String"),
  Size_Selection_Range STRING OPTIONS(description="Range of size selection. String"),
  To_Trim_Adapter_Sequence STRING OPTIONS(description="Does the user suggest adapter trimming?"),
  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'"),
  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."),
  Fragment_Standard_Deviation_Length STRING OPTIONS(description="Standard deviation of the sequenced fragments length (e.g., as predicted by Agilent Bioanalyzer). Number"),
  Nucleic_Acid_Source STRING OPTIONS(description="The source of the input nucleic molecule"),
  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"),
  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."),
  Overrepresented_Sequences 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."),
  Kmer_Content STRING OPTIONS(description="State classification given by FASTQC for the metric. Metric specific details about the states are available on their website."),
  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"),
  QC_Workflow_Type STRING OPTIONS(description="Generic name for the workflow used to analyze a data set. String"),
  File_Format STRING OPTIONS(description="Format of a file (e.g. txt, csv, fastq, bam, etc.)"),
  Sequencing_Batch_ID STRING OPTIONS(description="Links samples to a specific local sequencer run. Can be string or 'null'"),
  Filename STRING OPTIONS(description="Name of a file"),
  Library_Layout STRING OPTIONS(description="Sequencing read type"),
  Library_Preparation_Kit_Version STRING OPTIONS(description="Version of Library Preparation Kit. String"),
  Base_Caller_Version STRING OPTIONS(description="Version of the base caller. String"),
  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"),
  Micro_region_Seq_Platform STRING OPTIONS(description="The platform used for micro-regional RNA sequencing (if applicable)"),
  Percent_GC_Content STRING OPTIONS(description="The overall %GC of all bases in all sequences. Integer"),
  Read_Indicator STRING OPTIONS(description="Indicate if this is Read 1 (R1) or Read 2 (R2)"),
  Base_Caller_Name STRING OPTIONS(description="Name of the base caller. String"),
  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."),
  Fragment_Minimum_Length STRING OPTIONS(description="Minimum 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"),
  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"),
  Library_Preparation_Kit_Name STRING OPTIONS(description="Name of Library Preparation Kit. String"),
  DV200 STRING OPTIONS(description="Represents the percentage of RNA fragments that are >200 nucleotides in size. Number"),
  Read_Length STRING OPTIONS(description="The length of the sequencing reads. Can be integer, null"),
  Target_Depth STRING OPTIONS(description="The targeted read depth prior to sequencing. Integer"),
  Spike_In STRING OPTIONS(description="A set of known synthetic RNA molecules with known sequence that are added to the cell lysis mix"),
  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 BULKRNASEQ LEVEL 1 METADATA R4 VERSIONED",
  description="This table contains the file metadata for first level (i.e. fastq) bulk RNA sequencing data 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.bulkRNAseq_level1_metadata_r4` (Per_Sequence_GC_Content, Encoding, HTAN_Data_File_ID, Per_Base_Sequence_Content, Id, Basic_Statistics, Adapter_Content, QC_Workflow_Version, Adapter_Sequence, Transcript_Integrity_Number, Per_Sequence_Quality_Score, Per_Base_N_Content, Library_Selection_Method, entityId, Adapter_Name, Per_Tile_Sequence_Quality, Spike_In_Concentration, QC_Workflow_Link, Flow_Cell_Barcode, Fragment_Maximum_Length, Component, ROI_Tag, Library_Preparation_Kit_Vendor, Size_Selection_Range, To_Trim_Adapter_Sequence, Library_Preparation_Days_from_Index, Sequence_Duplication_Levels, Fragment_Standard_Deviation_Length, Nucleic_Acid_Source, Library_Strand, Multiplex_Barcode, Per_Base_Sequence_Quality, Overrepresented_Sequences, Sequence_Length_Distribution, Kmer_Content, HTAN_Parent_Biospecimen_ID, QC_Workflow_Type, File_Format, Sequencing_Batch_ID, Filename, Library_Layout, Library_Preparation_Kit_Version, Base_Caller_Version, Lane_Number, Micro_region_Seq_Platform, Percent_GC_Content, Read_Indicator, Base_Caller_Name, Sequencing_Platform, Fragment_Minimum_Length, Fragment_Mean_Length, RIN, Library_Preparation_Kit_Name, DV200, Read_Length, Target_Depth, Spike_In, Total_Reads, HTAN_Center, Manifest_Id, Manifest_Version, File_Size, md5, Data_Release, CDS_Release) VALUES (NULL, NULL, 'HTA3_80002_4678306659', NULL, '1c80e28f-b3e4-4b59-b522-45e0a4b3bafc', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Other', 'syn51597520', NULL, NULL, NULL, NULL, NULL, NULL, 'BulkRNA-seqLevel1', NULL, 'Illumina', NULL, NULL, NULL, NULL, NULL, 'Bulk Whole Cell', NULL, NULL, NULL, NULL, NULL, NULL, 'HTA3_80002_6001003', NULL, 'fastq', '1', 'Bulk_RNA_Level_1/LUAD/R_LUAD/UCLA/430R_S8_R1_001.fastq.gz', 'Paired End', 'TruSeq RNA Exome', NULL, NULL, NULL, NULL, 'R1', NULL, 'Illumina Next Seq 500', NULL, NULL, NULL, 'TruSeq RNA Exome', NULL, '75', NULL, 'No Spike In', NULL, 'HTAN BU', 'syn51668044', 2, 3199510845, 'f2715f233d5c40a92673994a3e23353c', 'Release 4.0', NULL), (NULL, NULL, 'HTA3_80002_4748757909', NULL, 'bc0bc58b-fd87-4ec2-b6ba-56b9673d5e23', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Other', 'syn51597552', NULL, NULL, NULL, NULL, NULL, NULL, 'BulkRNA-seqLevel1', NULL, 'Illumina', NULL, NULL, NULL, NULL, NULL, 'Bulk Whole Cell', NULL, NULL, NULL, NULL, NULL, NULL, 'HTA3_80002_6002002', NULL, 'fastq', '1', 'Bulk_RNA_Level_1/LUAD/R_LUAD/UCLA/431R_S7_R1_001.fastq.gz', 'Paired End', 'TruSeq RNA Exome', NULL, NULL, NULL, NULL, 'R1', NULL, 'Illumina Next Seq 500', NULL, NULL, NULL, 'TruSeq RNA Exome', NULL, '75', NULL, 'No Spike In', NULL, 'HTAN BU', 'syn51668044', 2, 2755620317, '6e81c3951262e1d9c53c0d623651866a', 'Release 4.0', NULL), (NULL, NULL, 'HTA3_80002_7967504597', NULL, 'fe620612-7f55-4797-a575-b3e586e2da43', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Other', 'syn51597580', NULL, NULL, NULL, NULL, NULL, NULL, 'BulkRNA-seqLevel1', NULL, 'Illumina', NULL, NULL, NULL, NULL, NULL, 'Bulk Whole Cell', NULL, NULL, NULL, NULL, NULL, NULL, 'HTA3_80002_6003004', NULL, 'fastq', '1', 'Bulk_RNA_Level_1/LUAD/R_LUAD/UCLA/432R_S6_R1_001.fastq.gz', 'Paired End', 'TruSeq RNA Exome', NULL, NULL, NULL, NULL, 'R1', NULL, 'Illumina Next Seq 500', NULL, NULL, NULL, 'TruSeq RNA Exome', NULL, '75', NULL, 'No Spike In', NULL, 'HTAN BU', 'syn51668044', 2, 2979155981, 'eaae986fc0c257bdd6e030f67329767d', 'Release 4.0', NULL), (NULL, NULL, 'HTA3_80002_7956503690', NULL, 'a6a430b5-78a8-4027-ae44-33b1433a1dbc', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Other', 'syn51597614', NULL, NULL, NULL, NULL, NULL, NULL, 'BulkRNA-seqLevel1', NULL, 'Illumina', NULL, NULL, NULL, NULL, NULL, 'Bulk Whole Cell', NULL, NULL, NULL, NULL, NULL, NULL, 'HTA3_80002_6004001', NULL, 'fastq', '1', 'Bulk_RNA_Level_1/LUAD/R_LUAD/UCLA/433R_S5_R1_001.fastq.gz', 'Paired End', 'TruSeq RNA Exome', NULL, NULL, NULL, NULL, 'R1', NULL, 'Illumina Next Seq 500', NULL, NULL, NULL, 'TruSeq RNA Exome', NULL, '75', NULL, 'No Spike In', NULL, 'HTAN BU', 'syn51668044', 2, 3078583333, '970d11f970260fe72a7d8b5681a5a899', 'Release 4.0', NULL), (NULL, NULL, 'HTA3_80005_3799610105', NULL, '017fcf5c-7fc0-4ef5-b692-6577c9985ffe', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Other', 'syn51597664', NULL, NULL, NULL, NULL, NULL, NULL, 'BulkRNA-seqLevel1', NULL, 'Illumina', NULL, NULL, NULL, NULL, NULL, 'Bulk Whole Cell', NULL, NULL, NULL, NULL, NULL, NULL, 'HTA3_80005_6001003', NULL, 'fastq', '1', 'Bulk_RNA_Level_1/LUAD/R_LUAD/UCLA/434R_S4_R1_001.fastq.gz', 'Paired End', 'TruSeq RNA Exome', NULL, NULL, NULL, NULL, 'R1', NULL, 'Illumina Next Seq 500', NULL, NULL, NULL, 'TruSeq RNA Exome', NULL, '75', NULL, 'No Spike In', NULL, 'HTAN BU', 'syn51668044', 2, 3463006676, '388b33f9fb4cf0fa8c73fc69f9232d49', 'Release 4.0', NULL);