-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.clinical_tier1_moleculartest_r5`
(
  Blood_Test_Normal_Range_Upper STRING OPTIONS(description="Numeric value used to describe the upper limit of the normal range used to describe a healthy individual at the institution where the test was completed."),
  Transcript STRING OPTIONS(description="Alphanumeric value used to describe the transcript of a specific genetic variant. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Blood_Test_Normal_Range_Lower STRING OPTIONS(description="Numeric value used to describe the lower limit of the normal range used to describe a healthy individual at the institution where the test was completed."),
  Histone_Variant STRING OPTIONS(description="The text term used to describe a specific histone variants, which are proteins that substitute for the core canonical histones."),
  Ploidy STRING OPTIONS(description="Text term used to describe the number of sets of homologous chromosomes."),
  Mismatch_Repair_Mutation STRING OPTIONS(description="The yes/no/unknown indicator used to describe whether the mutation included in molecular testing was known to have an affect on the mismatch repair process. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  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."),
  Stop_Days_from_Index STRING OPTIONS(description="Number of days from the date of birth (index date) to the end date of the event (e.g. exposure to environmental factor, treatment start, etc.). Note: if the event occurs at a single time point, e.g. a diagnosis or a lab test, the values for this column is 'Not Applicable'"),
  Locus STRING OPTIONS(description="Alphanumeric value used to describe the locus of a specific genetic variant. Example: NM_001126114."),
  Antigen STRING OPTIONS(description="The text term used to describe an antigen included in molecular testing. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Variant_Origin STRING OPTIONS(description="The text term used to describe the biological origin of a specific genetic variant. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Laboratory_Test STRING OPTIONS(description="The text term used to describe the medical testing used to diagnose, treat or further understand a patient's disease."),
  Intron STRING OPTIONS(description="Intron number targeted or included in molecular analysis. If a specific genetic variant is being reported, this property can be used to capture the intron where that variant is located."),
  Exon STRING OPTIONS(description="Exon number targeted or included in a molecular analysis. If a specific genetic variant is being reported, this property can be used to capture the exon where that variant is located. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  AA_Change STRING OPTIONS(description="Alphanumeric value used to describe the amino acid change for a specific genetic variant. Example: R116Q. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Clinical_Biospecimen_Type STRING OPTIONS(description="The text term used to describe the biological material used for testing, diagnostic, treatment or research purposes. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Zygosity STRING OPTIONS(description="The text term used to describe the zygosity of a specific genetic variant."),
  Variant_Type STRING OPTIONS(description="The text term used to describe the type of genetic variation."),
  Cell_Count STRING OPTIONS(description="Numeric value used to describe the number of cells used for molecular testing. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Pathogenicity STRING OPTIONS(description="The text used to describe a variant's level of involvement in the cause of the patient's disease according to the standards outlined by the American College of Medical Genetics and Genomics (ACMG)."),
  Copy_Number STRING OPTIONS(description="Numeric value used to describe the number of times a section of the genome is repeated or copied within an insertion, duplication or deletion variant. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Clonality STRING OPTIONS(description="The text term used to describe whether a genomic variant is related by descent from a single progenitor cell. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Test_Units STRING OPTIONS(description="The text term used to describe the units of the test value for a molecular test. This property is used in conjunction with test_value. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Loci_Count STRING OPTIONS(description="Numeric value used to describe the number of loci tested."),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  Chromosome STRING OPTIONS(description="The text term used to describe a chromosome targeted or included in molecular testing. If a specific genetic variant is being reported, this property can be used to capture the chromosome where that variant is located. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Molecular_Analysis_Method STRING OPTIONS(description="The text term used to describe the method used for molecular analysis. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Test_Analyte_Type STRING OPTIONS(description="The text term used to describe the type of analyte used for molecular testing. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  HTAN_Participant_ID STRING OPTIONS(description="HTAN ID associated with a patient based on HTAN ID SOP (eg HTANx_yyy )"),
  Molecular_Consequence STRING OPTIONS(description="The text term used to describe the molecular consequence of genetic variation. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Gene_Symbol STRING OPTIONS(description="The text term used to describe a gene targeted or included in molecular analysis. For rearrangements, this is should be used to represent the reference gene. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Loci_Abnormal_Count STRING OPTIONS(description="Numeric value used to describe the number of loci determined to be abnormal."),
  Specialized_Molecular_Test STRING OPTIONS(description="Text term used to describe a specific test that is not covered in the list of molecular analysis methods. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Start_Days_from_Index STRING OPTIONS(description="Number of days from the date of birth (index date) to the date of an event (e.g. exposure to environmental factor, treatment start, etc.). If not applicable please enter 'Not Applicable'"),
  Histone_Family STRING OPTIONS(description="The text term used to describe the family, or classification of a group of basic proteins found in chromatin, called histones."),
  Cytoband STRING OPTIONS(description="Alphanumeric value used to describe the cytoband or chromosomal location targeted or included in molecular analysis. If a specific genetic variant is being reported, this property can be used to capture the cytoband where the variant is located. Format: [chromosome][chromosome arm].[band+sub-bands]. Example: 17p13.1. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Id STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  Second_Exon STRING OPTIONS(description="The second exon number involved in molecular variation. If a specific genetic variant is being reported, this property can be used to capture the second exon where that variant is located. This property is typically used for a translocation where two different locations are involved in the variation."),
  Second_Gene_Symbol STRING OPTIONS(description="The text term used to describe a secondary gene targeted or included in molecular analysis. For rearrangements, this is should represent the location of the variant. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Test_Result STRING OPTIONS(description="The text term used to describe the result of the molecular test. If the test result was a numeric value see test_value. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here."),
  Test_Value STRING OPTIONS(description="The text term or numeric value used to describe a specific result of a molecular test. Note: This node is meant to capture molecular tests that were completed clinically for the participant and only includes data from diagnostic array that was completed prior to research sequencing was done. Do not include data related to research assay outputs here"),
  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 CLINICAL TIER 1 DATA - MOLECULAR TEST R5 VERSIONED",
  description="This table contains clinical molecular test information about HTAN patient cases. 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/clinical",
  labels=[("access", "open"), ("data_type", "clinical_data"), ("program", "htan"), ("source", "htan"), ("category", "clinical_biospecimen_data"), ("status", "current")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.clinical_tier1_moleculartest_r5` (Blood_Test_Normal_Range_Upper, Transcript, Blood_Test_Normal_Range_Lower, Histone_Variant, Ploidy, Mismatch_Repair_Mutation, Timepoint_Label, Component, Stop_Days_from_Index, Locus, Antigen, Variant_Origin, Laboratory_Test, Intron, Exon, AA_Change, Clinical_Biospecimen_Type, Zygosity, Variant_Type, Cell_Count, Pathogenicity, Copy_Number, Clonality, Test_Units, Loci_Count, entityId, Chromosome, Molecular_Analysis_Method, Test_Analyte_Type, HTAN_Participant_ID, Molecular_Consequence, Gene_Symbol, Loci_Abnormal_Count, Specialized_Molecular_Test, Start_Days_from_Index, Histone_Family, Cytoband, Id, Second_Exon, Second_Gene_Symbol, Test_Result, Test_Value, HTAN_Center, Manifest_Id, Manifest_Version) VALUES (NULL, NULL, NULL, NULL, NULL, NULL, 'Biopsy 2', 'MolecularTest', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '%', NULL, NULL, NULL, 'IHC', 'Protein Analyte', 'HTA9_9', NULL, 'PDL1', NULL, NULL, '19772', NULL, NULL, 'd0a30d62-cd4d-49b5-ac82-ca922e92be64', NULL, NULL, 'Negative', '<1', 'HTAN OHSU', 'syn39141939', 5), (NULL, NULL, NULL, NULL, NULL, NULL, 'Biopsy 1', 'MolecularTest', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '%', NULL, NULL, NULL, 'IHC', 'Protein Analyte', 'HTA9_9', NULL, 'PDL1', NULL, NULL, '19744', NULL, NULL, '45da4e62-fecc-4587-b9ab-3fcd34f1119c', NULL, NULL, 'Positive', '>1', 'HTAN OHSU', 'syn39141939', 5), (NULL, NULL, NULL, NULL, NULL, NULL, 'Baseline', 'MolecularTest', NULL, NULL, NULL, 'unknown', NULL, NULL, NULL, NULL, 'Tissue NOS', 'unknown', NULL, NULL, NULL, '999.0', NULL, 'Not reported', NULL, NULL, 'unknown', 'FISH', 'Not Reported', 'HTA3_11025', NULL, 'ALK', NULL, NULL, '29784', NULL, NULL, '645e0c4f-72ed-44a4-be08-4ce4cdb5d762', NULL, 'ROS1', 'negative', NULL, 'HTAN BU', 'syn54993956', 2), (NULL, NULL, NULL, NULL, NULL, NULL, 'Baseline', 'MolecularTest', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Tissue NOS', NULL, NULL, NULL, NULL, NULL, NULL, 'Not reported', NULL, NULL, NULL, 'Not Reported', 'Not Reported', 'HTA3_11031', NULL, 'unknown', NULL, NULL, '19229', NULL, NULL, 'a7d471e3-714c-45e5-8a5f-6345b1aeda28', NULL, NULL, 'Abnormal NOS', NULL, 'HTAN BU', 'syn54993956', 2), (NULL, NULL, NULL, NULL, NULL, NULL, 'Baseline', 'MolecularTest', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Tissue NOS', NULL, NULL, NULL, NULL, NULL, NULL, 'Not reported', NULL, NULL, NULL, 'other', 'Not Reported', 'HTA3_11025', NULL, 'unknown', NULL, 'Multiplex Mutation Analysis', '29784', NULL, NULL, '69d8b546-1a51-4e4f-80e6-48f57d15f8a0', NULL, NULL, 'Test Value Reported', 'KRAS p.G12A c.35G>C', 'HTAN BU', 'syn54993956', 2);