Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kelly-sovacool authored Aug 14, 2023
0 parents commit 61c480a
Show file tree
Hide file tree
Showing 35 changed files with 1,244 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4

[*.{yml,yaml}]
indent_style = space
indent_size = 2
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.config linguist-language=nextflow
*.nf.test linguist-language=nextflow
modules/nf-core/** linguist-generated
subworkflows/nf-core/** linguist-generated
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior; if applicable, add screenshots to help explain your problem:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/enchancement_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Enhancement request
about: Suggest an additional component to an already existing feature
title: ""
labels: ""
assignees: ""
---

**Describe what enhancement you'd like to see.**
A clear and concise description of what you'd like to add, specifically to what already existing feature. Ex. I am using a new reference, and I'd love to see this reference included [...]

**Additional context**
Add any other context or screenshots about the feature request here.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen. If there are alternative solutions or features you've considered, please include these!
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---

name: Pull Request report
about: Create a Pull Request for the pipeline
title: ''
labels: ''
assignees: ''

**Overview of the Request**
Provide a summary of what is included in this Pull Request

**Issues**
Reference any issues that were included in this request.

**Reviewers**
Use the @ feature to mention anyone responsible for reviewing/completing this request.

## Checklist

(~Strikethrough~ any points that are not applicable.)

- [ ] Write unit tests for any new features or bug fixes.
- [ ] Update docs if there are any API changes.
- [ ] Update the changelog if this includes any user-facing changes.
17 changes: 17 additions & 0 deletions .github/workflows/build_mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: mkdocs_build
on:
workflow_dispatch:
push:
paths:
- "docs/**"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- run: pip install --upgrade pip
- run: pip install -r docs/requirements.txt
- run: mkdocs gh-deploy --force
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

# nextflow
.nextflow*
work/
data/
results/
/nextflow.config
/params.yaml

# python packaging
*.pyc
*.egg-info

# macOS
.DS_Store
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.2.3
hooks:
- id: check-added-large-files
#- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
# spell check
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
# Python formatting
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
# R formatting
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.1.2
hooks:
- id: style-files
# general linting
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.7.1"
hooks:
- id: prettier
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
overrides:
- files: "*.md"
options:
tabWidth: 2
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023, CCR Collaborative Bioinformatics Resource

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include LICENSE
recursive-include src *
78 changes: 78 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Nextflow Template

CCBR template for creating Nextflow pipelines

This template takes inspiration from nektool[^1] and the nf-core template. If you plan to contribute your pipeline to nf-core, don't use this template -- instead follow their instructions[^2].

[^1]: nektool https://github.com/beardymcjohnface/nektool
[^2]: instructions for nf-core pipelines https://nf-co.re/docs/contributing/tutorials/creating_with_nf_core

## Getting started

1. Create a new repository from this template using either of these options:
- [**The GitHub web interface**](https://github.com/CCBR/CCBR_NextflowTemplate):
Click "Use this template" and "Create a new repository", then choose an owner (CCBR) and the repository name as the new tool's name.
- [**The GitHub command line interface**](https://cli.github.com/):
```sh
gh repo create CCBR/TOOL_NAME \
--description "One-line description of your tool" \
--public \
--template CCBR/CCBR_NextflowTemplate \
--confirm
```
1. Change all instances of `TOOL_NAME` throughout the repo with the actual tool name. Places include:
- `docs/CHANGELOG.md`
- `mkdocs.yml`
- `README.md`
- `pyproject.toml`
- `src/TOOL_NAME`
- `src/TOOL_NAME/CITATION`
- `src/TOOL_NAME/__main__.py`
1. Edit `pyproject.toml` with correct information for your tool. You will likely need to change:
- author names and emails
- dependencies
- project URLs
1. Write your nextflow workflow in `src/TOOL_NAME/workflow`.
1. Write your documentation in `docs/` and enable GitHub Pages.
- In settings, go to General > Pages and select the `gh-pages` branch.
mkdocs will build your site under the `gh-pages` branch, and GitHub Pages will make it available at `https://ccbr.github.io/TOOL_NAME`.

You can look for instances of `TOOL_NAME` in case you missed any with grep:

```sh
grep -r "TOOL_NAME" *
```

## Usage

Install the tool in edit mode:

```sh
pip3 install -e .
```

Run the example

```sh
TOOL_NAME run --input "Hello world"
```

## Maintaining your tool

### Use pre-commit hooks

Pre-commit can automatically format your code, check for spelling errors, etc. every time you commit.

Install [pre-commit](https://pre-commit.com/#installation) if you haven't already,
then run `pre-commit install` to install the hooks specified in `.pre-commit-config.yaml`.
Pre-commit will run the hooks every time you commit.
### Versions
Increment the version number following semantic versioning[^3] in `src/TOOL_NAME/VERSION`
[^3]: semantic versioning guidelines https://semver.org/
### Changelog
Keep the changelog up to date with any user-facing changes in `docs/CHANGELOG.md`
18 changes: 18 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## TOOL_NAME v0.1.0.apha

### API-breaking changes

- change 1
- example 2

### New features

- new feat 1

### Bug fixes

- description of bug fixed

## TOOL_NAME v0.1.0

This is the first release of TOOL_NAME 🎉
5 changes: 5 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Information on who the pipeline was developed for, and a statement if it's only been tested on Biowulf. For example:

It has been developed and tested solely on NIH [HPC Biowulf](https://hpc.nih.gov/).

Also include a workflow image to summarize the pipeline.
10 changes: 10 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#https://pypi.org/project/mkdocs-git-revision-date-localized-plugin/
mkdocs-git-revision-date-localized-plugin==1.2.0
#https://pypi.org/project/mkdocs-minify-plugin/
mkdocs-minify-plugin==0.6.4
#https://pypi.org/project/mkdocs-git-revision-date-plugin/
mkdocs-git-revision-date-plugin==0.3.2
#https://pypi.org/project/mkdocs-material/
mkdocs-material==9.1.6
#https://pypi.org/project/mkdocs-material-extensions/
mkdocs-material-extensions==1.1.1
9 changes: 9 additions & 0 deletions docs/user-guide/contributions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Should include a list of all contributors, including GitHub handles when appropriate. In addition, a statement of who contributed to the source code specifically, identified by initials. An example is included below.

# Contributions

The following members contributed to the development of the CARLISLE pipeline:

- [Samantha Sevilla](https://github.com/slsevilla)

SS contributed to the generating the source code and all members contributed to the main concepts and analysis.
48 changes: 48 additions & 0 deletions docs/user-guide/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
This should set the stage for all of the pipeline requirements. Examples are listed below.

# Overview

The CARLISLE github repository is stored locally, and will be used for project deployment. Multiple projects can be deployed from this one point simultaneously, without concern.

## 1. Getting Started

## 1.1 Introduction

The CARLISLE Pipelie beings with raw FASTQ files and performs trimming followed by alignment using [BOWTIE2](https://bowtie-bio.sourceforge.net/bowtie2/index.shtml). Data is then normalized through either the use of an user-species species (IE E.Coli) spike-in control or through the determined library size. Peaks are then called using [MACS2](https://hbctraining.github.io/Intro-to-ChIPseq/lessons/05_peak_calling_macs.html), [SEACR](https://github.com/FredHutch/SEACR), and [GoPEAKS](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-022-02707-w) with various options selected by the user. Peaks are then annotated, and summarized into reports. If designated, differential analysis is performed using [DESEQ2](https://bioconductor.org/packages/release/bioc/html/DESeq2.html). QC reports are also generated with each project using [FASTQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/) and [MULTIQC](https://multiqc.info/). Annotations are added using [HOMER](http://homer.ucsd.edu/homer/ngs/annotation.html) and [ROSE](https://github.com/stjude/ROSE). GSEA Enrichment analysis predictions are added using [CHIPENRICH](https://bioconductor.org/packages/devel/bioc/vignettes/chipenrich/inst/doc/chipenrich-vignette.html).

The following are sub-commands used within CARLISLE:

- initialize: initialize the pipeline
- dryrun: predict the binding of peptides to any MHC molecule
- cluster: execute the pipeline on the Biowulf HPC
- local: execute a local, interactive, session
- git: execute GitHub actions
- unlock: unlock directory
- DAG: create DAG report
- report: create SNAKEMAKE report
- testrun: copies test manifests and files to WORKDIR

## 1.2 Setup Dependencies

CARLISLE has several dependencies listed below. These dependencies can be installed by a sysadmin. All dependencies will be automatically loaded if running from Biowulf.

- bedtools: "bedtools/2.30.0"
- bedops: "bedops/2.4.40"

## 1.3 Login to the cluster

CARLISLE has been exclusively tested on Biowulf HPC. Login to the cluster's head node and move into the pipeline location.

```
# ssh into cluster's head node
ssh -Y [email protected]
```

## 1.4 Load an interactive session

An interactive session should be started before performing any of the pipeline sub-commands, even if the pipeline is to be executed on the cluster.

```
# Grab an interactive node
sinteractive --time=12:00:00 --mem=8gb --cpus-per-task=4 --pty bash
```
Loading

0 comments on commit 61c480a

Please sign in to comment.