-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.srrs_biospecimen_r5`
(
  Collection_Media STRING OPTIONS(description="Material Specimen is collected into post procedure"),
  Fixation_Duration STRING OPTIONS(description="The length of time, from beginning to end, required to process or preserve biospecimens in fixative (measured in minutes)"),
  Biospecimen_Dimension_2 STRING OPTIONS(description="Second dimension of tissue fragment (number, up to one decimal place) measured in units as defined by the \"dimensions_unit\" CDE"),
  Histologic_Morphology_Code STRING OPTIONS(description="Histologic Morphology Code, based on ICD-O-3. Any valid ICD-O-3 morphology code. See https://seer.cancer.gov/icd-o-3/ and https://seer.cancer.gov/icd-o-3/sitetype.icdo3.20200629.xlsx. Examples: 80510"),
  Acquisition_Method_Other_Specify STRING OPTIONS(description="A custom acquisition method [Text - max length 100 characters]"),
  Preinvasive_Morphology STRING OPTIONS(description="Histologic Morphology not included in ICD-O-3 morphology codes, for preinvasive lesions included in the HTAN"),
  Timepoint_Label STRING OPTIONS(description="Label to identify the time point at which the clinical data or biospecimen was obtained (e.g. Baseline, End of Treatment, Overall survival, Final). NO PHI/PII INFORMATION IS ALLOWED."),
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  Site_of_Resection_or_Biopsy STRING OPTIONS(description="The text term used to describe the anatomic site of the resection or biopsy of the patient's malignant disease, as described by the World Health Organization's (WHO) International Classification of Diseases for Oncology (ICD-O)."),
  Fixative_Type STRING OPTIONS(description="Text term to identify the type of fixative used to preserve a tissue specimen"),
  Shipping_Condition_Type STRING OPTIONS(description="Text descriptor of the shipping environment of a biospecimen."),
  Analyte_Type STRING OPTIONS(description="The kind of molecular specimen analyte: a molecular derivative (I.e. RNA / DNA / Protein Lysate) obtained from a specimen"),
  Collection_Days_from_Index STRING OPTIONS(description="Number of days from the research participant's index date that the biospecimen was obtained. If not applicable please enter 'Not Applicable'"),
  Biospecimen_Dimension_1 STRING OPTIONS(description="First dimension of tissue fragment (number, up to one decimal place) measured in units as defined by the \"dimensions_unit\" CDE"),
  HTAN_Parent_ID STRING OPTIONS(description="HTAN ID of parent from which the biospecimen was obtained. Parent could be another biospecimen or a research participant."),
  Additional_Topography STRING OPTIONS(description="Topography not included in the ICD-O-3 Topography codes."),
  Processing_Days_from_Index STRING OPTIONS(description="Number of days from the research participant's index date that the biospecimen was processed. If not applicable please enter 'Not Applicable'"),
  Ischemic_Time STRING OPTIONS(description="Duration of time, in seconds, between when the specimen stopped receiving oxygen and when it was preserved or processed. Integer value."),
  Total_Volume STRING OPTIONS(description="Numeric value for the total amount of sample or specimen"),
  HTAN_Biospecimen_ID STRING OPTIONS(description="HTAN ID associated with a biosample based on HTAN ID SOP (eg HTANx_yyy_zzz)"),
  Storage_Method STRING OPTIONS(description="The method by which a biomaterial was stored after preservation or before another protocol was used."),
  Portion_Weight STRING OPTIONS(description="Numeric value that represents the sample portion weight, measured in milligrams."),
  Acquisition_Method_Type STRING OPTIONS(description="Records the method of acquisition or source for the specimen under consideration."),
  Source_HTAN_Biospecimen_ID STRING OPTIONS(description="This is the HTAN ID that may have been assigned to the biospecimen at the site of biospecimen origin (e.g. BU)."),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  Sectioning_Days_from_Index STRING OPTIONS(description="Number of days from the research participant's index date that the biospecimen was sectioned after collection. If not applicable please enter 'Not Applicable'"),
  Topography_Code STRING OPTIONS(description="Topography Code, indicating site within the body, based on ICD-O-3."),
  Ischemic_Temperature STRING OPTIONS(description="Specify whether specimen experienced warm or cold ischemia."),
  Tumor_Tissue_Type STRING OPTIONS(description="Text that describes the kind of disease present in the tumor specimen as related to a specific timepoint (add rows to select multiple values along with timepoints)"),
  Slide_Charge_Type STRING OPTIONS(description="A description of the charge on the glass slide."),
  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."),
  Preservation_Method STRING OPTIONS(description="Text term that represents the method used to preserve the sample."),
  Section_Number_in_Sequence STRING OPTIONS(description="Numeric value (integer, including ranges) provided to a sample in a series of sections (list all adjacent sections in the Adjacent Biospecimen IDs field)"),
  Id STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  Section_Thickness_Value STRING OPTIONS(description="Numeric value to describe the thickness of a slice to tissue taken from a biospecimen, measured in microns (um)."),
  Specimen_Laterality STRING OPTIONS(description="For tumors in paired organs, designates the side on which the specimen was obtained."),
  Biospecimen_Type STRING OPTIONS(description="Biospecimen Type"),
  Adjacent_Biospecimen_IDs STRING OPTIONS(description="List of HTAN Identifiers (separated by commas) of adjacent biospecimens cut from the same sample; for example HTA3_3000_3, HTA3_3000_4, ..."),
  Biospecimen_Dimension_3 STRING OPTIONS(description="Third dimension of tissue fragment (number, up to one decimal place) measured in units as defined by the \"dimensions_unit\" CDE"),
  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")
)
OPTIONS(
  friendly_name="HTAN SRRS BIOSPECIMEN DATA R5 VERSIONED",
  description="This table captures essential biospecimen data elements specific to SRRS (Standardized Repository of Reference Specimens) HTAN samples. 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", "biospecimen"), ("program", "htan"), ("source", "htan"), ("category", "clinical_biospecimen_data"), ("status", "current")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.srrs_biospecimen_r5` (Collection_Media, Fixation_Duration, Biospecimen_Dimension_2, Histologic_Morphology_Code, Acquisition_Method_Other_Specify, Preinvasive_Morphology, Timepoint_Label, Component, Site_of_Resection_or_Biopsy, Fixative_Type, Shipping_Condition_Type, Analyte_Type, Collection_Days_from_Index, Biospecimen_Dimension_1, HTAN_Parent_ID, Additional_Topography, Processing_Days_from_Index, Ischemic_Time, Total_Volume, HTAN_Biospecimen_ID, Storage_Method, Portion_Weight, Acquisition_Method_Type, Source_HTAN_Biospecimen_ID, entityId, Sectioning_Days_from_Index, Topography_Code, Ischemic_Temperature, Tumor_Tissue_Type, Slide_Charge_Type, Protocol_Link, Preservation_Method, Section_Number_in_Sequence, Id, Section_Thickness_Value, Specimen_Laterality, Biospecimen_Type, Adjacent_Biospecimen_IDs, Biospecimen_Dimension_3, HTAN_Center, Manifest_Id, Manifest_Version) VALUES (NULL, NULL, '0.5', 'Unknown', NULL, NULL, 'Baseline', 'SRRSBiospecimen', 'Middle lobe lung', NULL, 'Not Shipped', 'Tissue Block Analyte', '24688', '0.8', 'HTA15_30002', 'Hilar Airway', 'Not Applicable', '7020.0', '80.0', 'HTA15_30002_1600007', 'Frozen at -80C', NULL, 'Surgical Resection', 'SP0000092708', NULL, NULL, 'C34.9', 'Liquid Nitrogen', 'Not Otherwise Specified', NULL, 'Not Available', 'Snap Frozen', NULL, '75b2c048-ccfc-46d4-8bdc-9ca528791a92', NULL, 'Right', 'Tissue Biospecimen Type', NULL, '0.2', 'HTAN SRRS', 'syn51607146', 2), (NULL, NULL, '0.1', 'Unknown', NULL, NULL, 'Baseline', 'SRRSBiospecimen', 'Middle lobe lung', 'RNAlater', 'Not Shipped', 'Tissue Block Analyte', '24688', '0.1', 'HTA15_30002', 'Hilar Airway', '24692', '7020.0', '1.0', 'HTA15_30002_1300014', 'Frozen at -80C', NULL, 'Surgical Resection', 'SP0000092715', NULL, NULL, 'C34.9', 'Liquid Nitrogen', 'Not Otherwise Specified', NULL, 'Not Available', 'Frozen', NULL, 'c27fa1e2-92cf-41e0-ba38-21bef31981c5', NULL, 'Right', 'Tissue Biospecimen Type', NULL, '0.1', 'HTAN SRRS', 'syn51607146', 2), (NULL, NULL, '0.1', 'Unknown', NULL, NULL, 'Baseline', 'SRRSBiospecimen', 'Middle lobe lung', 'RNAlater', 'Not Shipped', 'Tissue Block Analyte', '24688', '0.1', 'HTA15_30002', 'Hilar Airway', '24692', '7020.0', '1.0', 'HTA15_30002_1300015', 'Frozen at -80C', NULL, 'Surgical Resection', 'SP0000092716', NULL, NULL, 'C34.9', 'Liquid Nitrogen', 'Not Otherwise Specified', NULL, 'Not Available', 'Frozen', NULL, '13e4aa8d-4d1d-4a96-97bc-9dcb59871a5b', NULL, 'Right', 'Tissue Biospecimen Type', NULL, '0.1', 'HTAN SRRS', 'syn51607146', 2), (NULL, NULL, '0.1', 'Unknown', NULL, NULL, 'Baseline', 'SRRSBiospecimen', 'Middle lobe lung', NULL, 'Not Shipped', 'Tissue Block Analyte', '24688', '0.1', 'HTA15_30002', 'Hilar Airway', 'Not Applicable', '7020.0', '1.0', 'HTA15_30002_1200016', 'Frozen at -80C', NULL, 'Surgical Resection', 'SP0000092717', NULL, NULL, 'C34.9', 'Liquid Nitrogen', 'Not Otherwise Specified', NULL, 'Not Available', 'Snap Frozen', NULL, 'ae74db04-51d6-4e84-93c4-4f6011ac4769', NULL, 'Right', 'Tissue Biospecimen Type', NULL, '0.1', 'HTAN SRRS', 'syn51607146', 2), (NULL, NULL, '0.1', 'Unknown', NULL, NULL, 'Baseline', 'SRRSBiospecimen', 'Middle lobe lung', NULL, 'Not Shipped', 'Tissue Block Analyte', '24688', '0.1', 'HTA15_30002', 'Hilar Airway', 'Not Applicable', '7020.0', '1.0', 'HTA15_30002_1200017', 'Frozen at -80C', NULL, 'Surgical Resection', 'SP0000092718', NULL, NULL, 'C34.9', 'Liquid Nitrogen', 'Not Otherwise Specified', NULL, 'Not Available', 'Snap Frozen', NULL, '9a94ba97-16f8-4552-9d0c-c02d58a48393', NULL, 'Right', 'Tissue Biospecimen Type', NULL, '0.1', 'HTAN SRRS', 'syn51607146', 2);