-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.rppa_level4_metadata_r5`
(
  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"),
  Filename STRING OPTIONS(description="Name of a file"),
  HTAN_Parent_Data_File_ID STRING OPTIONS(description="HTAN Data File Identifier indicating the file(s) from which these files were derived"),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  Id STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  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)"),
  Assay_Type STRING OPTIONS(description="The type and level of assay this metadata applies to (e.g. RPPA, NanoString DSP, etc.)"),
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  Batch_Correction_Method STRING OPTIONS(description="Method that was used to batch correct Level 3 data"),
  File_Format STRING OPTIONS(description="Format of a file (e.g. txt, csv, fastq, bam, etc.)"),
  HTAN_Participant_ID STRING OPTIONS(description="HTAN ID associated with a patient based on HTAN ID SOP (eg HTANx_yyy )"),
  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 RPPA METADATA LEVEL 4 R5 VERSIONED",
  description="This table contains the file metadata for fourth level Reverse Phase Protein Array (RPPA) assays. Level 4 RPPA datasets have files that contain inter-batch corrected intensities. 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.rppa_level4_metadata_r5` (HTAN_Parent_Biospecimen_ID, Filename, HTAN_Parent_Data_File_ID, entityId, Id, HTAN_Data_File_ID, Assay_Type, Component, Batch_Correction_Method, File_Format, HTAN_Participant_ID, HTAN_Center, Manifest_Id, Manifest_Version, File_Size, md5, Data_Release, CDS_Release) VALUES ('HTA9_1_23', 'rppa_level_4/HTA9_1_23_Level4.txt', 'HTA9_1_1160', 'syn23639605', '3ea8f440-d21d-4afd-bf40-3329857047f5', 'HTA9_1_1163', 'RPPA', 'RPPALevel4', 'Replicates Based Normalized (RBN) RPPA data were z-scored by scaling and mean centering relative to a background cohort of HR+ and TNBC samples and TCGA-BRCA;  doi:10.1038/ncomms4887; doi:10.1016/j.cell.2018.03.022', 'txt', 'HTA9_1', 'HTAN OHSU', 'syn53243031', 4, 9205, '0c7575f3045ce30b30716034d3cac3d0', 'Release 5.0', NULL), ('HTA9_1_36', 'rppa_level_4/HTA9_1_36_Level4.txt', 'HTA9_1_1161', 'syn23639607', '0e553255-00f6-4b27-9355-39f8b6b46c30', 'HTA9_1_1162', 'RPPA', 'RPPALevel4', 'Replicates Based Normalized (RBN) RPPA data were z-scored by scaling and mean centering relative to a background cohort of HR+ and TNBC samples and TCGA-BRCA;  doi:10.1038/ncomms4887; doi:10.1016/j.cell.2018.03.022', 'txt', 'HTA9_1', 'HTAN OHSU', 'syn53243031', 4, 9148, 'd2090a32b297f783d19b483e1753b3e0', 'Release 5.0', NULL), ('HTA9_1_120', 'rppa_level_4/RPPA_BRCA_04182023_322079_L4.txt', 'HTA9_1_40584', 'syn53241777', '5bc38e78-e2d0-4535-9c7c-b7c378099445', 'HTA9_1_40587', 'RPPA', 'RPPALevel4', 'Replicates Based Normalized (RBN) RPPA data were z-scored by scaling and mean centering relative to a background cohort of HR+ and TNBC samples and TCGA-BRCA;  doi:10.1038/ncomms4887; doi:10.1016/j.cell.2018.03.022', 'txt', 'HTA9_1', 'HTAN OHSU', 'syn53243031', 4, 13549, '0456a6f8c49b9fe140cd99706831a954', 'Release 5.0', NULL), ('HTA9_1_161', 'rppa_level_4/RPPA_BRCA_04182023_382866_L4.txt', 'HTA9_1_40585', 'syn53241784', 'd25f2dd2-ec86-4e36-b3c9-e2c18963bd0c', 'HTA9_1_40586', 'RPPA', 'RPPALevel4', 'Replicates Based Normalized (RBN) RPPA data were z-scored by scaling and mean centering relative to a background cohort of HR+ and TNBC samples and TCGA-BRCA;  doi:10.1038/ncomms4887; doi:10.1016/j.cell.2018.03.022', 'txt', 'HTA9_1', 'HTAN OHSU', 'syn53243031', 4, 13815, '208dd82673c5bd9683df8321c22cb5aa', 'Release 5.0', NULL), ('HTA9_2_76', 'rppa_level_4/HTA9_2_76_RPPA_Level4.txt', 'HTA9_2_11961', 'syn53241729', '78d40842-8626-42f2-91cc-8d58300c91fe', 'HTA9_2_11962', 'RPPA', 'RPPALevel4', 'Replicates Based Normalized (RBN) RPPA data were z-scored by scaling and mean centering relative to a background cohort of HR+ and TNBC samples and TCGA-BRCA;  doi:10.1038/ncomms4887; doi:10.1016/j.cell.2018.03.022', 'txt', 'HTA9_2', 'HTAN OHSU', 'syn53243031', 4, 8622, 'ba95809f982339a7b359717e7c098594', 'Release 5.0', NULL);