-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.10xvisium_spatialtranscriptomics_auxiliaryfiles_metadata_r3`
(
  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_Data_File_ID STRING OPTIONS(description="Self-identifier for this data file - HTAN ID of this file HTAN ID SOP (eg HTANx_yyy_zzz)"),
  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"),
  HTAN_Parent_Data_File_ID STRING OPTIONS(description="HTAN Data File Identifier indicating the file(s) from which these files were derived"),
  Run_ID STRING OPTIONS(description="A unique identifier for this individual run (typically associated with a single slide) of the spatial transcriptomic processing workflow."),
  Visium_File_Type STRING OPTIONS(description="The file type generated for the visium experiment."),
  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."),
  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)"),
  Workflow_Link STRING OPTIONS(description="Link to workflow or command. DockStore.org recommended. URL"),
  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"),
  Manifest_Version INT64 OPTIONS(description="Latest version of metadata manifest"),
  Uuid STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  File_Size INT64 OPTIONS(description="Size of file (bucket object) in bytes"),
  md5 STRING OPTIONS(description="md5 hash of file"),
  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 R3 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 April 2023. More details: see https://data.humantumoratlas.org/standard/sequencing",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("program", "htan"), ("source", "htan"), ("status", "current"), ("category", "metadata")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.10xvisium_spatialtranscriptomics_auxiliaryfiles_metadata_r3` (Component, Filename, File_Format, HTAN_Data_File_ID, HTAN_Parent_Biospecimen_ID, HTAN_Parent_Data_File_ID, Run_ID, Visium_File_Type, Slide_ID, Capture_Area, Workflow_Version, Workflow_Link, entityId, HTAN_Center, Data_Release, Manifest_Version, Uuid, File_Size, md5, CDS_Release) VALUES ('10xVisiumSpatialTranscriptomics-AuxiliaryFiles', 'visium_auxiliary_pdac/HT224P1-S1Fc2U1Z1Bs1-1-scalefactors_json.json', 'json', 'HTA12_22_3007', 'HTA12_22_4', 'HTA12_22_2002', 'HT224P1-S1Fc2U1Z1Bs1-1', 'json scale factors', 'V10Y07-090', 'C1', 'spaceranger-1.2.2', 'https://github.com/reykajayasinghe/HTAN/blob/main/Single_cell_preprocessing/run_spaceranger_1.2.2.sh', 'syn51283227', 'HTAN WUSTL', 'Release 3.0', 4, '84e1950e-e23e-4101-93a8-65271530d8eb', 166, '7e8334f80c45420b6e681c87f50c7f80', NULL), ('10xVisiumSpatialTranscriptomics-AuxiliaryFiles', 'visium_auxiliary_pdac/HT224P1-S1Fc2U1Z1Bs1-1-tissue_lowres_image.png', 'png', 'HTA12_22_3008', 'HTA12_22_4', 'HTA12_22_2002', 'HT224P1-S1Fc2U1Z1Bs1-1', 'low res image', 'V10Y07-090', 'C1', 'spaceranger-1.2.2', 'https://github.com/reykajayasinghe/HTAN/blob/main/Single_cell_preprocessing/run_spaceranger_1.2.2.sh', 'syn51283242', 'HTAN WUSTL', 'Release 3.0', 4, 'd5b16b60-ae18-41a8-ba7a-08eb3c280242', 530575, '5c3ac79b2220f9e3cb10165a2499bf78', NULL), ('10xVisiumSpatialTranscriptomics-AuxiliaryFiles', 'visium_auxiliary_pdac/HT231P1-S1H3Fc2U1Z1Bs1-H3Bs2-Test-scalefactors_json.json', 'json', 'HTA12_23_3007', 'HTA12_23_3', 'HTA12_23_2002', 'HT231P1-S1H3Fc2U1Z1Bs1-H3Bs2-Test', 'json scale factors', 'V10L08-058', 'A1', 'spaceranger-1.2.2', 'https://github.com/reykajayasinghe/HTAN/blob/main/Single_cell_preprocessing/run_spaceranger_1.2.2.sh', 'syn51283228', 'HTAN WUSTL', 'Release 3.0', 4, '92baf81c-e13b-4285-bcdc-e88f583afff3', 166, 'efcab1969fb715fb03bbec32806829f0', NULL), ('10xVisiumSpatialTranscriptomics-AuxiliaryFiles', 'visium_auxiliary_pdac/HT231P1-S1H3Fc2U1Z1Bs1-H3Bs2-Test-tissue_lowres_image.png', 'png', 'HTA12_23_3008', 'HTA12_23_3', 'HTA12_23_2002', 'HT231P1-S1H3Fc2U1Z1Bs1-H3Bs2-Test', 'low res image', 'V10L08-058', 'A1', 'spaceranger-1.2.2', 'https://github.com/reykajayasinghe/HTAN/blob/main/Single_cell_preprocessing/run_spaceranger_1.2.2.sh', 'syn51283243', 'HTAN WUSTL', 'Release 3.0', 4, '149660c4-0760-4762-9aab-76c43d9f19d8', 591610, 'd638d8bc8d56e44c1856037187cc9133', NULL), ('10xVisiumSpatialTranscriptomics-AuxiliaryFiles', 'visium_auxiliary_pdac/HT232P1H1A2-scalefactors_json.json', 'json', 'HTA12_24_3007', 'HTA12_24_5', 'HTA12_24_2002', 'HT232P1H1A2', 'json scale factors', 'V10M12-007', 'C1', 'spaceranger-1.2.2', 'https://github.com/reykajayasinghe/HTAN/blob/main/Single_cell_preprocessing/run_spaceranger_1.2.2.sh', 'syn51283229', 'HTAN WUSTL', 'Release 3.0', 4, '7114a1aa-d019-4c61-8d99-66cb28ec0857', 166, 'b09e9f48ed8773ca629300bfa43891a7', NULL);