-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.10xvisium_spatialtranscriptomics_scRNAseq_level1_metadata_r4`
(
  Permeabilization_Time STRING OPTIONS(description="Fixed and stained tissue sections are permeabilized for different times. Each Capture Area captures polyadenylated mRNA from the attached tissue section. Measure is provided in minutes."),
  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)"),
  Spatial_Read1 STRING OPTIONS(description="Read 1 content description"),
  Id STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  Sequencing_Library_Construction_Days_from_Index STRING OPTIONS(description="Number of days between sample for assay was received in lab and day of sequencing library construction [number]. If not applicable please enter 'Not Applicable'"),
  Protocol_Link STRING OPTIONS(description="Protocols.io ID or DOI link to a free/open protocol resource describing in detail the assay protocol (e.g. surface markers used in Smart-seq, dissociation duration,  lot/batch numbers for key reagents such as primers, sequencing reagent kits, etc.) or the protocol by which the sample was obtained or generated."),
  Capture_Area STRING OPTIONS(description="Area (or Capture Area) - One of the either four or two active regions where tissue can be placed on a Visium slide. Each area is intended to contain only one tissue sample. Slide areas are named consecutively from top to bottom: A1, B1, C1, D1 for Visium slides with 6.5 mm Capture Area and A, B for CytAssist slides with 11 mm Capture Area. Both CytAssist slides with 6.5 mm Capture Area and Gateway Slides contain only two slide areas, A1 and D1."),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  Feature_Reference_Id STRING OPTIONS(description="Unique ID for this feature. Must not contain whitespace, quote or comma characters. Each ID must be unique and must not collide with a gene identifier from the transcriptome [https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/feature-bc-analysis#feature-ref]"),
  Spatial_Library_Construction_Method STRING OPTIONS(description="Process which results in the creation of a library from fragments of DNA using cloning vectors or oligonucleotides with the role of adaptors [OBI_0000711]"),
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  Image_Re_orientation STRING OPTIONS(description="To ensure good fiducial alignment and tissue spots detection, it is important to correct for this shift in orientation."),
  cDNA_Offset STRING OPTIONS(description="Offset in sequence for cDNA read (in bp): number"),
  Spatial_Read2 STRING OPTIONS(description="Read 2 content description"),
  End_Bias STRING OPTIONS(description="The end of the cDNA molecule that is preferentially sequenced, e.g. 3/5 prime tag/end or the full length transcript"),
  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'"),
  cDNA_Length STRING OPTIONS(description="Length of cDNA read (in bp): number"),
  UMI_Barcode_Length STRING OPTIONS(description="Length of UMI barcode read (in bp): number"),
  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"),
  Spatial_Barcode_Offset STRING OPTIONS(description="Offset in sequence for spot barcode read (in bp): number"),
  File_Format STRING OPTIONS(description="Format of a file (e.g. txt, csv, fastq, bam, etc.)"),
  Run_ID STRING OPTIONS(description="A unique identifier for this individual run (typically associated with a single slide) of the spatial transcriptomic processing workflow."),
  Filename STRING OPTIONS(description="Name of a file"),
  Reverse_Transcription_Primer STRING OPTIONS(description="An oligo to which new deoxyribonucleotides can be added by DNA polymerase [SO_0000112]. The type of primer used for reverse transcription, e.g. oligo-dT or random primer. This allows users to identify content of the cDNA library input e.g. enriched for mRNA"),
  Read_Indicator STRING OPTIONS(description="Indicate if this is Read 1 (R1) or Read 2 (R2)"),
  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"),
  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."),
  DV200 STRING OPTIONS(description="Represents the percentage of RNA fragments that are >200 nucleotides in size. Number"),
  UMI_Barcode_Offset STRING OPTIONS(description="Start position of UMI barcode in the sequence. Values: number, 0 for start of read"),
  Slide_ID STRING OPTIONS(description="The unique identifier printed on the label of each Visium slide. The serial number starts with V followed by a number which can range between one through five and ends with a dash and a three digit number, such as 123."),
  Slide_Version STRING OPTIONS(description="Version of imaging slide used. Slide version is critical for the analysis of the sequencing data as different slides have different capture area layouts."),
  Spatial_Barcode_Length STRING OPTIONS(description="Length of spot barcode read (in bp): number"),
  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 1 METADATA R4 VERSIONED",
  description="This table contains the file metadata for first level (i.e. fastq files) 10x Genomics Visium sequencing. Data was 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.10xvisium_spatialtranscriptomics_scRNAseq_level1_metadata_r4` (Permeabilization_Time, HTAN_Data_File_ID, Spatial_Read1, Id, Sequencing_Library_Construction_Days_from_Index, Protocol_Link, Capture_Area, entityId, Feature_Reference_Id, Spatial_Library_Construction_Method, Component, Image_Re_orientation, cDNA_Offset, Spatial_Read2, End_Bias, Library_Preparation_Days_from_Index, cDNA_Length, UMI_Barcode_Length, HTAN_Parent_Biospecimen_ID, Spatial_Barcode_Offset, File_Format, Run_ID, Filename, Reverse_Transcription_Primer, Read_Indicator, RIN, Sequencing_Platform, DV200, UMI_Barcode_Offset, Slide_ID, Slide_Version, Spatial_Barcode_Length, HTAN_Center, Manifest_Id, Manifest_Version, File_Size, md5, Data_Release, CDS_Release) VALUES (NULL, 'HTA11_99999971397_8038431111', 'Spatial Barcode and UMI', 'a3caabaf-5f96-437f-bc35-1209cef3f968', '1', 'https://cdn.10xgenomics.com/image/upload/v1660261285/support-documents/CG000407_VisiumSpatialGeneExpressionforFFPE_UserGuide_RevD.pdf', NULL, 'syn51123643', NULL, '10xV1.0', '10xVisiumSpatialTranscriptomics-RNA-seqLevel1', NULL, '0', 'cDNA', '3 Prime', NULL, '90', '12', 'HTA11_99999971397_80384', '0', 'fastq', '6723-KL', 'visium_level_1/6723-KL-1_S1_L005_R1_001.fastq.gz', 'Oligo-dT', 'R1', NULL, 'NovaSeq 6000', NULL, '0', NULL, NULL, '16', 'HTAN Vanderbilt', 'syn51469859', 2, 40664255759, 'b0d8140feadbf0f52afc6e621c999dd3', 'Release 4.0', NULL), (NULL, 'HTA11_99999971397_8038431211', 'Spatial Barcode and UMI', '6042fa99-f181-4c7d-93b3-c0c8e5c97512', '1', 'https://cdn.10xgenomics.com/image/upload/v1660261285/support-documents/CG000407_VisiumSpatialGeneExpressionforFFPE_UserGuide_RevD.pdf', NULL, 'syn51123645', NULL, '10xV1.0', '10xVisiumSpatialTranscriptomics-RNA-seqLevel1', NULL, '0', 'cDNA', '3 Prime', NULL, '90', '12', 'HTA11_99999971397_80384', '0', 'fastq', '6723-KL', 'visium_level_1/6723-KL-2_S1_L005_R1_001.fastq.gz', 'Oligo-dT', 'R1', NULL, 'NovaSeq 6000', NULL, '0', NULL, NULL, '16', 'HTAN Vanderbilt', 'syn51469859', 2, 16098085252, 'f7f9b7a6a199532de9f7663998c09df0', 'Release 4.0', NULL), (NULL, 'HTA11_99999971397_8038431311', 'Spatial Barcode and UMI', '23dab478-5997-443e-ab6b-0500fae6507c', '1', 'https://cdn.10xgenomics.com/image/upload/v1660261285/support-documents/CG000407_VisiumSpatialGeneExpressionforFFPE_UserGuide_RevD.pdf', NULL, 'syn51123647', NULL, '10xV1.0', '10xVisiumSpatialTranscriptomics-RNA-seqLevel1', NULL, '0', 'cDNA', '3 Prime', NULL, '90', '12', 'HTA11_99999971397_80384', '0', 'fastq', '6723-KL', 'visium_level_1/6723-KL-3_S1_L005_R1_001.fastq.gz', 'Oligo-dT', 'R1', NULL, 'NovaSeq 6000', NULL, '0', NULL, NULL, '16', 'HTAN Vanderbilt', 'syn51469859', 2, 13485668043, '7de703dacb0dc5a5abbdaff27ada4110', 'Release 4.0', NULL), (NULL, 'HTA11_99999971397_8038431411', 'Spatial Barcode and UMI', '45073ff5-7100-4481-b544-f476e8b93ab8', '1', 'https://cdn.10xgenomics.com/image/upload/v1660261285/support-documents/CG000407_VisiumSpatialGeneExpressionforFFPE_UserGuide_RevD.pdf', NULL, 'syn51123649', NULL, '10xV1.0', '10xVisiumSpatialTranscriptomics-RNA-seqLevel1', NULL, '0', 'cDNA', '3 Prime', NULL, '90', '12', 'HTA11_99999971397_80384', '0', 'fastq', '6723-KL', 'visium_level_1/6723-KL-4_S1_L005_R1_001.fastq.gz', 'Oligo-dT', 'R1', NULL, 'NovaSeq 6000', NULL, '0', NULL, NULL, '16', 'HTAN Vanderbilt', 'syn51469859', 2, 18351901660, 'd5950a70b206329d8a635345f6bc5857', 'Release 4.0', NULL), (NULL, 'HTA11_99999971397_8038431121', 'Spatial Barcode and UMI', '60277268-f9d6-42c0-80b5-5bb74de64d36', '1', 'https://cdn.10xgenomics.com/image/upload/v1660261285/support-documents/CG000407_VisiumSpatialGeneExpressionforFFPE_UserGuide_RevD.pdf', NULL, 'syn51123644', NULL, '10xV1.0', '10xVisiumSpatialTranscriptomics-RNA-seqLevel1', NULL, '0', 'cDNA', '3 Prime', NULL, '90', '12', 'HTA11_99999971397_80384', '0', 'fastq', '6723-KL', 'visium_level_1/6723-KL-1_S1_L005_R2_001.fastq.gz', 'Oligo-dT', 'R2', NULL, 'NovaSeq 6000', NULL, '0', NULL, NULL, '16', 'HTAN Vanderbilt', 'syn51469859', 2, 38147625128, '098a755df5abae2847e6161e02d5ef28', 'Release 4.0', NULL);