Tumor Gene Expression African: sample notebook
A worked notebook for Tumor Gene Expression African, with 2 code cells and the output each one printed. On Scigantic it opens in a hosted JupyterLab with the dataset already mounted, so nothing is downloaded first.
- Provider
- electricsheepafrica
- License
- cc-by-nc-4.0
- Size
- 4 files
- Format
- CSV, Parquet (in sampled files)
- Stored at
- Hugging Face (https://huggingface.co/datasets/electricsheepafrica/tumor-gene-expression-african)
- Access
- Free and public. No account with the data provider is needed.
The notebook
Annotate this breast-cancer dataset with the Scigantic assistant
The data is synthetic: 50,000 tumor gene-expression profiles parameterised from published sub-Saharan Africa literature by Electric Sheep Africa (CC-BY-NC-4.0). It is built for exercising analysis workflows like this one, not for empirical or policy conclusions.
This notebook image wires the Scigantic AI assistant (the panel on the right) to the Kiro for Life Sciences tools, so it can look genes and proteins up in UniProt and NCBI for you, without leaving the notebook.
Try it now
- Run the two cells below to load the data.
- Open the Scigantic AI panel on the right.
- Paste this prompt:
For the genes measured in this dataset (the *_expr columns), use your tools to look up each gene's function in UniProt and a one-line summary from NCBI. Then add the mean expression per pam50_subtype and show it all as one annotated table.
The assistant reads the dataframe, calls UniProt and NCBI for each gene, computes the per-subtype means, and hands back a single table that joins Scigantic's data with the reference databases.
import os
import pandas as pd
# The Hugging Face repo is FUSE-mounted read-only at SCIGANTIC_MOUNT_PATH.
# Read the parquet copy straight off the mount: no hub download, no token.
mount = os.environ.get("SCIGANTIC_MOUNT_PATH", "/mnt/archive")
df = pd.read_parquet(os.path.join(mount, "gene_expression_data.parquet"))
print(f"{len(df):,} rows x {df.shape[1]} columns from {mount}")
df.head()
Output:
50,000 rows x 23 columns from /mnt/archive
sample_id population age age_group menopausal_status \
0 BC_EXPR_00000 East_Africa 45 40-49 Premenopausal
1 BC_EXPR_00001 African_American 69 60+ Postmenopausal
2 BC_EXPR_00002 African_American 62 60+ Postmenopausal
3 BC_EXPR_00003 Southern_Africa 42 40-49 Premenopausal
4 BC_EXPR_00004 West_Africa 68 60+ Postmenopausal
bmi tumor_grade stage pam50_subtype ER_status ... MKI67_expr \
0 27.470105 2 I Luminal_B Positive ... 8.038647
1 37.021630 3 II Luminal_A Positive ... 6.395625
2 18.339915 3 III Basal_like Negative ... 8.884160
3 29.169572 3 II Luminal_A Positive ... 7.857127
4 22.284547 3 II Luminal_B Positive ... 8.368848
...
# The measured genes are the *_expr columns.
gene_cols = [c for c in df.columns if c.endswith("_expr")]
genes = [c[:-5] for c in gene_cols]
print(f"{len(genes)} genes measured; subtypes: {sorted(df['pam50_subtype'].unique())}")
genes
Output:
6 genes measured; subtypes: ['Basal_like', 'HER2_enriched', 'Luminal_A', 'Luminal_B', 'Normal_like'] ['MKI67', 'ESR1', 'PGR', 'ERBB2', 'KRT5', 'KRT17']
What just happened
The assistant combined two sources in a single turn:
- This Scigantic dataset: the *_expr expression columns and the pam50_subtype labels.
- Kiro for Life Sciences tools: live UniProt (protein function) and NCBI (literature) lookups, called as tools, with no API code written by you.
Try a follow-up in the assistant: ask which subtype most strongly expresses the proliferation marker MKI67, or to flag any gene whose UniProt function mentions a hormone receptor.
Run it
Open this notebook to run it, see the dataset page for the full description, or browse the full catalog.