-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.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."),
  Fiducial_Marker STRING OPTIONS(description="Imaging specific: fiducial markers for the alignment of images taken across multiple rounds of imaging."),
  Method_of_Nucleic_Acid_Isolation STRING OPTIONS(description="Bulk RNA & DNA-seq specific: method used for nucleic acid isolation. E.g. Qiagen Allprep, Qiagen miRNAeasy. [Text - max length 100]"),
  Number_Proliferating_Cells STRING OPTIONS(description="Numeric value that represents the count of proliferating cells determined during pathologic review of the sample slide(s)."),
  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"),
  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'"),
  Histology_Assessment_By STRING OPTIONS(description="Text term describing who (in what role) made the histological assessments of the sample"),
  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"),
  Histology_Assessment_Medium STRING OPTIONS(description="The method of assessment used to characterize histology"),
  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."),
  Lysis_Buffer STRING OPTIONS(description="scRNA-seq specific: Type of lysis buffer used"),
  Percent_Monocyte_Infiltration STRING OPTIONS(description="Numeric value to represent the percentage of monocyte infiltration in a sample or specimen."),
  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'"),
  Percent_Lymphocyte_Infiltration STRING OPTIONS(description="Numeric value to represent the percentage of infiltration by lymphocytes in a solid tissue normal sample or specimen."),
  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."),
  Percent_Normal_Cells STRING OPTIONS(description="Numeric value to represent the percentage of normal cell content in a malignant tumor 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."),
  Total_Volume STRING OPTIONS(description="Numeric value for the total amount of sample or specimen"),
  Degree_of_Dysplasia STRING OPTIONS(description="Information related to the presence of cells that look abnormal under a microscope but are not cancer. Records the degree of dysplasia for the cyst or lesion under consideration."),
  Tumor_Infiltrating_Lymphocytes STRING OPTIONS(description="Measure of Tumor-Infiltrating Lymphocytes [Number]"),
  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)."),
  Dysplasia_Fraction STRING OPTIONS(description="Resulting value to represent the number of pieces of dysplasia divided by the total number of pieces. [Text: max length 5]"),
  Percent_Granulocyte_Infiltration STRING OPTIONS(description="Numeric value to represent the percentage of infiltration by granulocytes in a tumor sample or specimen."),
  Percent_Stromal_Cells STRING OPTIONS(description="Numeric value to represent the percentage of reactive cells that are present in a malignant tumor sample or specimen but are not malignant such as fibroblasts, vascular structures, etc."),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  Slicing_Method STRING OPTIONS(description="Imaging specific: the method by which the tissue was sliced."),
  Percent_Tumor_Cells STRING OPTIONS(description="Numeric value that represents the percentage of infiltration by tumor cells in a sample."),
  Percent_Eosinophil_Infiltration STRING OPTIONS(description="Numeric value to represent the percentage of infiltration by eosinophils in a tumor sample or specimen."),
  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)"),
  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'"),
  Slide_Charge_Type STRING OPTIONS(description="A description of the charge on the glass slide."),
  Site_Data_Source STRING OPTIONS(description="Text to identify the data source for the specimen/sample from within the HTAN center, if applicable. Any identifier used within the center to identify data sources. No PHI/PII is allowed."),
  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."),
  Processing_Location STRING OPTIONS(description="Site with an HTAN center where specimen processing occurs, if applicable. Any identifier used within the center to identify processing location. No PHI/PII is allowed."),
  Percent_Neutrophil_Infiltration STRING OPTIONS(description="Numeric value to represent the percentage of infiltration by neutrophils in a tumor sample or specimen."),
  Preservation_Method STRING OPTIONS(description="Text term that represents the method used to preserve the sample."),
  Percent_Tumor_Nuclei STRING OPTIONS(description="Numeric value to represent the percentage of tumor nuclei in a malignant neoplasm sample or specimen."),
  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)."),
  Percent_Inflam_Infiltration STRING OPTIONS(description="Numeric value to represent local response to cellular injury, marked by capillary dilatation, edema and leukocyte infiltration; clinically, inflammation is manifest by redness, heat, pain, swelling and loss of function, with the need to heal damaged tissue."),
  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, ..."),
  Mounting_Medium STRING OPTIONS(description="The solution in which the specimen is embedded, generally under a cover glass. It may be liquid, gum or resinous, soluble in water, alcohol or other solvents and be sealed from the external atmosphere by non-soluble ringing media"),
  Percent_Necrosis STRING OPTIONS(description="Numeric value to represent the percentage of cell death in a malignant tumor sample or specimen."),
  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 BIOSPECIMEN DATA R5 VERSIONED",
  description="This table captures essential biospecimen data elements from 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/standard/biospecimen",
  labels=[("access", "open"), ("data_type", "biospecimen"), ("program", "htan"), ("source", "htan"), ("category", "clinical_biospecimen_data"), ("status", "current")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.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, Fiducial_Marker, Method_of_Nucleic_Acid_Isolation, Number_Proliferating_Cells, Biospecimen_Dimension_3, Analyte_Type, Collection_Days_from_Index, Histology_Assessment_By, Biospecimen_Dimension_1, Histology_Assessment_Medium, HTAN_Parent_ID, Lysis_Buffer, Percent_Monocyte_Infiltration, Processing_Days_from_Index, Percent_Lymphocyte_Infiltration, Ischemic_Time, Percent_Normal_Cells, HTAN_Biospecimen_ID, Storage_Method, Portion_Weight, Total_Volume, Degree_of_Dysplasia, Tumor_Infiltrating_Lymphocytes, Acquisition_Method_Type, Source_HTAN_Biospecimen_ID, Dysplasia_Fraction, Percent_Granulocyte_Infiltration, Percent_Stromal_Cells, entityId, Slicing_Method, Percent_Tumor_Cells, Percent_Eosinophil_Infiltration, Ischemic_Temperature, Tumor_Tissue_Type, Sectioning_Days_from_Index, Slide_Charge_Type, Site_Data_Source, Protocol_Link, Processing_Location, Percent_Neutrophil_Infiltration, Preservation_Method, Percent_Tumor_Nuclei, Section_Number_in_Sequence, Id, Section_Thickness_Value, Percent_Inflam_Infiltration, Specimen_Laterality, Biospecimen_Type, Adjacent_Biospecimen_IDs, Mounting_Medium, Percent_Necrosis, HTAN_Center, Manifest_Id, Manifest_Version) VALUES (NULL, NULL, NULL, 'Melanoma in situ', NULL, NULL, 'Baseline', 'Biospecimen', 'Skin of upper limb and shoulder', 'Formalin', NULL, NULL, NULL, NULL, NULL, NULL, '22559', NULL, NULL, NULL, 'HTA7_1_16', NULL, NULL, '25560', NULL, NULL, NULL, 'HTA7_1_21', 'Frozen at -80C', NULL, NULL, NULL, NULL, 'Excision', NULL, NULL, NULL, NULL, 'syn26561946', NULL, NULL, NULL, NULL, 'Not Otherwise Specified', NULL, NULL, NULL, 'dx.doi.org/10.17504/protocols.io.67uhhnw', NULL, NULL, 'Formalin fixed paraffin embedded - FFPE', NULL, NULL, 'a26133e5-c8d9-4e2c-b523-585947375f4c', NULL, NULL, 'Not Reported', 'Tissue Biospecimen Type', NULL, NULL, NULL, 'HTAN HMS', 'syn35488819', 8), (NULL, NULL, NULL, 'Melanoma in situ', NULL, NULL, 'Baseline', 'Biospecimen', 'Skin of upper limb and shoulder', 'Formalin', NULL, NULL, NULL, NULL, NULL, NULL, '22559', NULL, NULL, NULL, 'HTA7_1_16', NULL, NULL, '25560', NULL, NULL, NULL, 'HTA7_1_22', 'Frozen at -80C', NULL, NULL, NULL, NULL, 'Excision', NULL, NULL, NULL, NULL, 'syn26561947', NULL, NULL, NULL, NULL, 'Not Otherwise Specified', NULL, NULL, NULL, 'dx.doi.org/10.17504/protocols.io.67uhhnw', NULL, NULL, 'Formalin fixed paraffin embedded - FFPE', NULL, NULL, 'e9267bf1-02cb-438e-a4f6-7d14cadb3e7a', NULL, NULL, 'Not Reported', 'Tissue Biospecimen Type', NULL, NULL, NULL, 'HTAN HMS', 'syn35488819', 8), (NULL, NULL, NULL, 'Melanoma in situ', NULL, NULL, 'Baseline', 'Biospecimen', 'Skin of upper limb and shoulder', 'Formalin', NULL, NULL, NULL, NULL, NULL, NULL, '22559', NULL, NULL, NULL, 'HTA7_1_16', NULL, NULL, '25560', NULL, NULL, NULL, 'HTA7_1_23', 'Frozen at -80C', NULL, NULL, NULL, NULL, 'Excision', NULL, NULL, NULL, NULL, 'syn26561948', NULL, NULL, NULL, NULL, 'Not Otherwise Specified', NULL, NULL, NULL, 'dx.doi.org/10.17504/protocols.io.67uhhnw', NULL, NULL, 'Formalin fixed paraffin embedded - FFPE', NULL, NULL, '05d8f905-f35f-47c2-b7fa-46480c1ca411', NULL, NULL, 'Not Reported', 'Tissue Biospecimen Type', NULL, NULL, NULL, 'HTAN HMS', 'syn35488819', 8), (NULL, NULL, NULL, 'Melanoma in situ', NULL, NULL, 'Baseline', 'Biospecimen', 'Skin of upper limb and shoulder', 'Formalin', NULL, NULL, NULL, NULL, NULL, NULL, '22559', NULL, NULL, NULL, 'HTA7_1_16', NULL, NULL, '25560', NULL, NULL, NULL, 'HTA7_1_24', 'Frozen at -80C', NULL, NULL, NULL, NULL, 'Excision', NULL, NULL, NULL, NULL, 'syn26561949', NULL, NULL, NULL, NULL, 'Not Otherwise Specified', NULL, NULL, NULL, 'dx.doi.org/10.17504/protocols.io.67uhhnw', NULL, NULL, 'Formalin fixed paraffin embedded - FFPE', NULL, NULL, 'deb82e68-4ccc-4e26-b51e-62dd75cf0824', NULL, NULL, 'Not Reported', 'Tissue Biospecimen Type', NULL, NULL, NULL, 'HTAN HMS', 'syn35488819', 8), (NULL, NULL, NULL, 'Melanoma in situ', NULL, NULL, 'Baseline', 'Biospecimen', 'Skin of upper limb and shoulder', 'Formalin', NULL, NULL, NULL, NULL, NULL, NULL, '22559', NULL, NULL, NULL, 'HTA7_1_16', NULL, NULL, '25560', NULL, NULL, NULL, 'HTA7_1_25', 'Frozen at -80C', NULL, NULL, NULL, NULL, 'Excision', NULL, NULL, NULL, NULL, 'syn26561950', NULL, NULL, NULL, NULL, 'Not Otherwise Specified', NULL, NULL, NULL, 'dx.doi.org/10.17504/protocols.io.67uhhnw', NULL, NULL, 'Formalin fixed paraffin embedded - FFPE', NULL, NULL, 'd5ab30cc-73ec-4b59-b6cd-ccbe2a8afe73', NULL, NULL, 'Not Reported', 'Tissue Biospecimen Type', NULL, NULL, NULL, 'HTAN HMS', 'syn35488819', 8);