-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.bulkRNAseq_level1_metadata_r2_v2`
(
  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"),
  File_Size INT64 OPTIONS(description="Size of file (bucket object) in bytes"),
  Base_Filename STRING OPTIONS(description="Base name of file"),
  md5 STRING OPTIONS(description="md5 hash of file")
)
OPTIONS(
  friendly_name="HTAN BULKRNASEQ LEVEL 1 METADATA R2 VERSIONED",
  description="Data was extracted from HTAN Synapse projects in April 2022.  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_r2_v2` (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, File_Size, Base_Filename, md5) VALUES ('BulkRNA-seqLevel1', 'bulk_rnaseq_level_1/d97b5907-621c-4480-b23a-6442bb515c05_R1.fq.gz', 'fastq', 'HTA9_1_1', 'HTA9_1_1148', 'Paired End', 'R1', 'Bulk Whole Cell', 'Illumina Next Seq 550', 'Not Applicable', '76', 'Hybrid Selection', 'Illumina TruSeq RNA Access', 'Illumina', 'Not Applicable', 'None', 'No Spike In', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn23639863', 'HTAN OHSU', 'Release 1.0', 7925030495, 'd97b5907-621c-4480-b23a-6442bb515c05_R1.fq.gz', 'ea7c4b1346d5b9925c1f12c63aa84a60'), ('BulkRNA-seqLevel1', 'bulk_rnaseq_level_1/29963c89-9407-4db7-bfc5-9a6a560e0d41_R1.fq.gz', 'fastq', 'HTA9_1_33', 'HTA9_1_1145', 'Paired End', 'R1', 'Bulk Whole Cell', 'Illumina Next Seq 550', 'Not Applicable', '76', 'Hybrid Selection', 'Illumina TruSeq RNA Access', 'Illumina', 'Not Applicable', 'None', 'No Spike In', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn23639854', 'HTAN OHSU', 'Release 1.0', 6927245585, '29963c89-9407-4db7-bfc5-9a6a560e0d41_R1.fq.gz', 'f40e4b31f60019e2843283a594cc3d9b'), ('BulkRNA-seqLevel1', 'bulk_rnaseq_level_1/b9a02604-5607-4de6-9ef2-5629491ad689_R1.fq.gz', 'fastq', 'HTA9_1_86', 'HTA9_1_1144', 'Paired End', 'R1', 'Bulk Whole Cell', 'Illumina Next Seq 550', 'Not Applicable', '76', 'Hybrid Selection', 'Illumina TruSeq RNA Access', 'Illumina', 'Not Applicable', 'None', 'No Spike In', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn23639838', 'HTAN OHSU', 'Release 1.0', 4630366517, 'b9a02604-5607-4de6-9ef2-5629491ad689_R1.fq.gz', '8b3fd9a6ce5b9eda59e991fb6b55888d'), ('BulkRNA-seqLevel1', 'bulk_rnaseq_level_1/9fd287b7-68d0-494e-9497-be9c082f7965_R1.fq.gz', 'fastq', 'HTA9_1_9', 'HTA9_1_1150', 'Paired End', 'R1', 'Bulk Whole Cell', 'Illumina Next Seq 550', 'Not Applicable', '76', 'Hybrid Selection', 'Illumina TruSeq RNA Access', 'Illumina', 'Not Applicable', 'None', 'No Spike In', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn23639844', 'HTAN OHSU', 'Release 1.0', 5333889466, '9fd287b7-68d0-494e-9497-be9c082f7965_R1.fq.gz', '707b8569da090a5dccf8a2e990a3d333'), ('BulkRNA-seqLevel1', 'bulk_rnaseq_level_1/d97b5907-621c-4480-b23a-6442bb515c05_R2.fq.gz', 'fastq', 'HTA9_1_1', 'HTA9_1_1146', 'Paired End', 'R2', 'Bulk Whole Cell', 'Illumina Next Seq 550', 'Not Applicable', '76', 'Hybrid Selection', 'Illumina TruSeq RNA Access', 'Illumina', 'Not Applicable', 'None', 'No Spike In', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn23639862', 'HTAN OHSU', 'Release 1.0', 8127897268, 'd97b5907-621c-4480-b23a-6442bb515c05_R2.fq.gz', 'bb782760e945c87fafc066893f23f16b');