-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.bulkRNAseq_level3_metadata_r2`
(
  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_Data_File_ID STRING OPTIONS(description="HTAN Data File Identifier indicating the file(s) from which these files were derived"),
  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)"),
  Pseudo_Alignment_Used STRING OPTIONS(description="Pseudo aligners such as Kallisto or Salmon do not produce aligned reads BAM files. True indicates pseudoalignment was used."),
  Data_Category STRING OPTIONS(description="Specific content type of the data file."),
  Expression_Units STRING OPTIONS(description="How quantities are corrected for gene length"),
  Matrix_Type STRING OPTIONS(description="Type of data stored in matrix."),
  Fusion_Gene_Detected STRING OPTIONS(description="Was a fusion gene identified?"),
  Fusion_Gene_Identity STRING OPTIONS(description="The gene symbols of fused genes."),
  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 3 METADATA R2 VERSIONED",
  description="Data was extracted from HTAN Synapse projects in April 2022. More details: see https://data.humantumoratlas.org/standard/bulkrnaseq",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("program", "htan"), ("source", "htan"), ("status", "current"), ("category", "metadata")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.bulkRNAseq_level3_metadata_r2` (Component, Filename, File_Format, HTAN_Parent_Data_File_ID, HTAN_Data_File_ID, Pseudo_Alignment_Used, Data_Category, Expression_Units, Matrix_Type, Fusion_Gene_Detected, Fusion_Gene_Identity, entityId, HTAN_Center, Data_Release, File_Size, Base_Filename, md5) VALUES ('BulkRNA-seqLevel3', 'bulk_rnaseq_level_3/0000254583_kallisto.tsv', 'tsv', 'HTA9_1_1150;HTA9_1_1147', 'HTA9_1_19618', 'No', 'Isoform Expression Quantification', 'TPM', 'Raw Counts', 'None', 'None', 'syn26535393', 'HTAN OHSU', 'Release 2.0', 27783714, '0000254583_kallisto.tsv', '4a130d14742afee7d041d41d0b9f9733'), ('BulkRNA-seqLevel3', 'bulk_rnaseq_level_3/0000264005_kallisto.tsv', 'tsv', 'HTA9_1_1148;HTA9_1_1146', 'HTA9_1_19619', 'No', 'Isoform Expression Quantification', 'TPM', 'Raw Counts', 'None', 'None', 'syn26535398', 'HTAN OHSU', 'Release 2.0', 28009572, '0000264005_kallisto.tsv', 'fcc9dd764248ea99dc1be1b377e903af'), ('BulkRNA-seqLevel3', 'bulk_rnaseq_level_3/0000322075_kallisto.tsv', 'tsv', 'HTA9_1_19612;HTA9_1_19614', 'HTA9_1_19620', 'No', 'Isoform Expression Quantification', 'TPM', 'Raw Counts', 'None', 'None', 'syn26535394', 'HTAN OHSU', 'Release 2.0', 27802284, '0000322075_kallisto.tsv', 'a9266d58872d76784c86574cc1b1ac9e'), ('BulkRNA-seqLevel3', 'bulk_rnaseq_level_3/0000265302_kallisto.tsv', 'tsv', 'HTA9_1_1145;HTA9_1_1149', 'HTA9_1_19621', 'No', 'Isoform Expression Quantification', 'TPM', 'Raw Counts', 'None', 'None', 'syn26535396', 'HTAN OHSU', 'Release 2.0', 27947186, '0000265302_kallisto.tsv', '1020e107d42b27c6d87948d8932d9180'), ('BulkRNA-seqLevel3', 'bulk_rnaseq_level_3/0000322075-counts.txt', 'tsv', 'HTA9_1_19617', 'HTA9_1_19622', 'No', 'Isoform Expression Quantification', 'TPM', 'Raw Counts', 'None', 'None', 'syn26535392', 'HTAN OHSU', 'Release 2.0', 27819541, '0000322075-counts.txt', 'baeca7b216861296c7ee15042ac8ef5e');