-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.scATACseq_level3_metadata_r2`
(
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  Filename STRING OPTIONS(description="Name of a file "),
  File_Format STRING OPTIONS(description="Format of a file (e.g. txt, csv, fastq, bam, etc.)"),
  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"),
  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.)"),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  HTAN_Center STRING OPTIONS(description="Name of HTAN Center e.g. HTAN HTAPP"),
  Data_Release STRING OPTIONS(description="Inclusion in HTAN Data Release e.g. Release 1.0"),
  File_Size INT64 OPTIONS(description="Size of file (bucket object) in bytes"),
  Base_Filename STRING OPTIONS(description="Base name of file"),
  md5 STRING OPTIONS(description="md5 hash of file")
)
OPTIONS(
  friendly_name="HTAN SCATACSEQ LEVEL 3 METADATA R2 VERSIONED",
  description="Data was extracted from HTAN Synapse projects in April 2022. More details: see https://data.humantumoratlas.org/standard/scatacseq",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("program", "htan"), ("source", "htan"), ("status", "current"), ("category", "metadata")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.scATACseq_level3_metadata_r2` (Component, Filename, File_Format, HTAN_Parent_Biospecimen_ID, HTAN_Data_File_ID, Assay_Type, entityId, HTAN_Center, Data_Release, File_Size, Base_Filename, md5) VALUES ('OtherAssay', 'scatacseq_level_2/A001-C-014-D_20200715_possorted_bam.bam', 'bam', 'HTA10_01_014', 'HTA10_01_90243443196521389339723491376359', 'scatacseq', 'syn26530850', 'HTAN Stanford', 'Release 2.0', 15965134099, 'A001-C-014-D_20200715_possorted_bam.bam', '9ac43e4d196fcb38933972d491d763f9'), ('OtherAssay', 'scatacseq_level_2/A001-C-108-D_20200811_possorted_bam.bam', 'bam', 'HTA10_01_108', 'HTA10_01_39764031532103604433024454006407', 'scatacseq', 'syn26531211', 'HTAN Stanford', 'Release 2.0', 24586637679, 'A001-C-108-D_20200811_possorted_bam.bam', '3976403bfdcbad6a44dda2ee5e0a6407'), ('OtherAssay', 'scatacseq_level_2/A001-C-123-D_20200214_possorted_bam.bam', 'bam', 'HTA10_01_123', 'HTA10_01_50804062430232390005309493285051', 'scatacseq', 'syn26530901', 'HTAN Stanford', 'Release 2.0', 17981082340, 'A001-C-123-D_20200214_possorted_bam.bam', 'fa8a4a6c4d02dcd90a0530949328fa5b'), ('OtherAssay', 'scatacseq_level_2/A002-C-010_S2_20200310_possorted_bam.bam', 'bam', 'HTA10_02_010', 'HTA10_02_08632528445263190500914034437621', 'scatacseq', 'syn26530862', 'HTAN Stanford', 'Release 2.0', 16446321157, 'A002-C-010_S2_20200310_possorted_bam.bam', '08632fc8eefc6319a50a9bead4e376c1'), ('OtherAssay', 'scatacseq_level_2/A002-C-024-D_20200715_possorted_bam.bam', 'bam', 'HTA10_02_024', 'HTA10_02_70197441898758264146140376150026', 'scatacseq', 'syn26530910', 'HTAN Stanford', 'Release 2.0', 18403181886, 'A002-C-024-D_20200715_possorted_bam.bam', '701974e1898758c6e1461e0d76b50a26');