-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.scRNAseq_VUMC_VAL_DIS_NOEPI_cellxgene_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"),
  HTAN_Parent_Data_File_ID STRING OPTIONS(description="HTAN Data File Identifier indicating the file(s) from which these files were derived"),
  HTAN_Specimen_ID STRING OPTIONS(description="HTAN ID associated with a biosample based on HTAN ID SOP (eg HTANx_yyy_zzz)"),
  author_cell_type STRING OPTIONS(description="B = B cell, T = T cell, END = endothelial, FIB = fibroblast, MAS = mast cell, MYE = myeloid, PLA = plasma"),
  Tumor_Type STRING OPTIONS(description="TA = tubular adenoma, HP = hyperplastic polyp, TVA = tubulovillus adenoma, SSL = sessile serrated lesion, NL = normal, MSI-H =microsatellite instability high CRC, MSS = microsatellite stable CRC"),
  Sample_Classification STRING OPTIONS(description="AD = conventional adenoma, SER = serrated polyp, NL = normal, MSI-H =microsatellite instability high CRC, MSS = microsatellite stable CRC"),
  cell_type_ontology_term_id STRING OPTIONS(description="Cell Ontology ID (i.e. CL:0000784)  (REF: https://www.ebi.ac.uk/ols/ontologies/cl)"),
  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')"),
  donor_id STRING OPTIONS(description="Identifies a unique individual that data were derived from"),
  assay_ontology_term_id STRING OPTIONS(description="Experimental Factor Ontology ID (REF: https://www.ebi.ac.uk/ols/ontologies/efo)"),
  tissue_ontology_term_id STRING OPTIONS(description="Uber-anatomy ontology ID (REF: https://www.ebi.ac.uk/ols/ontologies/uberon) (ex.UBERON:2001190)"),
  sex_ontology_term_id STRING OPTIONS(description="Phenotype And Trait Ontology ID, PATO:0000384 for male, PATO:0000383 for female, or unknown if unavailable"),
  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)"),
  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"),
  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)"),
  suspension_type STRING OPTIONS(description="Cell, nucleus, or na, as corresponding to sample preparation"),
  is_primary_data BOOL OPTIONS(description="Indicates if the sample is primary or not (True/False)"),
  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="HTAN HG38 SCRNASEQ GENE EXPRESSION CUMULATIVE NON-EPITHELIAL R3 VERSIONED",
  description="Data was derived in April 2023 from an H5AD file (Synapse ID:  syn42846242) submitted by the Vanderbilt HTAN Center. This data set contains raw gene expression counts from 128 patient samples. Data was generated using the InDrop V2 chemistry (see https://doi.org/10.1186/s12864-020-06843-0 ) and was processed using a DropEst-based pipeline (see https://doi.org/10.1016/j.xpro.2021.100450 ), where reads were mapped to HG38, followed by processing with scanpy and aformentioned pipeline to filter cells. Low-dimensional embeddings are derived from a regulon space, generated using SCENIC. This dataset contains all non-epithelial cells derived from both the discovery (DIS) and validation (VAL) cohorts, as described in https://doi.org/10.1016/j.cell.2021.11.031.",
  labels=[("access", "open"), ("reference_genome", "hg38"), ("data_type", "gene_expression"), ("program", "htan"), ("source", "htan-vumc"), ("category", "processed_-omics_data"), ("status", "current")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.scRNAseq_VUMC_VAL_DIS_NOEPI_cellxgene_r3` (iObs, iVar, X_value, HTAN_Parent_Data_File_ID, HTAN_Specimen_ID, author_cell_type, Tumor_Type, Sample_Classification, cell_type_ontology_term_id, disease_ontology_term_id, donor_id, assay_ontology_term_id, tissue_ontology_term_id, sex_ontology_term_id, development_stage_ontology_term_id, self_reported_ethnicity_ontology_term_id, organism_ontology_term_id, suspension_type, is_primary_data, cell_type, assay, disease, organism, sex, tissue, self_reported_ethnicity, development_stage, feature_is_filtered, feature_name, feature_reference, feature_biotype) VALUES (2206, 13965, -0.10371212661266327, 'HTA11_83_200000101113211', 'HTA11_83_2000001011', 'FIB', 'HP', 'SER', 'CL:0000057', 'MONDO:0006249', 'HTA11_83', 'EFO:0008913', 'UBERON:0012474', 'PATO:0000384', 'HsapDv:0000158', 'HANCESTRO:0568', 'NCBITaxon:9606', 'cell', True, 'fibroblast', 'single-cell RNA sequencing', 'hyperplastic polyp', 'Homo sapiens', 'male', 'hepatic cecum', 'African American', '64-year-old human stage', False, 'MTX3', 'NCBITaxon:9606', 'gene'), (2208, 13965, -0.10371212661266327, 'HTA11_83_200000101113211', 'HTA11_83_2000001011', 'FIB', 'HP', 'SER', 'CL:0000057', 'MONDO:0006249', 'HTA11_83', 'EFO:0008913', 'UBERON:0012474', 'PATO:0000384', 'HsapDv:0000158', 'HANCESTRO:0568', 'NCBITaxon:9606', 'cell', True, 'fibroblast', 'single-cell RNA sequencing', 'hyperplastic polyp', 'Homo sapiens', 'male', 'hepatic cecum', 'African American', '64-year-old human stage', False, 'MTX3', 'NCBITaxon:9606', 'gene'), (2206, 13966, -0.10650312155485153, 'HTA11_83_200000101113211', 'HTA11_83_2000001011', 'FIB', 'HP', 'SER', 'CL:0000057', 'MONDO:0006249', 'HTA11_83', 'EFO:0008913', 'UBERON:0012474', 'PATO:0000384', 'HsapDv:0000158', 'HANCESTRO:0568', 'NCBITaxon:9606', 'cell', True, 'fibroblast', 'single-cell RNA sequencing', 'hyperplastic polyp', 'Homo sapiens', 'male', 'hepatic cecum', 'African American', '64-year-old human stage', False, 'MUC1', 'NCBITaxon:9606', 'gene'), (2208, 13966, -0.10650312155485153, 'HTA11_83_200000101113211', 'HTA11_83_2000001011', 'FIB', 'HP', 'SER', 'CL:0000057', 'MONDO:0006249', 'HTA11_83', 'EFO:0008913', 'UBERON:0012474', 'PATO:0000384', 'HsapDv:0000158', 'HANCESTRO:0568', 'NCBITaxon:9606', 'cell', True, 'fibroblast', 'single-cell RNA sequencing', 'hyperplastic polyp', 'Homo sapiens', 'male', 'hepatic cecum', 'African American', '64-year-old human stage', False, 'MUC1', 'NCBITaxon:9606', 'gene'), (2206, 13967, -0.16889657080173492, 'HTA11_83_200000101113211', 'HTA11_83_2000001011', 'FIB', 'HP', 'SER', 'CL:0000057', 'MONDO:0006249', 'HTA11_83', 'EFO:0008913', 'UBERON:0012474', 'PATO:0000384', 'HsapDv:0000158', 'HANCESTRO:0568', 'NCBITaxon:9606', 'cell', True, 'fibroblast', 'single-cell RNA sequencing', 'hyperplastic polyp', 'Homo sapiens', 'male', 'hepatic cecum', 'African American', '64-year-old human stage', False, 'MUC12', 'NCBITaxon:9606', 'gene');