-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.scRNAseq_level4_metadata_r5`
(
  Workflow_Link STRING OPTIONS(description="Link to workflow or command. DockStore.org recommended. URL"),
  Filename STRING OPTIONS(description="Name of a file"),
  HTAN_Parent_Data_File_ID STRING OPTIONS(description="HTAN Data File Identifier indicating the file(s) from which these files were derived"),
  scRNAseq_Workflow_Parameters_Description STRING OPTIONS(description="Parameters used to run the workflow. scRNA-seq level 3: e.g. Normalization and log transformation, ran empty drops or doublet detection, used filter on # genes/cell, etc. scRNA-seq Level 4: dimensionality reduction with PCA and 50 components, nearest-neighbor graph with k = 20 and Leiden clustering with resolution = 1, UMAP visualization using 50 PCA components, marker genes used to annotate cell types, information about droplet matrix (all barcodes) to cell matrix (only informative barcodes representing real cells) conversion"),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  Id STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  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)"),
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  scRNAseq_Workflow_Type STRING OPTIONS(description="Generic name for the workflow used to analyze a data set."),
  File_Format STRING OPTIONS(description="Format of a file (e.g. txt, csv, fastq, bam, etc.)"),
  Workflow_Version STRING OPTIONS(description="Major version of the workflow (e.g. Cell Ranger v3.1)"),
  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 SCRNASEQ LEVEL 4 METADATA R5 VERSIONED",
  description="This table contains the file metadata for the fourth level (t-SNE plot coordinates, etc.) single cell RNA sequencing. Data was extracted from HTAN Synapse projects in April 2024 and corresponds to HTAN Data Release 5.1. 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.scRNAseq_level4_metadata_r5` (Workflow_Link, Filename, HTAN_Parent_Data_File_ID, scRNAseq_Workflow_Parameters_Description, entityId, Id, HTAN_Data_File_ID, Component, scRNAseq_Workflow_Type, File_Format, Workflow_Version, HTAN_Center, Manifest_Id, Manifest_Version, File_Size, md5, Data_Release, CDS_Release) VALUES ('https://satijalab.org/seurat/', 'sc_rna_seq_level_4/Linh_UCLA/Case1_GGO_CD45Neg_clusterID.csv', 'HTA3_8001_6402630869', 'Graph based clustering with dims = 30 and resolution = 1', 'syn24875896', 'e0a775d9-1805-4ad3-9762-a289a1bb3f9c', 'HTA3_8001_3257504874', 'ScRNA-seqLevel4', 'Other', 'csv', 'Seurat v3.1.5', 'HTAN BU', 'syn39148043', 2, 307419, '07af9f50e5f361c362f60d50d675506a', 'Release 1.0', NULL), ('https://satijalab.org/seurat/', 'sc_rna_seq_level_4/Linh_UCLA/Case1_GGO_CD45Pos_clusterID.csv', 'HTA3_8001_6402630869', 'Graph based clustering with dims = 30 and resolution = 1', 'syn24875877', '2081dcca-9723-4a4f-90c2-6da7af16ed17', 'HTA3_8001_0308286425', 'ScRNA-seqLevel4', 'Other', 'csv', 'Seurat v3.1.5', 'HTAN BU', 'syn39148043', 2, 261806, '3d9510d64e2f709665ee1cef81b4e7d9', 'Release 1.0', NULL), ('https://satijalab.org/seurat/', 'sc_rna_seq_level_4/Linh_UCLA/Case1_Normal_CD45Neg_clusterID.csv', 'HTA3_8001_0344122741', 'Graph based clustering with dims = 30 and resolution = 1', 'syn24875894', '61701956-f03d-441c-bcfa-5e493208734e', 'HTA3_8001_7463840742', 'ScRNA-seqLevel4', 'Other', 'csv', 'Seurat v3.1.5', 'HTAN BU', 'syn39148043', 2, 423158, 'f2a2105973b152c0470e1e3cb4679fe6', 'Release 1.0', NULL), ('https://satijalab.org/seurat/', 'sc_rna_seq_level_4/Linh_UCLA/Case1_Normal_CD45Pos_clusterID.csv', 'HTA3_8001_0344122741', 'Graph based clustering with dims = 30 and resolution = 1', 'syn24875897', 'a441de20-9c46-4f0a-ae9a-b9b312e24ccc', 'HTA3_8001_2586675862', 'ScRNA-seqLevel4', 'Other', 'csv', 'Seurat v3.1.5', 'HTAN BU', 'syn39148043', 2, 329943, 'ad968a7890d173d6fd7ef6bb08b74296', 'Release 1.0', NULL), ('https://satijalab.org/seurat/', 'sc_rna_seq_level_4/Linh_UCLA/Case2_GGO_CD45Neg_clusterID.csv', 'HTA3_8002_5549497360', 'Graph based clustering with dims = 30 and resolution = 1', 'syn24875890', '3ae05f81-ae3c-436f-9c0b-0f1e90bb04fc', 'HTA3_8002_3584734953', 'ScRNA-seqLevel4', 'Other', 'csv', 'Seurat v3.1.5', 'HTAN BU', 'syn39148043', 2, 84941, '51b222d5d5589d930666849e5ad04ee9', 'Release 1.0', NULL);