-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.electron_microscopy_level1_metadata_r5`
(
  EM_voltage STRING OPTIONS(description="Accelerating voltage in kiloelectronvolts (keV)"),
  EM_beam_current STRING OPTIONS(description="Beam current in nanoamps (nA)"),
  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."),
  EM_dwell_or_exposure_time STRING OPTIONS(description="Duration in microseconds (µs) of electron beam data collection per pixel or frame"),
  SizeC STRING OPTIONS(description="Number of channels. Integer >= 1"),
  PhysicalSizeY STRING OPTIONS(description="Physical size (Y-dimension) of a pixel. Units are set by PhysicalSizeYUnit. Floating point value > 0."),
  SizeX STRING OPTIONS(description="Size of image: X dimension (in pixels). Integer >= 1"),
  EM_stage_tilt STRING OPTIONS(description="Physical stage tilt in degrees with respect to the electron beam"),
  EM_spot_size STRING OPTIONS(description="Beam spot size in micrometers (µm)"),
  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"),
  EM_signal_processing STRING OPTIONS(description="SNR improvement strategies used"),
  Filename STRING OPTIONS(description="Name of a file"),
  PhysicalSizeX STRING OPTIONS(description="Physical size (X-dimension) of a pixel. Units are set by PhysicalSizeXUnit. Floating point value > 0."),
  EM_method STRING OPTIONS(description="Electron microscopy method used"),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  PhysicalSizeZ STRING OPTIONS(description="Physical size (Z-dimension) of a pixel. Units are set by PhysicalSizeZUnit. Floating point value > 0."),
  EM_instrument STRING OPTIONS(description="Make and model of the EM instrument used"),
  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."),
  EM_signal_or_contrast_mech STRING OPTIONS(description="How the electron microscopy signal is generated from the sample"),
  SizeY STRING OPTIONS(description="Size of image: Y dimension (in pixels). Integer >= 1"),
  SizeZ STRING OPTIONS(description="Size of image: Z dimension (in pixels). Integer >= 1"),
  Id STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  EM_contrast_type STRING OPTIONS(description="Does the image use standard SEM contrast or TEM contrast"),
  Software_and_Version STRING OPTIONS(description="Name of software used to generate expression values. String"),
  File_Format STRING OPTIONS(description="Format of a file (e.g. txt, csv, fastq, bam, etc.)"),
  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 ELECTRON MICROSCOPY LEVEL 1 METADATA R5 VERSIONED",
  description="This table contains the file metadata for first level electron microscopy data. 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/standards",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("program", "htan"), ("source", "htan"), ("category", "metadata"), ("status", "current")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.electron_microscopy_level1_metadata_r5` (EM_voltage, EM_beam_current, HTAN_Data_File_ID, Component, EM_dwell_or_exposure_time, SizeC, PhysicalSizeY, SizeX, EM_stage_tilt, EM_spot_size, HTAN_Parent_Biospecimen_ID, EM_signal_processing, Filename, PhysicalSizeX, EM_method, entityId, PhysicalSizeZ, EM_instrument, Protocol_Link, EM_signal_or_contrast_mech, SizeY, SizeZ, Id, EM_contrast_type, Software_and_Version, File_Format, HTAN_Center, Manifest_Id, Manifest_Version, File_Size, md5, Data_Release, CDS_Release) VALUES ('3', '200', 'HTA9_9_3156', 'ElectronMicroscopyLevel1', '3', '1', '4', '6144', '0', NULL, 'HTA9_9_39', NULL, '016/HTA9_9_39_maps2_Tile_001-002-000000_0-000.s0001_e00', '4', 'SEM', 'syn53323954', '1', 'Helios nanoLab G3 FIB-SEM', 'dx.doi.org/10.17504/protocols.io.bg58jy9w', 'BSE', '4096', '1', '7a0b890d-5a20-43e6-a245-b494b1f53293', 'TEM', 'MAPS 3.8.13.392', 'tif', 'HTAN OHSU', 'syn53351449', 4, 25190126, 'e41602c305cdd413cd8de52545d236f8', 'Release 5.1', NULL), ('3', '200', 'HTA9_9_2334', 'ElectronMicroscopyLevel1', '3', '1', '4', '6144', '0', NULL, 'HTA9_9_39', NULL, '016/HTA9_9_39_maps2_Tile_001-003-000000_0-000.s0001_e00', '4', 'SEM', 'syn53323969', '1', 'Helios nanoLab G3 FIB-SEM', 'dx.doi.org/10.17504/protocols.io.bg58jy9w', 'BSE', '4096', '1', '9bdda11b-4afb-431d-a2b5-fbaa23fcf888', 'TEM', 'MAPS 3.8.13.392', 'tif', 'HTAN OHSU', 'syn53351449', 4, 25190124, 'c827bbe50f6ba0b6424fcdafcf702b95', 'Release 5.1', NULL), ('3', '200', 'HTA9_9_3585', 'ElectronMicroscopyLevel1', '3', '1', '4', '6144', '0', NULL, 'HTA9_9_39', NULL, '016/HTA9_9_39_maps2_Tile_001-004-000000_0-000.s0001_e00', '4', 'SEM', 'syn53324012', '1', 'Helios nanoLab G3 FIB-SEM', 'dx.doi.org/10.17504/protocols.io.bg58jy9w', 'BSE', '4096', '1', 'c214ff1a-b8b1-494c-b1fd-409778f70e9e', 'TEM', 'MAPS 3.8.13.392', 'tif', 'HTAN OHSU', 'syn53351449', 4, 25190126, '99b8260ba39fb289fba5f9762dc715d1', 'Release 5.1', NULL), ('3', '200', 'HTA9_9_3056', 'ElectronMicroscopyLevel1', '3', '1', '4', '6144', '0', NULL, 'HTA9_9_39', NULL, '016/HTA9_9_39_maps2_Tile_001-005-000000_0-000.s0001_e00', '4', 'SEM', 'syn53323986', '1', 'Helios nanoLab G3 FIB-SEM', 'dx.doi.org/10.17504/protocols.io.bg58jy9w', 'BSE', '4096', '1', '31e419c1-f723-4e32-9e5a-a8f6ddbb844e', 'TEM', 'MAPS 3.8.13.392', 'tif', 'HTAN OHSU', 'syn53351449', 4, 25190124, '9782a9a9320cb9f5f7a4f80e92540fdb', 'Release 5.1', NULL), ('3', '200', 'HTA9_9_3020', 'ElectronMicroscopyLevel1', '3', '1', '4', '6144', '0', NULL, 'HTA9_9_39', NULL, '016/HTA9_9_39_maps2_Tile_001-006-000000_0-000.s0001_e00', '4', 'SEM', 'syn53323985', '1', 'Helios nanoLab G3 FIB-SEM', 'dx.doi.org/10.17504/protocols.io.bg58jy9w', 'BSE', '4096', '1', '32dba6a9-a69e-4722-b742-f95bf269e725', 'TEM', 'MAPS 3.8.13.392', 'tif', 'HTAN OHSU', 'syn53351449', 4, 25190126, 'fe98acb3b7770b893dc49daa345e1039', 'Release 5.1', NULL);