-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add GTEx Image Learner tutorial for tissue classification using expression-derived images #6815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
paulocilasjr
wants to merge
23
commits into
galaxyproject:main
Choose a base branch
from
paulocilasjr:GTEx_tutorial
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
dc4642c
GTEx initial tutorail
paulocilasjr f201854
contributors and tutorial mod
paulocilasjr fa9cf12
update tutorial with imgs
paulocilasjr 78f6f90
text update
paulocilasjr ac45c2d
faqs update
paulocilasjr 511d730
README.md removed
paulocilasjr 70048c7
Merge branch 'main' into GTEx_tutorial
paulocilasjr b57d1e4
Interactive tool - Jupyter execution.
paulocilasjr ee99e8d
questions prior report reading
paulocilasjr 72b1269
slides modification
paulocilasjr 22fdd8f
Grad-CAM analysis
paulocilasjr 0e9f027
Merge branch 'main' into GTEx_tutorial
paulocilasjr d38130f
Merge branch 'main' into GTEx_tutorial
paulocilasjr c62c025
Merge branch 'main' into GTEx_tutorial
paulocilasjr 8b36e57
faqs removed
paulocilasjr 14ca36f
Merge branch 'main' into GTEx_tutorial
paulocilasjr 8d3bea9
Merge branch 'main' into GTEx_tutorial
paulocilasjr 391b4db
Merge branch 'main' into GTEx_tutorial
paulocilasjr 0017262
Merge branch 'main' into GTEx_tutorial
paulocilasjr 1f9f30e
Merge branch 'main' into GTEx_tutorial
paulocilasjr 80a7ad6
Merge branch 'main' into GTEx_tutorial
paulocilasjr 510f10f
Merge branch 'main' into GTEx_tutorial
paulocilasjr 180def4
Merge branch 'main' into GTEx_tutorial
paulocilasjr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
topics/statistics/tutorials/GTEx_Tissue_modeling/data-library.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| --- | ||
| destination: | ||
| type: library | ||
| name: GTN - Material | ||
| description: Galaxy Training Network Material | ||
| synopsis: Galaxy Training Network Material. See https://training.galaxyproject.org | ||
| items: | ||
| - name: Statistics and Machine Learning | ||
| description: Statistics and Machine Learning tutorials | ||
| items: | ||
| - name: GTEx Tissue Modeling with Image Learner | ||
| items: | ||
| - name: Prepared GTEx v11 Image Learner dataset | ||
| description: Prepared Zenodo files used for the hands-on tutorial | ||
| items: | ||
| - url: https://zenodo.org/records/19963477/files/selected_gtex_v11_tpm_image_tissue_labels.csv | ||
| src: url | ||
| ext: csv | ||
| info: selected_gtex_v11_tpm_image_tissue_labels.csv | ||
| description: Prepared metadata table with image_path and label columns for Image Learner. | ||
| - url: https://zenodo.org/records/19963477/files/selected_gtex_v11_tpm_image_tissue_dataset.zip | ||
| src: url | ||
| ext: zip | ||
| info: selected_gtex_v11_tpm_image_tissue_dataset.zip | ||
| description: ZIP archive of generated grayscale images for Image Learner. | ||
| - name: Optional GTEx v11 raw files | ||
| description: Direct URLs for rebuilding the prepared dataset | ||
| items: | ||
| - url: https://storage.googleapis.com/adult-gtex/bulk-gex/v11/rna-seq/GTEx_Analysis_2025-08-22_v11_RNASeQCv2.4.3_gene_tpm.gct.gz | ||
| src: url | ||
| ext: gct.gz | ||
| info: GTEx_Analysis_2025-08-22_v11_RNASeQCv2.4.3_gene_tpm.gct.gz | ||
| description: Raw GTEx v11 gene TPM expression matrix used to generate sample images. | ||
| - url: https://storage.googleapis.com/adult-gtex/annotations/v11/metadata-files/GTEx_Analysis_v11_Annotations_SampleAttributesDS.txt | ||
| src: url | ||
| ext: txt | ||
| info: GTEx_Analysis_v11_Annotations_SampleAttributesDS.txt | ||
| description: GTEx v11 sample attributes file containing `SMTSD` tissue labels. |
3 changes: 3 additions & 0 deletions
3
topics/statistics/tutorials/GTEx_Tissue_modeling/faqs/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| --- | ||
| layout: faq-page | ||
| --- | ||
Binary file added
BIN
+47.3 KB
topics/statistics/tutorials/GTEx_Tissue_modeling/figures/accuracy_epochs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+44.1 KB
topics/statistics/tutorials/GTEx_Tissue_modeling/figures/dataset_overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.58 MB
topics/statistics/tutorials/GTEx_Tissue_modeling/figures/open_report.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+48.2 KB
topics/statistics/tutorials/GTEx_Tissue_modeling/figures/overffiting_gap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+45.6 KB
topics/statistics/tutorials/GTEx_Tissue_modeling/figures/rocauc_epochs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+80.6 KB
topics/statistics/tutorials/GTEx_Tissue_modeling/figures/test_metrics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+88 KB
topics/statistics/tutorials/GTEx_Tissue_modeling/figures/training_config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
184 changes: 184 additions & 0 deletions
184
topics/statistics/tutorials/GTEx_Tissue_modeling/slides.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,184 @@ | ||
| --- | ||
| layout: tutorial_slides | ||
|
shiltemann marked this conversation as resolved.
|
||
| logo: GTN | ||
| title: "GTEx Tissue Modeling with Galaxy Image Learner" | ||
|
|
||
| questions: | ||
| - "What is machine learning, and why is it useful for classification?" | ||
| - "How does GTEx provide data for biological machine learning examples?" | ||
| - "How can Galaxy Image Learner train and evaluate image classification models?" | ||
|
|
||
| objectives: | ||
| - "Explain the difference between traditional machine learning and deep learning." | ||
| - "Describe how GTEx gene expression and sample metadata support tissue classification." | ||
| - "Identify the main Image Learner inputs, settings, and outputs." | ||
|
|
||
| contributors: | ||
| - paulocilasjr | ||
| - allissadillman | ||
| - nakucher | ||
| - jgoecks | ||
| --- | ||
|
|
||
| # Before the Hands-on | ||
|
|
||
| - Machine learning can learn patterns from examples. | ||
| - GTEx provides gene expression data from many human tissues. | ||
| - Image Learner makes image classification workflows available in Galaxy. | ||
|
|
||
| ??? | ||
|
|
||
| These slides introduce the ideas needed to understand the tutorial. | ||
|
|
||
| --- | ||
|
|
||
| # What is Machine Learning? | ||
|
|
||
| - A way to learn patterns from data instead of writing every rule by hand. | ||
| - A model is trained with examples and then used on new examples. | ||
| - In supervised learning, each training example has an input and a known label. | ||
| - The goal is to make useful predictions on data the model has not seen before. | ||
|
|
||
| --- | ||
|
|
||
| # Prediction and Classification | ||
|
|
||
| - Prediction: estimate an outcome from input data. | ||
| - Classification: predict a category or label. | ||
| - Binary classification: two possible labels. | ||
| - Multi-class classification: more than two possible labels. | ||
|
|
||
| In this tutorial, the model predicts the tissue label for each GTEx sample. | ||
|
|
||
| --- | ||
|
|
||
| # Traditional Machine Learning | ||
|
|
||
| - Often uses human-designed features. | ||
| - Works well with smaller or structured datasets. | ||
| - Can be easier to interpret than deep learning. | ||
| - Examples: logistic regression, random forests, support vector machines. | ||
|
|
||
| Tradeoff: feature design can require strong domain expertise. | ||
|
|
||
| --- | ||
|
|
||
| # Deep Learning | ||
|
|
||
| - Uses neural networks with many trainable parameters. | ||
| - Can learn useful features directly from raw or lightly processed data. | ||
| - Strong for images, text, audio, and large complex datasets. | ||
| - Usually needs more data, computation, and careful validation. | ||
|
|
||
| --- | ||
|
|
||
| # Traditional ML vs Deep Learning | ||
|
|
||
| | Approach | Strengths | Limitations | | ||
| |---|---|---| | ||
| | Traditional ML | Efficient, often easier to interpret | Depends on feature engineering | | ||
| | Deep learning | Learns complex patterns automatically | Needs more data and compute | | ||
|
|
||
| Both approaches require good data, clear labels, and careful evaluation. | ||
|
|
||
| --- | ||
|
|
||
| # Why Validation Matters | ||
|
|
||
| - A model can memorize training data and still fail on new data. | ||
| - Validation data helps tune model behavior during training. | ||
| - Test data estimates performance after training is complete. | ||
| - Large gaps between training and validation performance may indicate overfitting. | ||
|
|
||
| --- | ||
|
|
||
| # What is GTEx? | ||
|
|
||
| - GTEx stands for Genotype-Tissue Expression. | ||
| - It is a reference project for studying human gene expression across tissues. | ||
| - GTEx links molecular measurements with sample and tissue metadata. | ||
| - Researchers use GTEx to study tissue-specific expression and regulation. | ||
|
|
||
| --- | ||
|
|
||
| # GTEx Data Products | ||
|
|
||
| - Gene expression matrices: expression values for many genes and samples. | ||
| - Sample annotations: tissue labels and technical metadata. | ||
| - eQTL resources: links between genetic variation and gene expression. | ||
| - Histology and metadata resources: biological and quality context. | ||
|
|
||
| For this tutorial, the key pieces are gene TPM values and tissue labels. | ||
|
|
||
| --- | ||
|
|
||
| # GTEx in This Tutorial | ||
|
|
||
| - Each sample has thousands of gene expression values. | ||
| - Each sample also has a detailed tissue label. | ||
| - The model learns whether expression patterns can predict tissue type. | ||
| - This is a supervised, multi-class classification task. | ||
|
|
||
| --- | ||
|
|
||
| # What is Image Learner? | ||
|
|
||
| - A Galaxy tool for training image-based deep learning models. | ||
| - It accepts images plus a metadata table containing labels. | ||
| - It can train models for classification tasks from the Galaxy interface. | ||
| - It produces reports that summarize training and model performance. | ||
|
|
||
| --- | ||
|
|
||
| # Image Learner Inputs | ||
|
|
||
| | Input | Purpose | | ||
| |---|---| | ||
| | Metadata table | One row per image, with image filename and label | | ||
| | Image ZIP archive | Contains the image files referenced by the table | | ||
|
|
||
| The `image_path` column points to each image, and the `label` column tells the model what to predict. | ||
|
|
||
| --- | ||
|
|
||
| # Important Settings | ||
|
|
||
| - Task type: binary, multi-class, or other supported task. | ||
| - Label column: the target variable the model should predict. | ||
| - Image column: the filename for each input image. | ||
| - Model architecture: the deep learning model used for training. | ||
| - Epochs and early stopping: how long training can continue. | ||
|
|
||
| Good settings depend on the dataset, task, and available compute. | ||
|
|
||
| --- | ||
|
|
||
| # Why Use Image Learner? | ||
|
|
||
| - Keeps training inside a reproducible Galaxy history. | ||
| - Reduces the amount of code needed to train a model. | ||
| - Standardizes inputs, model settings, and outputs. | ||
| - Makes reports easier to share, inspect, and compare. | ||
|
|
||
| This helps researchers focus on the biological question and model interpretation. | ||
|
|
||
| --- | ||
|
|
||
| # Reading Model Results | ||
|
|
||
| - Accuracy: how often predictions are correct overall. | ||
| - Precision and recall: how errors differ across classes. | ||
| - Loss: how uncertain or incorrect model predictions are. | ||
| - Training curves: whether learning improves over time. | ||
| - Confusion patterns: which classes are mixed up. | ||
|
|
||
| Always compare training, validation, and test performance. | ||
|
|
||
| --- | ||
|
|
||
| # Takeaways | ||
|
|
||
| - Machine learning uses examples to learn prediction rules. | ||
| - Deep learning is powerful for complex data but needs careful validation. | ||
| - GTEx provides expression data and tissue labels for supervised learning. | ||
| - Image Learner lets Galaxy users train and inspect image classification models. | ||
17 changes: 17 additions & 0 deletions
17
topics/statistics/tutorials/GTEx_Tissue_modeling/tutorial.bib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| @article{GTEx2020, | ||
| title = {The GTEx Consortium atlas of genetic regulatory effects across human tissues}, | ||
| volume = {369}, | ||
| issn = {1095-9203}, | ||
| doi = {10.1126/science.aaz1776}, | ||
| number = {6509}, | ||
| journal = {Science}, | ||
| author = {{GTEx Consortium}}, | ||
| year = {2020} | ||
| } | ||
|
|
||
| @online{GTExPortal, | ||
| author = {{GTEx Portal}}, | ||
| title = {GTEx Portal Downloads}, | ||
| url = {https://gtexportal.org/home/downloads/adult-gtex}, | ||
| urldate = {2026-05-01} | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the faq index page is autogenerated from the FAQs in the faqs folder, any content on this page itself is not displayed anywhere. Please create .md files in the faqs folder, one per faq. These will all be shown in this page, and can also be embedded into the tutorial where needed.