Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
antonkulaga 7abeeaa878
included dataset on select_samples stage
3 years ago
53cd73ef77
folder refactoring
4 years ago
3ab87f2f5c
published new yspecies
3 years ago
7abeeaa878
included dataset on select_samples stage
3 years ago
7abeeaa878
included dataset on select_samples stage
3 years ago
3ab87f2f5c
published new yspecies
3 years ago
3ab87f2f5c
published new yspecies
3 years ago
7b4b897698
updated second stage
3 years ago
3ab87f2f5c
published new yspecies
3 years ago
7abeeaa878
included dataset on select_samples stage
3 years ago
7abeeaa878
included dataset on select_samples stage
3 years ago
3ab87f2f5c
published new yspecies
3 years ago
3ab87f2f5c
published new yspecies
3 years ago
Storage Buckets
Data Pipeline
Legend
DVC Managed File
Git Managed File
Metric
Stage File
External File

README.md

You have to be logged in to leave a comment. Sign In

YSpecies

This repository was created to prototype the DVC-based ML pipelines for the crosspecies project All dependencies are written in conda environment.yaml file, DVC and jupyter lab are also installed there.

Project structure

In the data folder one keeps input, interim and output data.

Before you start running anything do not forget to dvc pull the data and after commiting do not forget to dvc push it!

The pipeline is run by running dvc stages (see stages folder)

Most of the analysis is written in jupyter notebooks in the notebooks folder. Each stage runs (and source controls input-outputs) corresponding notebooks using papermill software (which also stores output of the notebooks to data/notebooks)

Temporaly some classes are copy-pasted from xspecies repository to make notebooks works

yspecies package

The code in yspecies folder is a conda package that is used inside notebooks The package can be installed from conda https://anaconda.org/antonkulaga/yspecies

conda install -c antonkulaga yspecies

Running stages

DVC stages are in dvc.yaml file, to run dvc stage just use dvc repro <stage_name>:

dvc repro 

Most of the stages also produce notebooks together with files in the output

Yspecies classes

Indexing

One of the key classes is ExpressionDataset class:

e = ExpressionDataset("5_tissues", expressions, genes, samples)
e

It allows indexing by genes:

e[["ENSG00000073921", "ENSG00000139687"]]

By samples:

e[["ENSG00000073921", "ENSG00000139687"]]

Both:

e[["ENSG00000073921", "ENSG00000139687"],["SRR2308103","SRR1981979"]]

Filtering

ExpressionDataset class has by_genes and by_samples properties which allow indexing and filtering. For instance filtering only blood tissue:

e.by_samples.filter(lambda s: s["tissue"]=="Blood").samples.head(10)

The class is also Jupyter-friendly with repr_html() method implemented

Tip!

Press p or to see the previous file or, n or to see the next file

About

Cross-species repository

Collaborators 1

Comments

Loading...