-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.10xvisium_spatialtranscriptomics_auxiliaryfiles_metadata_r4`
(
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  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."),
  Workflow_Version STRING OPTIONS(description="Major version of the workflow (e.g. Cell Ranger v3.1)"),
  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."),
  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)"),
  Id STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  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"),
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  Visium_File_Type STRING OPTIONS(description="The file type generated for the visium experiment."),
  Workflow_Link STRING OPTIONS(description="Link to workflow or command. DockStore.org recommended. URL"),
  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"),
  HTAN_Parent_Data_File_ID STRING OPTIONS(description="HTAN Data File Identifier indicating the file(s) from which these files were derived"),
  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 AUXILIARY METADATA R4 VERSIONED",
  description="This table contains the file metadata for auxiliary files associated with 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_auxiliaryfiles_metadata_r4` (entityId, Capture_Area, Workflow_Version, Slide_ID, HTAN_Data_File_ID, Id, HTAN_Parent_Biospecimen_ID, Component, Visium_File_Type, Workflow_Link, File_Format, Run_ID, Filename, HTAN_Parent_Data_File_ID, HTAN_Center, Manifest_Id, Manifest_Version, File_Size, md5, Data_Release, CDS_Release) VALUES ('syn51283227', 'C1', 'spaceranger-1.2.2', 'V10Y07-090', 'HTA12_22_3007', '84e1950e-e23e-4101-93a8-65271530d8eb', 'HTA12_22_4', '10xVisiumSpatialTranscriptomics-AuxiliaryFiles', 'json scale factors', 'https://github.com/reykajayasinghe/HTAN/blob/main/Single_cell_preprocessing/run_spaceranger_1.2.2.sh', 'json', 'HT224P1-S1Fc2U1Z1Bs1-1', 'visium_auxiliary_pdac/HT224P1-S1Fc2U1Z1Bs1-1-scalefactors_json.json', 'HTA12_22_2002', 'HTAN WUSTL', 'syn51284480', 4, 166, '7e8334f80c45420b6e681c87f50c7f80', 'Release 3.0', NULL), ('syn51283242', 'C1', 'spaceranger-1.2.2', 'V10Y07-090', 'HTA12_22_3008', 'd5b16b60-ae18-41a8-ba7a-08eb3c280242', 'HTA12_22_4', '10xVisiumSpatialTranscriptomics-AuxiliaryFiles', 'low res image', 'https://github.com/reykajayasinghe/HTAN/blob/main/Single_cell_preprocessing/run_spaceranger_1.2.2.sh', 'png', 'HT224P1-S1Fc2U1Z1Bs1-1', 'visium_auxiliary_pdac/HT224P1-S1Fc2U1Z1Bs1-1-tissue_lowres_image.png', 'HTA12_22_2002', 'HTAN WUSTL', 'syn51284480', 4, 530575, '5c3ac79b2220f9e3cb10165a2499bf78', 'Release 3.0', NULL), ('syn51283228', 'A1', 'spaceranger-1.2.2', 'V10L08-058', 'HTA12_23_3007', '92baf81c-e13b-4285-bcdc-e88f583afff3', 'HTA12_23_3', '10xVisiumSpatialTranscriptomics-AuxiliaryFiles', 'json scale factors', 'https://github.com/reykajayasinghe/HTAN/blob/main/Single_cell_preprocessing/run_spaceranger_1.2.2.sh', 'json', 'HT231P1-S1H3Fc2U1Z1Bs1-H3Bs2-Test', 'visium_auxiliary_pdac/HT231P1-S1H3Fc2U1Z1Bs1-H3Bs2-Test-scalefactors_json.json', 'HTA12_23_2002', 'HTAN WUSTL', 'syn51284480', 4, 166, 'efcab1969fb715fb03bbec32806829f0', 'Release 3.0', NULL), ('syn51283243', 'A1', 'spaceranger-1.2.2', 'V10L08-058', 'HTA12_23_3008', '149660c4-0760-4762-9aab-76c43d9f19d8', 'HTA12_23_3', '10xVisiumSpatialTranscriptomics-AuxiliaryFiles', 'low res image', 'https://github.com/reykajayasinghe/HTAN/blob/main/Single_cell_preprocessing/run_spaceranger_1.2.2.sh', 'png', 'HT231P1-S1H3Fc2U1Z1Bs1-H3Bs2-Test', 'visium_auxiliary_pdac/HT231P1-S1H3Fc2U1Z1Bs1-H3Bs2-Test-tissue_lowres_image.png', 'HTA12_23_2002', 'HTAN WUSTL', 'syn51284480', 4, 591610, 'd638d8bc8d56e44c1856037187cc9133', 'Release 3.0', NULL), ('syn51283229', 'C1', 'spaceranger-1.2.2', 'V10M12-007', 'HTA12_24_3007', '7114a1aa-d019-4c61-8d99-66cb28ec0857', 'HTA12_24_5', '10xVisiumSpatialTranscriptomics-AuxiliaryFiles', 'json scale factors', 'https://github.com/reykajayasinghe/HTAN/blob/main/Single_cell_preprocessing/run_spaceranger_1.2.2.sh', 'json', 'HT232P1H1A2', 'visium_auxiliary_pdac/HT232P1H1A2-scalefactors_json.json', 'HTA12_24_2002', 'HTAN WUSTL', 'syn51284480', 4, 166, 'b09e9f48ed8773ca629300bfa43891a7', 'Release 3.0', NULL);