-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.scRNAseq_VUMC_HTAN_DIS_EPI_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="ABS = absorptive cells, TUF = tuft cells, EE = enteroendocrine cells, ASC = adenoma specific cells, TAC = transient amplifying cells, CT = crypt top cells, GOB = goblet cells, SSC= serrated specific cells, STM = stem cells"),
  Polyp_Type STRING OPTIONS(description="TA = tubular adenoma, HP = hyperplastic polyp, TVA = tubulovillus adenoma, SSL = sessile serrated lesion, UNC = unclassified, NL = normal"),
  Sample_Classification STRING OPTIONS(description="AD = conventional adenoma, SER = serrated polyp, UNC = unclassified, NL = normal"),
  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 DISCOVERY COHORT EPITHELIAL R3 VERSIONED",
  description="Data was derived in April 2023 from an H5AD file (Synapse ID: syn42546036) submitted by the Vanderbilt HTAN Center. This data set contains raw gene expression counts from 62 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 the epithelial cells derived from the discsovery (DIS) cohort, 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_HTAN_DIS_EPI_cellxgene_r3` (iObs, iVar, X_value, HTAN_Parent_Data_File_ID, HTAN_Specimen_ID, author_cell_type, Polyp_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 (57726, 6791, -0.11703786998987198, 'HTA11_78_200000101113211', 'HTA11_78_2000001011', 'TUF', 'TA', 'AD', 'CL:0002204', 'MONDO:0024660', 'HTA11_78', 'EFO:0008913', 'UBERON:0001158', 'PATO:0000384', 'HsapDv:0000161', 'HANCESTRO:0005', 'NCBITaxon:9606', 'cell', True, 'brush cell', 'single-cell RNA sequencing', 'tubular adenoma', 'Homo sapiens', 'male', 'descending colon', 'European', '67-year-old human stage', False, 'CTD-2368P22.1', 'NCBITaxon:9606', 'gene'), (57820, 6791, -0.11703786998987198, 'HTA11_78_200000101113211', 'HTA11_78_2000001011', 'TUF', 'TA', 'AD', 'CL:0002204', 'MONDO:0024660', 'HTA11_78', 'EFO:0008913', 'UBERON:0001158', 'PATO:0000384', 'HsapDv:0000161', 'HANCESTRO:0005', 'NCBITaxon:9606', 'cell', True, 'brush cell', 'single-cell RNA sequencing', 'tubular adenoma', 'Homo sapiens', 'male', 'descending colon', 'European', '67-year-old human stage', False, 'CTD-2368P22.1', 'NCBITaxon:9606', 'gene'), (58003, 6791, -0.11703786998987198, 'HTA11_78_200000101113211', 'HTA11_78_2000001011', 'TUF', 'TA', 'AD', 'CL:0002204', 'MONDO:0024660', 'HTA11_78', 'EFO:0008913', 'UBERON:0001158', 'PATO:0000384', 'HsapDv:0000161', 'HANCESTRO:0005', 'NCBITaxon:9606', 'cell', True, 'brush cell', 'single-cell RNA sequencing', 'tubular adenoma', 'Homo sapiens', 'male', 'descending colon', 'European', '67-year-old human stage', False, 'CTD-2368P22.1', 'NCBITaxon:9606', 'gene'), (58149, 6791, -0.11703786998987198, 'HTA11_78_200000101113211', 'HTA11_78_2000001011', 'TUF', 'TA', 'AD', 'CL:0002204', 'MONDO:0024660', 'HTA11_78', 'EFO:0008913', 'UBERON:0001158', 'PATO:0000384', 'HsapDv:0000161', 'HANCESTRO:0005', 'NCBITaxon:9606', 'cell', True, 'brush cell', 'single-cell RNA sequencing', 'tubular adenoma', 'Homo sapiens', 'male', 'descending colon', 'European', '67-year-old human stage', False, 'CTD-2368P22.1', 'NCBITaxon:9606', 'gene'), (58259, 6791, -0.11703786998987198, 'HTA11_78_200000101113211', 'HTA11_78_2000001011', 'TUF', 'TA', 'AD', 'CL:0002204', 'MONDO:0024660', 'HTA11_78', 'EFO:0008913', 'UBERON:0001158', 'PATO:0000384', 'HsapDv:0000161', 'HANCESTRO:0005', 'NCBITaxon:9606', 'cell', True, 'brush cell', 'single-cell RNA sequencing', 'tubular adenoma', 'Homo sapiens', 'male', 'descending colon', 'European', '67-year-old human stage', False, 'CTD-2368P22.1', 'NCBITaxon:9606', 'gene');