Skip to content
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

Initiation of new Glioblastoma analysis module #783

Merged
merged 5 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/docker_celltype-glioblastoma.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This is a workflow to build the docker image for the celltype-glioblastoma module
#
# Docker modules are run on pull requests when code for files that affect the Docker image have changed.
# If other files are used during the Docker build, they should be added to `paths`
#
# At module initialization, this workflow is inactive, and needs to be activated manually

name: Build docker image for celltype-glioblastoma

concurrency:
# only one run per branch at a time
group: "docker_celltype-glioblastoma_${{ github.ref }}"
cancel-in-progress: true

on:
# pull_request:
# branches:
# - main
# paths:
# - "analyses/celltype-glioblastoma/Dockerfile"
# - "analyses/celltype-glioblastoma/.dockerignore"
# - "analyses/celltype-glioblastoma/renv.lock"
# - "analyses/celltype-glioblastoma/conda-lock.yml"
# push:
# branches:
# - main
# paths:
# - "analyses/celltype-glioblastoma/Dockerfile"
# - "analyses/celltype-glioblastoma/.dockerignore"
# - "analyses/celltype-glioblastoma/renv.lock"
# - "analyses/celltype-glioblastoma/conda-lock.yml"
workflow_dispatch:
inputs:
push-ecr:
description: "Push to AWS ECR"
type: boolean
required: true

jobs:
test-build:
name: Test Build Docker Image
if: github.event_name == 'pull_request' || (contains(github.event_name, 'workflow_') && !inputs.push-ecr)
runs-on: ubuntu-latest

steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build image
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:analyses/celltype-glioblastoma"
push: false
cache-from: type=gha
cache-to: type=gha,mode=max

build-push:
name: Build and Push Docker Image
if: github.repository_owner == 'AlexsLemonade' && (github.event_name == 'push' || inputs.push-ecr)
uses: ./.github/workflows/build-push-docker-module.yml
with:
module: "celltype-glioblastoma"
push-ecr: true
62 changes: 62 additions & 0 deletions .github/workflows/run_celltype-glioblastoma.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This is a workflow to run the celltype-glioblastoma module
#
# Analysis modules are run based on three triggers:
# - Manual trigger
# - On pull requests where code in the module has changed
# - As a reusable workflow called from a separate workflow which periodically runs all modules
#
# At initialization, only the manual trigger is active

name: Run celltype-glioblastoma analysis module
env:
MODULE_PATH: analyses/celltype-glioblastoma
AWS_DEFAULT_REGION: us-east-2

concurrency:
# only one run per branch at a time
group: "run_celltype-glioblastoma_${{ github.ref }}"
cancel-in-progress: true

on:
workflow_dispatch:
# workflow_call:
# pull_request:
# branches:
# - main
# paths:
# - analyses/celltype-glioblastoma/**
# - "!analyses/celltype-glioblastoma/Dockerfile"
# - "!analyses/celltype-glioblastoma/.dockerignore"
# - .github/workflows/run_celltype-glioblastoma.yml

jobs:
run-module:
if: github.repository_owner == 'AlexsLemonade'
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up conda
# Note that this creates and activates an environment named 'test' by default
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest

- name: Install and activate locked conda environment
run: |
conda install conda-lock
conda-lock install --name test ${MODULE_PATH}/conda-lock.yml

# Update this step as needed to download the desired data
- name: Download test data
run: ./download-data.py --test-data --format AnnData

- name: Run analysis module
run: |
cd ${MODULE_PATH}
# run module script(s) here
8 changes: 8 additions & 0 deletions analyses/celltype-glioblastoma/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Ignore everything by default
*

# Include specific files in the docker environment
!/renv.lock
!/requirements.txt
!/environment.yml
!/conda-lock.yml
7 changes: 7 additions & 0 deletions analyses/celltype-glioblastoma/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Results should not be committed
/results/*
!/results/README.md

# Ignore the scratch directory (but keep it present)
/scratch/*
!/scratch/.gitkeep
10 changes: 10 additions & 0 deletions analyses/celltype-glioblastoma/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# A template docker file for creating a new analysis
FROM ubuntu:22.04

# Labels following the Open Containers Initiative (OCI) recommendations
# For more information, see https://specs.opencontainers.org/image-spec/annotations/?v=v1.0.1
LABEL org.opencontainers.image.authors="OpenScPCA scpca@ccdatalab.org"
LABEL org.opencontainers.image.source="https://github.com/AlexsLemonade/OpenScPCA-analysis/tree/main/templates/analysis-module"

# Set an environment variable to allow checking if we are in an OpenScPCA container
ENV OPENSCPCA_DOCKER=TRUE
38 changes: 38 additions & 0 deletions analyses/celltype-glioblastoma/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Glioblastoma cell type identification

## Description

This module aims to identify the cell types present and provide labels for 16 pediatric Glioblastoma samples. This is split into the following objectives:
- [ ] Visualise the data quality of each sample using standard quality control metrics (gene count, mitochondrial reads etc.)
- [ ] Create a linear regression model using CellTypist with Glioblastoma atlas 'GBMap' (Core) as reference data
- [ ] Apply the linear regression model using CellTypist to each sample individually
- [ ] Use the pre-generated UMAP to cluster the cells and isolate clusters with low model confidence
- [ ] Manually label the low-confidence clusters using known marker genes and differential expression analysis
- [ ] Provide final cell labels for each sample

## Usage

In progress

## Input files

The input is dependent on the output fles run from `download-data.py`.

```
./download-data.py --projects SCPCP00001 --format anndata
```

This downloads the `Anndata` files for Glioblastoma samples.


## Output files

In progress

## Software requirements

The analysis will be done in Python version 3.11 primarily using the `scanpy' and `CellTypist' packages.

## Computational resources

TBC
17 changes: 17 additions & 0 deletions analyses/celltype-glioblastoma/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "openscpca-celltype-glioblastoma"
channels:
- conda-forge
- bioconda
platforms:
- linux-64
- osx-64
- osx-arm64
dependencies:
- python=3.11
- awscli>=2.15
- conda-lock>=2.5
- jupyter=1.0
- jq>=1.7
- pre-commit>=3.6
- session-info>=1.0
georginaalbadri marked this conversation as resolved.
Show resolved Hide resolved
- celltypist
Loading