Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
37f4ed1
moved rst to md for README format - rst not being used
tmsincomb Nov 29, 2022
8c66310
python cache files ignored
tmsincomb Dec 6, 2022
3a615d7
includes badges and new install
tmsincomb Dec 6, 2022
356354b
pre-commit run on bin files
tmsincomb Dec 6, 2022
e43cb40
simple run for devs
tmsincomb Dec 6, 2022
8d097c1
pytesting init
tmsincomb Dec 6, 2022
e9a78c0
updated rev
tmsincomb Dec 6, 2022
9e4a420
library install
tmsincomb Dec 6, 2022
0607a93
Merge pull request #1 from tmsincomb/sparc-run
tmsincomb Dec 6, 2022
cb7b8e3
black format
tmsincomb Dec 6, 2022
998ab14
small tests set from source
tmsincomb Jan 9, 2023
eb238ed
updated tests
tmsincomb Jan 9, 2023
a155106
28gbs added to readme for req
tmsincomb Jan 10, 2023
f3dbb13
full test init
tmsincomb Feb 14, 2023
c22a66b
full test init
tmsincomb Feb 14, 2023
3714e77
-
tmsincomb Feb 14, 2023
bda1f7b
Merge pull request #2 from tmsincomb/test-io
tmsincomb Feb 14, 2023
4e0cd38
output example
tmsincomb May 9, 2023
a995d09
removed testing
tmsincomb May 9, 2023
0c11416
removing rst
tmsincomb May 9, 2023
6534e49
updated travis to handle pre-commit
tmsincomb May 9, 2023
ad0c879
travis needs more help than gitworkflows, moving back to old formater
tmsincomb May 9, 2023
1fdc4d3
moving to workflow for testing since travis not setup
tmsincomb May 9, 2023
d52d8d9
setup version bump
tmsincomb May 9, 2023
c908c66
master to main
tmsincomb May 9, 2023
f51d93b
updated format for worflow
tmsincomb May 9, 2023
812de20
removed full install
tmsincomb May 9, 2023
7886077
any branch format check
tmsincomb May 9, 2023
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
27 changes: 27 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Pre-Commit

on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]

jobs:
build-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install .
- name: PreCommit
uses: pre-commit/action@v3.0.0
144 changes: 136 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,137 @@
*.fastq
*.fastq.gz
*.h5ad
*.hdf5
*.pdf
*.zarr
.idea/
# MacOS

.DS_Store

### Genomics ###

# *.fastq
# *.fastq.gz
# *.h5ad
# *.hdf5
# *.pdf
# *.zarr
# .idea/
# __pycache__/
# out/

### Pytest




### VS Code ###

.vscode/

### Python ###

# Byte-compiled / optimized / DLL files
__pycache__/
out/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
repos:
- repo: https://github.com/psf/black
rev: 22.6.0
rev: 22.10.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pycqa/isort
rev: 5.10.1
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black"]
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<h1 align="center">
<br>
</h1>

<div class="flex-container" align="center">
<a href="https://img.shields.io/badge/Python-3.%7C3.8%7C3.9%7C3.10%7C3.11-blue">
<img src="https://img.shields.io/badge/Python-3.7%7C3.8%7C3.9%7C3.10%7C3.11-blue"
alt="Python Version">
<a href="https://github.com/psf/black">
<img src="https://img.shields.io/badge/code%20style-black-000000.svg"
alt="Format Version">
<a href="https://github.com/pre-commit/pre-commit">
<img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white"
alt="pre commit">
</br>
<a href="https://www.docker.com">
<img src="https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white"
alt="Docker">
<a href="https://www.commonwl.org">
<img src="https://img.shields.io/badge/cwltool-red?style=for-the-badge&logo=cwltool&logoColor=white"
alt="cwltool">
</div>

<p align="center" style="color:green">
<a href="#about">About</a> •
<a href="#requirements">Requirements</a> •
<a href="#installation">Installation</a> •
<a href="#usage">Usage</a> •
<a href="#license">License</a>
</p>

# About

The HuBMAP scRNA-seq pipeline is built on Salmon, Scanpy, and scVelo, and is
implemented as a CWL workflow wrapping command-line tools encapsulated in
Docker containers.

# Requirements

- 28Gbs of RAM
- Docker

We require [Docker](https://www.docker.com/) to run the pipeline.

Once Docker is installed run the Docker Daemon. On Linux, this is typically
done by running ``sudo dockerd``. On Mac, this is done by clicking the Docker GUI app. If you are using a M1 or newer silicon Mac, add ``export DOCKER_DEFAULT_PLATFORM=linux/amd64`` to your ``.zshrc`` file to avoid docker warnings and possible errors.

# Installation

Clone the repository and install the requirements. The ``master`` branch and ``latest`` published Docker images may not always
be in sync; checking out a version like ``v2.0.6`` is *highly* recommended
before running the pipeline, unless building Docker images locally.

```bash
git clone https://github.com/tmsincomb/salmon-rnaseq.git
cd salmon-rnaseq
pip install -e .
```

# Usage
```bash
salmon-rnaseq --help
salmon-rnaseq --assay ASSAY --fastq_dir FASTQ_DIR --threads THREADS -o OUTPUT_DIR
```

Supported assays:

* ``10x_v2`` (single-cell)
* ``10x_v2_sn`` (single-nucleus)
* ``10x_v3`` (single-cell)
* ``10x_v3_sn`` (single-nucleus)
* ``snareseq``
* ``sciseq``
* ``slideseq``

# License

[![License](https://img.shields.io/github/license/hubmapconsortium/salmon-rnaseq)](https://github.com/hubmapconsortium/salmon-rnaseq/blob/main/LICENSE)

Copyright © HuBMAP
45 changes: 0 additions & 45 deletions README.rst

This file was deleted.

4 changes: 2 additions & 2 deletions bin/analysis/adjust_barcodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
from pathlib import Path
from typing import Iterable

import manhole

import correct_snareseq_barcodes
import expand_sciseq_barcodes
import extract_slideseq_barcodes
import manhole

from common import ADJ_OUTPUT_DIR, Assay

adj_funcs = {
Expand Down
4 changes: 2 additions & 2 deletions bin/analysis/annotate_cells.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
from pathlib import Path
from typing import Optional, Sequence

import add_slideseq_coordinates
import anndata
import annotate_sciseq_barcodes
import manhole

import add_slideseq_coordinates
import annotate_sciseq_barcodes
from common import Assay

H5AD_PATH = Path("expr.h5ad")
Expand Down
2 changes: 1 addition & 1 deletion bin/analysis/fastqc_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def single_file_fastqc(fastq_file_and_subdir: Tuple[Path, Path]):
"""
command = [piece.format(out_dir=fastq_file_and_subdir[1]) for piece in FASTQC_COMMAND_TEMPLATE]
command.append(fspath(fastq_file_and_subdir[0]))
print("Running", " ".join(command))
print("Running:", " ".join(command))
check_call(command)


Expand Down
2 changes: 1 addition & 1 deletion bin/analysis/scanpy_entry_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import manhole
import matplotlib.pyplot as plt
import scanpy as sc
from plot_utils import new_plot

from common import Assay
from plot_utils import new_plot


def main(assay: Assay, h5ad_file: Path):
Expand Down
1 change: 0 additions & 1 deletion bin/analysis/scvelo_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import scanpy as sc
import scipy.sparse
import scvelo as scv

from plot_utils import new_plot

component_neighbor_count = 50
Expand Down
4 changes: 2 additions & 2 deletions bin/salmon/bulk_salmon_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def main(threads: int, directory: Path):

fastq_extension = [
"-1",
fspath(r1_fastq_file),
str(fspath(r1_fastq_file)),
"-2",
fspath(r2_fastq_file),
str(fspath(r2_fastq_file)),
]

command.extend(fastq_extension)
Expand Down
Loading