-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.10xvisium_spatialtranscriptomics_scRNAseq_level4_metadata_r5`
(
  Workflow_Link STRING OPTIONS(description="Link to workflow or command. DockStore.org recommended. URL"),
  Run_ID STRING OPTIONS(description="A unique identifier for this individual run (typically associated with a single slide) of the spatial transcriptomic processing workflow."),
  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"),
  Filename STRING OPTIONS(description="Name of a file"),
  Visium_Workflow_Type STRING OPTIONS(description="Generic name for the workflow used to analyze the visium data set."),
  HTAN_Parent_Data_File_ID STRING OPTIONS(description="HTAN Data File Identifier indicating the file(s) from which these files were derived"),
  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)"),
  Visium_Workflow_Parameters_Description STRING OPTIONS(description="Parameters used to run the workflow.."),
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  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 VISIUM RNA-SEQ LEVEL 4 METADATA R5 VERSIONED",
  description="This table contains the file metadata for fourth level (i.e. h5ad files) 10x Genomics Visium sequencing data extracted from HTAN Synapse projects in April 2024 and corresponds to HTAN Data Release 5.1. More details: see https://data.humantumoratlas.org/standard/spatial_transcriptomics",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("program", "htan"), ("source", "htan"), ("category", "metadata"), ("status", "current")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.10xvisium_spatialtranscriptomics_scRNAseq_level4_metadata_r5` (Workflow_Link, Run_ID, HTAN_Parent_Biospecimen_ID, Filename, Visium_Workflow_Type, HTAN_Parent_Data_File_ID, entityId, Id, HTAN_Data_File_ID, Visium_Workflow_Parameters_Description, Component, File_Format, Workflow_Version, HTAN_Center, Manifest_Id, Manifest_Version, File_Size, md5, Data_Release, CDS_Release) VALUES ('https://support.10xgenomics.com/spatial-gene-expression/software/pipelines/latest/using/count', '6723-KL', 'HTA11_99999971397_80384', 'visium_level_4/6723_KL_1_unfiltered.h5ad', 'Spaceranger 1.3.0', 'HTA11_99999971397_8038433111,HTA11_99999971397_8038433121,HTA11_99999971397_8038433131,HTA11_99999971397_8038433141', 'syn51133519', '43864f71-c535-45dd-b3b7-502f95b9c169', 'HTA11_99999971397_8038434111', 'transcriptome -- GRCh38-2020-A, probe-set -- Human_Transcriptome_Probe_Set_v1.0_GRCh38-2020-A.csv,, histology image, visium slide serial number, visium slide capture area code, loupe alignment json file', '10xVisiumSpatialTranscriptomics-RNA-seqLevel4', 'hdf5', 'spaceranger-2.0.0', 'HTAN Vanderbilt', 'syn52226006', 2, 54979295, '7cd7095a9e0e2229b1fdd5a5e4ee9401', 'Release 5.0', NULL), ('https://support.10xgenomics.com/spatial-gene-expression/software/pipelines/latest/using/count', '6723-KL', 'HTA11_99999971397_80384', 'visium_level_4/6723_KL_2_unfiltered.h5ad', 'Spaceranger 1.3.0', 'HTA11_99999971397_8038433211,HTA11_99999971397_8038433221,HTA11_99999971397_8038433231,HTA11_99999971397_8038433241', 'syn51133520', '0e7f6274-c712-4755-8b0c-50a323c44fcc', 'HTA11_99999971397_8038434211', 'transcriptome -- GRCh38-2020-A, probe-set -- Human_Transcriptome_Probe_Set_v1.0_GRCh38-2020-A.csv,, histology image, visium slide serial number, visium slide capture area code, loupe alignment json file', '10xVisiumSpatialTranscriptomics-RNA-seqLevel4', 'hdf5', 'spaceranger-2.0.0', 'HTAN Vanderbilt', 'syn52226006', 2, 58272902, 'f57565bf2f4372f3e653401b9f910702', 'Release 5.0', NULL), ('https://support.10xgenomics.com/spatial-gene-expression/software/pipelines/latest/using/count', '6723-KL', 'HTA11_99999971397_80384', 'visium_level_4/6723_KL_3_unfiltered.h5ad', 'Spaceranger 1.3.0', 'HTA11_99999971397_8038433311,HTA11_99999971397_8038433321,HTA11_99999971397_8038433331,HTA11_99999971397_8038433341', 'syn51133521', '5a17c1b2-0ba6-4784-97d4-4c5bce6e047d', 'HTA11_99999971397_8038434311', 'transcriptome -- GRCh38-2020-A, probe-set -- Human_Transcriptome_Probe_Set_v1.0_GRCh38-2020-A.csv,, histology image, visium slide serial number, visium slide capture area code, loupe alignment json file', '10xVisiumSpatialTranscriptomics-RNA-seqLevel4', 'hdf5', 'spaceranger-2.0.0', 'HTAN Vanderbilt', 'syn52226006', 2, 42481876, '1b6e0aaca7138687c5673d4c7f458adf', 'Release 5.0', NULL), ('https://support.10xgenomics.com/spatial-gene-expression/software/pipelines/latest/using/count', '6723-KL', 'HTA11_99999971397_80384', 'visium_level_4/6723_KL_4_unfiltered.h5ad', 'Spaceranger 1.3.0', 'HTA11_99999971397_8038433411,HTA11_99999971397_8038433421,HTA11_99999971397_8038433431,HTA11_99999971397_8038433441', 'syn51133522', '6592ac58-6a57-468b-8d51-baf4fbf57144', 'HTA11_99999971397_8038434411', 'transcriptome -- GRCh38-2020-A, probe-set -- Human_Transcriptome_Probe_Set_v1.0_GRCh38-2020-A.csv,, histology image, visium slide serial number, visium slide capture area code, loupe alignment json file', '10xVisiumSpatialTranscriptomics-RNA-seqLevel4', 'hdf5', 'spaceranger-2.0.0', 'HTAN Vanderbilt', 'syn52226006', 2, 37535752, '4b9c1deba2c79c8a061b4f0a8b7e3fd2', 'Release 5.0', NULL), ('https://support.10xgenomics.com/spatial-gene-expression/software/pipelines/latest/using/count', '7003-AS', 'HTA11_99999974143_84620', 'visium_level_4/7003_AS_1_unfiltered.h5ad', 'Spaceranger 1.3.0', 'HTA11_99999974143_8462033111,HTA11_99999974143_8462033121,HTA11_99999974143_8462033131,HTA11_99999974143_8462033141', 'syn51133523', '602870d5-d76d-468f-b2fd-b473c7c678bb', 'HTA11_99999974143_8462034111', 'transcriptome -- GRCh38-2020-A, probe-set -- Human_Transcriptome_Probe_Set_v1.0_GRCh38-2020-A.csv,, histology image, visium slide serial number, visium slide capture area code, loupe alignment json file', '10xVisiumSpatialTranscriptomics-RNA-seqLevel4', 'hdf5', 'spaceranger-2.0.0', 'HTAN Vanderbilt', 'syn52226006', 2, 19035870, '6e9d1074baa4d7a7742d5dfd5fe218e2', 'Release 5.0', NULL);