-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.scRNAseq_MSK_SCLC_epithelial_cells_r3`
(
  iObs INT64 OPTIONS(description="Index to cell barcodes"),
  iVar INT64 OPTIONS(description="Index to gene IDs"),
  X_value FLOAT64 OPTIONS(description="Expression value for a given gene and cell"),
  n_genes_by_counts FLOAT64 OPTIONS(description="Number of genes detected in a given cell"),
  log1p_n_genes_by_counts FLOAT64 OPTIONS(description="Log (N+1) on the number of genes per cell"),
  total_counts FLOAT64 OPTIONS(description="Total number of gene expression counts (or UMIs mapped) for a given cell"),
  log1p_total_counts FLOAT64 OPTIONS(description="Log (N+1) on the number of gene expression counts (UMIs mapped) for a given cell"),
  mito_frac FLOAT64 OPTIONS(description="Percent of UMIs mapping to mitochondrial genes"),
  RBP_frac FLOAT64 OPTIONS(description="Percent of UMIs mapping to RNA-binding proteins (RBPs)"),
  batch STRING OPTIONS(description="Sample ID"),
  donor_id STRING OPTIONS(description="Identifies a unique individual that data were derived from"),
  treatment STRING OPTIONS(description="The type of treatment recieved by the patient"),
  procedure STRING OPTIONS(description="The method used in sampling the tumor, Biopsy, Resection, or Thoracentesis"),
  SCLC_subtype STRING OPTIONS(description="SCLC subtype"),
  SCLC_subtype_plus_TP53_RB1_wt STRING OPTIONS(description="SCLC subtype plus a label for the TP53/RB1 wild-type SCLC"),
  pval_SCLC_A FLOAT64 OPTIONS(description="p-value for calling sample SCLC_A"),
  pval_SCLC_N FLOAT64 OPTIONS(description="p-value for calling sample SCLC_N"),
  pval_SCLC_P FLOAT64 OPTIONS(description="p-value for calling sample SCLC_P"),
  NEUROD_genes FLOAT64 OPTIONS(description="Average expression of all NEUROD genes"),
  MHCI_PRESENTATION FLOAT64 OPTIONS(description="Gene signature score for MHCI presentation"),
  MHCII_PRESENTATION FLOAT64 OPTIONS(description="Gene signature score for MHCII presentation"),
  SCLC_major_subtype_of_sample STRING OPTIONS(description="Major SCLC subtype of the sample"),
  clusters INT64 OPTIONS(description="The coarse grained cluster labels placed on each cell, relates to cell type and state."),
  treatment_categorized STRING OPTIONS(description="Treatment category, includes TMZ,camptothecin,Chemo_1L,TMZ,Chemo_1L,IO_2L,Naive,ChemoIO_1L"),
  recurrent_cluster BOOL OPTIONS(description="Whether it belongs to the PLCG2-high recurrent cluster"),
  histo STRING OPTIONS(description="Type of cancer, only SCLC"),
  clusters_fine STRING OPTIONS(description="The fine grained cluster labels placed on each cell, relates to cell subtypes."),
  disease_ontology_term_id STRING OPTIONS(description="MONDO disease ontology ID (REF: https://www.ebi.ac.uk/ols/ontologies/mondo) (ex. MONDO:0100426 or PATO:0000461 for 'normal')"),
  tissue_ontology_term_id STRING OPTIONS(description="Uber-anatomy ontology ID (REF: https://www.ebi.ac.uk/ols/ontologies/uberon) (ex.UBERON:2001190)"),
  cell_type_ontology_term_id STRING OPTIONS(description="Cell Ontology ID (i.e. CL:0000784)  (REF: https://www.ebi.ac.uk/ols/ontologies/cl)"),
  organism_ontology_term_id STRING OPTIONS(description="NCBITaxon ID (REF: https://www.ncbi.nlm.nih.gov/taxonomy) (ex. NCBITaxon:9606 for human, NCBITaxon:10090 for mouse)"),
  is_primary_data BOOL OPTIONS(description="Indicates if the sample is primary or not (True/False)"),
  assay_ontology_term_id STRING OPTIONS(description="Experimental Factor Ontology ID (REF: https://www.ebi.ac.uk/ols/ontologies/efo)"),
  sex_ontology_term_id STRING OPTIONS(description="Phenotype And Trait Ontology ID, PATO:0000384 for male, PATO:0000383 for female, or unknown if unavailable"),
  self_reported_ethnicity_ontology_term_id STRING OPTIONS(description="If human, the Human Ancestry Ontology ID (i.e. HANCESTRO:0005) (REF: https://www.ebi.ac.uk/ols/ontologies/hancestro); \"multiethnic\" if more than one ethnicity. \"Unknown\" if human and no information, else \"na\" if non-human"),
  development_stage_ontology_term_id STRING OPTIONS(description="Human Developmental Stages ID (REF: https://www.ebi.ac.uk/ols/ontologies/hsapdv) or Mouse Developmental Stages ID (REF: https://www.ebi.ac.uk/ols/ontologies/mmusdv) (HsapDv if human, MmusDv if mouse, unknown if information unavailable)"),
  suspension_type STRING OPTIONS(description="Cell, nucleus, or na, as corresponding to sample preparation"),
  HTAN_Biospecimen_ID STRING OPTIONS(description="HTAN ID associated with a biosample based on HTAN ID SOP (eg HTANx_yyy_zzz)"),
  HTAN_Participant_ID STRING OPTIONS(description="HTAN ID associated with a patient based on HTAN ID SOP (eg HTANx_yyy )"),
  cell_type STRING OPTIONS(description="The type of cell (i.e. T-cell)"),
  assay STRING OPTIONS(description="An assay based on 10X Genomics. Example : 100x3’ v2"),
  disease STRING OPTIONS(description="Description of disease (example: lung adenocarcinoma) or normal cells"),
  organism STRING OPTIONS(description="The genus and species from which biosamples are derived"),
  sex STRING OPTIONS(description="Phenotypic sex"),
  tissue STRING OPTIONS(description="Derived from UBERON or CL terms that best describes the tissue that the cell was derived from."),
  self_reported_ethnicity STRING OPTIONS(description="Ethnicity of the individual (obtained from HANCESTRO terms for Homo sapiens)"),
  development_stage STRING OPTIONS(description="Human development stage derived from HsapDv term  (Example if data is Homo sapiens, development stage is obtained from Link. HsapDv:0000114 - 20-year-old human stage)"),
  feature_is_filtered BOOL OPTIONS(description="Indicates if the feature (gene) was/should be filtered in analysis"),
  feature_name STRING OPTIONS(description="Gene name from HUGO Human Gene Nomenclature Committee (https://www.genenames.org/)"),
  feature_reference STRING OPTIONS(description="A reference to the feature: NCBI Taxonomy ID"),
  feature_biotype STRING OPTIONS(description="Biological type of feature (e.g. gene)")
)
OPTIONS(
  friendly_name="MSK SCLC CANCER CELLS R3 VERSIONED",
  description="Data was derived in April 2023 from an H5AD file (Synapse ID: syn51614056) submitted by the MSK HTAN Center. This dataset is subsetted from the epithelial dataset and contains both raw gene expression counts and log2(X+1) transformed, median-normalized expression (N=54,313 cells).",
  labels=[("access", "open"), ("reference_genome", "hg38"), ("data_type", "gene_expression"), ("program", "htan"), ("source", "htan-msk"), ("category", "processed_-omics_data"), ("status", "current")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.scRNAseq_MSK_SCLC_epithelial_cells_r3` (iObs, iVar, X_value, n_genes_by_counts, log1p_n_genes_by_counts, total_counts, log1p_total_counts, mito_frac, RBP_frac, batch, donor_id, treatment, procedure, SCLC_subtype, SCLC_subtype_plus_TP53_RB1_wt, pval_SCLC_A, pval_SCLC_N, pval_SCLC_P, NEUROD_genes, MHCI_PRESENTATION, MHCII_PRESENTATION, SCLC_major_subtype_of_sample, clusters, treatment_categorized, recurrent_cluster, histo, clusters_fine, disease_ontology_term_id, tissue_ontology_term_id, cell_type_ontology_term_id, organism_ontology_term_id, is_primary_data, assay_ontology_term_id, sex_ontology_term_id, self_reported_ethnicity_ontology_term_id, development_stage_ontology_term_id, suspension_type, HTAN_Biospecimen_ID, HTAN_Participant_ID, cell_type, assay, disease, organism, sex, tissue, self_reported_ethnicity, development_stage, feature_is_filtered, feature_name, feature_reference, feature_biotype) VALUES (22779, 14950, 2.1080029010772705, 1337.0, 7.198931240688173, 2486.0, 7.8188323974609375, 0.0, 0.00040225262637250125, 'RU1066', 'RU1066', 'Naive', 'Resection', 'SCLC-A', 'SCLC-A', 0.9977360938395758, 0.002263810564731612, 9.559569263675564e-08, 0.20610417425632477, 0.33173465728759766, 0.7945349216461182, 'SCLC-A', 6, 'Naive', False, 'SCLC', '0', 'MONDO:0008433', 'UBERON:0002048', 'CL:0000066', 'NCBITaxon:9606', False, 'EFO:0009899', 'PATO:0000383', 'HANCESTRO:0005', 'HsapDv:0000168', 'cell', 'HTA8_2003_1', 'HTA8_2003', 'epithelial cell', '10x 3'' v2', 'small cell lung carcinoma', 'Homo sapiens', 'female', 'lung', 'European', '74-year-old human stage', False, 'PSMD2', 'NCBITaxon:9606', 'gene'), (22779, 14952, 2.1080029010772705, 1337.0, 7.198931240688173, 2486.0, 7.8188323974609375, 0.0, 0.00040225262637250125, 'RU1066', 'RU1066', 'Naive', 'Resection', 'SCLC-A', 'SCLC-A', 0.9977360938395758, 0.002263810564731612, 9.559569263675564e-08, 0.20610417425632477, 0.33173465728759766, 0.7945349216461182, 'SCLC-A', 6, 'Naive', False, 'SCLC', '0', 'MONDO:0008433', 'UBERON:0002048', 'CL:0000066', 'NCBITaxon:9606', False, 'EFO:0009899', 'PATO:0000383', 'HANCESTRO:0005', 'HsapDv:0000168', 'cell', 'HTA8_2003_1', 'HTA8_2003', 'epithelial cell', '10x 3'' v2', 'small cell lung carcinoma', 'Homo sapiens', 'female', 'lung', 'European', '74-year-old human stage', False, 'PSMD4', 'NCBITaxon:9606', 'gene'), (22779, 14956, 2.1080029010772705, 1337.0, 7.198931240688173, 2486.0, 7.8188323974609375, 0.0, 0.00040225262637250125, 'RU1066', 'RU1066', 'Naive', 'Resection', 'SCLC-A', 'SCLC-A', 0.9977360938395758, 0.002263810564731612, 9.559569263675564e-08, 0.20610417425632477, 0.33173465728759766, 0.7945349216461182, 'SCLC-A', 6, 'Naive', False, 'SCLC', '0', 'MONDO:0008433', 'UBERON:0002048', 'CL:0000066', 'NCBITaxon:9606', False, 'EFO:0009899', 'PATO:0000383', 'HANCESTRO:0005', 'HsapDv:0000168', 'cell', 'HTA8_2003_1', 'HTA8_2003', 'epithelial cell', '10x 3'' v2', 'small cell lung carcinoma', 'Homo sapiens', 'female', 'lung', 'European', '74-year-old human stage', False, 'PSMD8', 'NCBITaxon:9606', 'gene'), (22779, 14958, 2.1080029010772705, 1337.0, 7.198931240688173, 2486.0, 7.8188323974609375, 0.0, 0.00040225262637250125, 'RU1066', 'RU1066', 'Naive', 'Resection', 'SCLC-A', 'SCLC-A', 0.9977360938395758, 0.002263810564731612, 9.559569263675564e-08, 0.20610417425632477, 0.33173465728759766, 0.7945349216461182, 'SCLC-A', 6, 'Naive', False, 'SCLC', '0', 'MONDO:0008433', 'UBERON:0002048', 'CL:0000066', 'NCBITaxon:9606', False, 'EFO:0009899', 'PATO:0000383', 'HANCESTRO:0005', 'HsapDv:0000168', 'cell', 'HTA8_2003_1', 'HTA8_2003', 'epithelial cell', '10x 3'' v2', 'small cell lung carcinoma', 'Homo sapiens', 'female', 'lung', 'European', '74-year-old human stage', False, 'PSME1', 'NCBITaxon:9606', 'gene'), (22779, 14959, 2.930147409439087, 1337.0, 7.198931240688173, 2486.0, 7.8188323974609375, 0.0, 0.00040225262637250125, 'RU1066', 'RU1066', 'Naive', 'Resection', 'SCLC-A', 'SCLC-A', 0.9977360938395758, 0.002263810564731612, 9.559569263675564e-08, 0.20610417425632477, 0.33173465728759766, 0.7945349216461182, 'SCLC-A', 6, 'Naive', False, 'SCLC', '0', 'MONDO:0008433', 'UBERON:0002048', 'CL:0000066', 'NCBITaxon:9606', False, 'EFO:0009899', 'PATO:0000383', 'HANCESTRO:0005', 'HsapDv:0000168', 'cell', 'HTA8_2003_1', 'HTA8_2003', 'epithelial cell', '10x 3'' v2', 'small cell lung carcinoma', 'Homo sapiens', 'female', 'lung', 'European', '74-year-old human stage', False, 'PSME2', 'NCBITaxon:9606', 'gene');