Skip to content

Commit

Permalink
Merge pull request #54 from nf-core/dev
Browse files Browse the repository at this point in the history
Dev > Master
  • Loading branch information
drpatelh authored Feb 7, 2020
2 parents 4c769ec + df0cfac commit f935c04
Show file tree
Hide file tree
Showing 36 changed files with 509 additions and 366 deletions.
Empty file modified .gitattributes
100755 → 100644
Empty file.
Empty file modified .github/CONTRIBUTING.md
100755 → 100644
Empty file.
43 changes: 27 additions & 16 deletions .github/ISSUE_TEMPLATE/bug_report.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,31 +1,42 @@
# nf-core/nanoseq bug report

Hi there!

Thanks for telling us about a problem with the pipeline. Please delete this text and anything that's not relevant from the template below:
Thanks for telling us about a problem with the pipeline.
Please delete this text and anything that's not relevant from the template below:

## Describe the bug

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

#### Steps to reproduce
## Steps to reproduce

Steps to reproduce the behaviour:

1. Command line: `nextflow run ...`
2. See error: _Please provide your error message_

#### Expected behaviour
## Expected behaviour

A clear and concise description of what you expected to happen.

#### System:
- Hardware: [e.g. HPC, Desktop, Cloud...]
- Executor: [e.g. slurm, local, awsbatch...]
- OS: [e.g. CentOS Linux, macOS, Linux Mint...]
- Version [e.g. 7, 10.13.6, 18.3...]
## System

- Hardware: <!-- [e.g. HPC, Desktop, Cloud...] -->
- Executor: <!-- [e.g. slurm, local, awsbatch...] -->
- OS: <!-- [e.g. CentOS Linux, macOS, Linux Mint...] -->
- Version <!-- [e.g. 7, 10.13.6, 18.3...] -->

## Nextflow Installation

- Version: <!-- [e.g. 19.10.0] -->

## Container engine

#### Nextflow Installation:
- Version: [e.g. 0.31.0]
- Engine: <!-- [e.g. Conda, Docker or Singularity] -->
- version: <!-- [e.g. 1.0.0] -->
- Image tag: <!-- [e.g. nfcore/nanoseq:1.0.0] -->

#### Container engine:
- Engine: [e.g. Conda, Docker or Singularity]
- version: [e.g. 1.0.0]
- Image tag: [e.g. nfcore/nanoseq:1.0.0]
## Additional context

#### Additional context
Add any other context about the problem here.
Empty file modified .github/ISSUE_TEMPLATE/feature_request.md
100755 → 100644
Empty file.
Empty file modified .github/PULL_REQUEST_TEMPLATE.md
100755 → 100644
Empty file.
Empty file modified .github/markdownlint.yml
100755 → 100644
Empty file.
Empty file modified .github/workflows/branch.yml
100755 → 100644
Empty file.
39 changes: 23 additions & 16 deletions .github/workflows/ci.yml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,41 @@ on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-18.04
env:
NXF_VER: ${{ matrix.nxf_ver }}
NXF_ANSI_LOG: false
runs-on: ubuntu-latest
strategy:
matrix:
# Nextflow versions: check pipeline minimum and current latest
nxf_ver: ['19.10.0', '']
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Install Nextflow
run: |
export NXF_VER=${{ matrix.nxf_ver }}
export NXF_ANSI_LOG=false
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
#- name: Pull image (Cant pull standard single image for this pipeline as we are using individual BioContainers)
# run: |
# docker pull nfcore/nanoseq:dev && docker tag nfcore/nanoseq:dev nfcore/nanoseq:dev
- name: Default test
- name: Pull docker image
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker
- name: Graphmap2 alignment
docker pull nfcore/nanoseq:dev && docker tag nfcore/nanoseq:dev nfcore/nanoseq:dev
- name: Basecall and demultiplex (minimap2)
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --aligner minimap2
- name: Basecall and demultiplex (graphmap2)
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --aligner graphmap2
- name: Non-barcoded test data
- name: Basecall and no demultiplexing (minimap2)
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test_bc_nodx,docker
- name: No Basecalling and demultiplexing (minimap2)
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test_nobc_dx,docker
- name: No Basecalling and no demultiplexing (minimap2)
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test_nonbc,docker
- name: Skip alignment
nextflow run ${GITHUB_WORKSPACE} -profile test_nobc_nodx,docker
- name: No Basecalling and no demultiplexing (minimap2, skip_alignment)
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test_nonbc,docker --skip_alignment
- name: Skip QC
nextflow run ${GITHUB_WORKSPACE} -profile test_nobc_nodx,docker --skip_alignment
- name: No Basecalling and no demultiplexing (minimap2, skip_alignment, skip_qc)
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test_nonbc,docker --skip_alignment --skip_qc
nextflow run ${GITHUB_WORKSPACE} -profile test_nobc_nodx,docker --skip_alignment --skip_qc
Empty file modified .github/workflows/linting.yml
100755 → 100644
Empty file.
Empty file modified .gitignore
100755 → 100644
Empty file.
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

11 changes: 11 additions & 0 deletions CHANGELOG.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# nf-core/nanoseq: Changelog

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## v1.0dev - [date]

Initial release of nf-core/nanoseq, created with the [nf-core](http://nf-co.re/) template.

### `Added`

### `Fixed`

### `Dependencies`

### `Deprecated`
Empty file modified CODE_OF_CONDUCT.md
100755 → 100644
Empty file.
6 changes: 1 addition & 5 deletions Dockerfile
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
FROM nfcore/base:1.7
FROM nfcore/base:1.8
LABEL authors="Chelsea Sawyer" \
description="Docker image containing all software requirements for the nf-core/nanoseq pipeline"

## THIS DOCKER FILE ISNT REQUIRED FOR PIPELINE
## ALL DOCKER CONTAINERS ARE CURRENTLY OBTAINED FROM EXTERNAL SOURCES
## WAITING FOR LINT TESTS TO BE UPDATED BEFORE DELETING IT

# Install the conda environment
COPY environment.yml /
RUN conda env create -f /environment.yml && conda clean -a
Expand Down
Empty file modified LICENSE
100755 → 100644
Empty file.
21 changes: 12 additions & 9 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
# ![nfcore/nanoseq](docs/images/nf-core-nanoseq_logo.png)

[![Build Status](https://travis-ci.com/nf-core/nanoseq.svg?branch=master)](https://travis-ci.com/nf-core/nanoseq)
**A pipeline to demultiplex, QC and map Nanopore data**.

[![GitHub Actions CI Status](https://github.com/nf-core/nanoseq/workflows/nf-core%20CI/badge.svg)](https://github.com/nf-core/nanoseq/actions)
[![GitHub Actions Linting Status](https://github.com/nf-core/nanoseq/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/nanoseq/actions)
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A519.10.0-brightgreen.svg)](https://www.nextflow.io/)
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg)](http://bioconda.github.io/)
[![Docker](https://img.shields.io/docker/automated/nfcore/nanoseq.svg)](https://hub.docker.com/r/nfcore/nanoseq)

## Introduction

**nfcore/nanoseq** is a bioinformatics analysis pipeline that can be used to demultiplex, QC and map Nanopore data.
**nfcore/nanoseq** is a bioinformatics analysis pipeline that can be used to perform basecalling, demultiplexing, mapping and QC of Nanopore data.

The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It comes with docker containers making installation trivial and results highly reproducible.

## Pipeline Summary

1. Basecalling, barcoding and adapter trimming ([`Guppy`](https://nanoporetech.com/nanopore-sequencing-data-analysis); *optional*)
* Sequencing QC ([`pycoQC`](https://github.com/a-slide/pycoQC), [`NanoPlot`](https://github.com/wdecoster/NanoPlot))
2. FastQ QC ([`NanoPlot`](https://github.com/wdecoster/NanoPlot), [`FastQC`](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/))
3. Alignment ([`GraphMap2`](https://github.com/lbcb-sci/graphmap2) or [`minimap2`](https://github.com/lh3/minimap2))
1. Basecalling and/or demultiplexing ([`Guppy`](https://nanoporetech.com/nanopore-sequencing-data-analysis) or [`qcat`](https://github.com/nanoporetech/qcat); *optional*)
2. Sequencing QC ([`pycoQC`](https://github.com/a-slide/pycoQC), [`NanoPlot`](https://github.com/wdecoster/NanoPlot))
3. Raw read QC ([`NanoPlot`](https://github.com/wdecoster/NanoPlot), [`FastQC`](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/))
4. Alignment ([`GraphMap2`](https://github.com/lbcb-sci/graphmap2) or [`minimap2`](https://github.com/lh3/minimap2))
* Each sample can be mapped to its own reference genome if multiplexed in this way
* Convert SAM to co-ordinate sorted BAM and obtain mapping metrics ([`SAMtools`](http://www.htslib.org/doc/samtools.html))
4. Create bigWig ([`BEDTools`](https://github.com/arq5x/bedtools2/), [`bedGraphToBigWig`](http://hgdownload.soe.ucsc.edu/admin/exe/)) and bigBed ([`BEDTools`](https://github.com/arq5x/bedtools2/), [`bedToBigBed`](http://hgdownload.soe.ucsc.edu/admin/exe/)) coverage tracks for visualisation
5. Present QC for alignment results ([`MultiQC`](https://multiqc.info/docs/))
5. Create bigWig ([`BEDTools`](https://github.com/arq5x/bedtools2/), [`bedGraphToBigWig`](http://hgdownload.soe.ucsc.edu/admin/exe/)) and bigBed ([`BEDTools`](https://github.com/arq5x/bedtools2/), [`bedToBigBed`](http://hgdownload.soe.ucsc.edu/admin/exe/)) coverage tracks for visualisation
6. Present QC for alignment results ([`MultiQC`](https://multiqc.info/docs/))

## Quick Start

Expand All @@ -42,7 +45,7 @@ iv. Start running your own analysis!
nextflow run nf-core/nanoseq \
--input samplesheet.csv \
--protocol DNA \
--run_dir ./fast5/ \
--input_path ./fast5/ \
--flowcell FLO-MIN106 \
--kit SQK-LSK109 \
--barcode_kit SQK-PBK004 \
Expand Down
Empty file modified assets/email_template.html
100755 → 100644
Empty file.
Empty file modified assets/email_template.txt
100755 → 100644
Empty file.
Empty file modified assets/multiqc_config.yaml
100755 → 100644
Empty file.
Empty file modified assets/sendmail_template.txt
100755 → 100644
Empty file.
10 changes: 0 additions & 10 deletions bin/check_samplesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
## REQUIRED PARAMETERS
argParser.add_argument('DESIGN_FILE_IN', help="Input design file.")
argParser.add_argument('DESIGN_FILE_OUT', help="Output design file.")

## OPTIONAL PARAMETERS
argParser.add_argument('-sd', '--skip_demultiplexing', dest="SKIP_DEMULTIPLEXING", help="Whether demultipexing is to be performed (default: False).",action='store_true')
args = argParser.parse_args()

############################################
Expand Down Expand Up @@ -119,13 +116,6 @@
fin.close()
break

if args.SKIP_DEMULTIPLEXING:
if len(outLines) != 1:
print("{}: Only a single-line can be specified in samplesheet without barcode information!".format(ERROR_STR))
sys.exit(1)
## USE SAMPLE NAME AS BARCODE WHEN NOT DEMULTIPLEXING
outLines[0][2] = outLines[0][0]

## WRITE TO FILE
fout = open(args.DESIGN_FILE_OUT,'w')
fout.write(','.join(['sample', 'fastq', 'barcode', 'genome', 'gtf', 'is_transcripts']) + '\n')
Expand Down
100 changes: 100 additions & 0 deletions bin/markdown_to_html.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#!/usr/bin/env python
from __future__ import print_function
import argparse
import markdown
import os
import sys

def convert_markdown(in_fn):
input_md = open(in_fn, mode="r", encoding="utf-8").read()
html = markdown.markdown(
"[TOC]\n" + input_md,
extensions = [
'pymdownx.extra',
'pymdownx.b64',
'pymdownx.highlight',
'pymdownx.emoji',
'pymdownx.tilde',
'toc'
],
extension_configs = {
'pymdownx.b64': {
'base_path': os.path.dirname(in_fn)
},
'pymdownx.highlight': {
'noclasses': True
},
'toc': {
'title': 'Table of Contents'
}
}
)
return html

def wrap_html(contents):
header = """<!DOCTYPE html><html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<style>
body {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
padding: 3em;
margin-right: 350px;
max-width: 100%;
}
.toc {
position: fixed;
right: 20px;
width: 300px;
padding-top: 20px;
overflow: scroll;
height: calc(100% - 3em - 20px);
}
.toctitle {
font-size: 1.8em;
font-weight: bold;
}
.toc > ul {
padding: 0;
margin: 1rem 0;
list-style-type: none;
}
.toc > ul ul { padding-left: 20px; }
.toc > ul > li > a { display: none; }
img { max-width: 800px; }
pre {
padding: 0.6em 1em;
}
h2 {
}
</style>
</head>
<body>
<div class="container">
"""
footer = """
</div>
</body>
</html>
"""
return header + contents + footer


def parse_args(args=None):
parser = argparse.ArgumentParser()
parser.add_argument('mdfile', type=argparse.FileType('r'), nargs='?',
help='File to convert. Defaults to stdin.')
parser.add_argument('-o', '--out', type=argparse.FileType('w'),
default=sys.stdout,
help='Output file name. Defaults to stdout.')
return parser.parse_args(args)

def main(args=None):
args = parse_args(args)
converted_md = convert_markdown(args.mdfile.name)
html = wrap_html(converted_md)
args.out.write(html)

if __name__ == '__main__':
sys.exit(main())
Loading

0 comments on commit f935c04

Please sign in to comment.