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

Assembly/Binning #5

Merged
merged 56 commits into from
Jan 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
9da96c3
fix version
HadrienG Oct 1, 2018
73336a1
make travis happy before building the actual pipeline
HadrienG Oct 3, 2018
1d62dda
add logo
maxulysse Oct 5, 2018
0cea483
Merge pull request #6 from MaxUlysse/master
ewels Oct 5, 2018
4bd07ba
Update README.md
maxulysse Oct 5, 2018
4d76ddb
Merge pull request #7 from nf-core/MaxUlysse-patch-1
ewels Oct 5, 2018
bcfe9e8
assembly
HadrienG Oct 9, 2018
78851bc
Merge branch 'dev' of https://github.com/nf-core/mag into dev
HadrienG Oct 9, 2018
04374a8
bump nextflow version
HadrienG Oct 9, 2018
b5b65e2
binning
HadrienG Oct 10, 2018
fd1432c
switch to profile for tests
HadrienG Oct 10, 2018
91b0e82
checkm
HadrienG Oct 25, 2018
48dda34
smaller test data
HadrienG Oct 29, 2018
b199582
working minimal test file producing bins
HadrienG Oct 29, 2018
72d876b
tool update
HadrienG Oct 30, 2018
9036e7b
added fastqc
HadrienG Oct 30, 2018
79b51a5
added quast
HadrienG Oct 30, 2018
dc4b80b
checkm plots
HadrienG Oct 30, 2018
8ab82c5
added checkm refine fastp
HadrienG Nov 16, 2018
d0f5800
atropos -> fastp
HadrienG Nov 16, 2018
1137772
check automatic bin merghing
HadrienG Nov 16, 2018
34322fe
into -> from
HadrienG Nov 19, 2018
16f1e73
no need for subdir
HadrienG Nov 19, 2018
0aacffd
fix bin input
HadrienG Nov 19, 2018
8e73342
debug checkm
HadrienG Nov 19, 2018
d9373fb
do not need custome checkm docker anymore
HadrienG Nov 20, 2018
1e521c1
refinem
HadrienG Nov 20, 2018
264bb01
task cpus
HadrienG Nov 20, 2018
cc7f2c9
one-liner works without head (no more SIGPIPE)
HadrienG Nov 23, 2018
9da4600
beter bash quoting + adapter params
HadrienG Nov 23, 2018
72c7a19
more software versions
HadrienG Nov 23, 2018
bf8037b
more fastp options
HadrienG Nov 23, 2018
284e797
single end support
HadrienG Nov 23, 2018
b35dad2
checkm and metabat options
HadrienG Nov 26, 2018
73070b6
refinem
HadrienG Dec 5, 2018
32670c8
refinem filter ssu evalue threshold
HadrienG Dec 6, 2018
fd4f2ea
docs and output names
HadrienG Dec 6, 2018
be8d784
version bump (0.1.0dev -> 0.1.0)
HadrienG Dec 6, 2018
f1089ef
only `dev` exists on docker hub
HadrienG Dec 6, 2018
4cf9893
version number -> 1.0.0
HadrienG Dec 13, 2018
8f0e18d
tag to 1.0.0
HadrienG Dec 13, 2018
c5e1b7b
singularity to 1.0.0
HadrienG Dec 13, 2018
77ae056
submitted missing packages in bioconda
HadrienG Jan 5, 2019
e944841
no pip install
HadrienG Jan 5, 2019
e4641a3
test config
HadrienG Jan 7, 2019
58eb2f5
move checkm db download to main.nf
HadrienG Jan 7, 2019
c9d8462
MAINTAINER is deprecated
HadrienG Jan 7, 2019
4e38a5c
minor docs improvements
HadrienG Jan 14, 2019
1ea62a7
allow loading of custom configs
HadrienG Jan 14, 2019
ba8d1f1
fix checkm db
HadrienG Jan 14, 2019
128eab7
remove singularity hub
HadrienG Jan 15, 2019
247e7a9
move time to base.config
HadrienG Jan 15, 2019
c27f458
remove some old comments
HadrienG Jan 15, 2019
8ad1abb
software versions
HadrienG Jan 17, 2019
afbb384
rename fastqc config
HadrienG Jan 18, 2019
b546498
manifest + moved multiples `into` into processes
HadrienG Jan 18, 2019
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ work/
results/
.DS_Store
tests/test_data
.vscode
db/
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ before_install:
# PRs made to 'master' branch should always orginate from another repo or the 'dev' branch
- '[ $TRAVIS_PULL_REQUEST = "false" ] || [ $TRAVIS_BRANCH != "master" ] || ([ $TRAVIS_PULL_REQUEST_SLUG = $TRAVIS_REPO_SLUG ] && [ $TRAVIS_PULL_REQUEST_BRANCH = "dev" ])'
# Pull the docker image first so the test doesn't wait for this
- docker pull hadrieng/mag
- docker pull nfcore/mag:dev
# Fake the tag locally so that the pipeline runs properly
- docker tag hadrieng/mag hadrieng/mag:0.1.0
- docker tag nfcore/mag:dev nfcore/mag:1.0.0

install:
# Install Nextflow
Expand All @@ -27,11 +27,11 @@ install:
- cd ${TRAVIS_BUILD_DIR}

env:
- NXF_VER=0.30.0 # Specify a minimum NF version that should be tested and work
- NXF_VER='0.32.0' # Specify a minimum NF version that should be tested and work
- NXF_VER='' # Plus: get the latest NF version and check, that it works

script:
# Lint the pipeline code
- nf-core lint ${TRAVIS_BUILD_DIR}
# Run the pipeline with the test profile
- make test
- nextflow run main.nf -profile test,docker
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## nf-core/mag version 1.0.0 -

## nf-core/mag version 0.1.0dev -
Initial release of nf-core/mag, created with the [nf-core](http://nf-co.re/) template.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM nfcore/base
=======
MAINTAINER Hadrien Gourlé <hadrien.gourle@slu.se>

LABEL maintainer="Hadrien Gourlé <hadrien.gourle@slu.se>"
LABEL description="Docker image containing all requirements for nf-core/mag pipeline"

COPY environment.yml /
RUN conda env create -f /environment.yml && conda clean -a
ENV PATH /opt/conda/envs/nf-core-mag-1.0dev/bin:$PATH
ENV PATH /opt/conda/envs/nf-core-mag-1.0.0/bin:$PATH

14 changes: 0 additions & 14 deletions Makefile

This file was deleted.

18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
# [UNDER CONSTRUCTION] nf-core/mag
# ![mag](https://raw.githubusercontent.com/nf-core/mag/master/docs/images/mag_logo.png)

# nf-core/mag

**Assembly, binning and annotation of metagenomes**

[![Build Status](https://travis-ci.org/nf-core/mag.svg?branch=master)](https://travis-ci.org/nf-core/mag)
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A50.30.0-brightgreen.svg)](https://www.nextflow.io/)
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A50.32.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/hadrieng/mag.svg)](https://hub.docker.com/r/hadrieng/mag)
![Singularity Container available](
https://img.shields.io/badge/singularity-available-7E4C74.svg)
![Singularity Container available](https://img.shields.io/badge/singularity-available-7E4C74.svg)

### Introduction
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 / singularity containers making installation trivial and results highly reproducible.

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 / singularity containers making installation trivial and results highly reproducible.

### Documentation

The nf-core/mag pipeline comes with documentation about the pipeline, found in the `docs/` directory:

1. [Installation](docs/installation.md)
2. Pipeline configuration
* [Local installation](docs/configuration/local.md)
* [Adding your own system](docs/configuration/adding_your_own.md)
- [Local installation](docs/configuration/local.md)
- [Adding your own system](docs/configuration/adding_your_own.md)
3. [Running the pipeline](docs/usage.md)
4. [Output and how to interpret the results](docs/output.md)
5. [Troubleshooting](docs/troubleshooting.md)

### Credits

This pipeline was written by [Hadrien Gourlé](https://hadriengourle.com) at [SLU](https://slu.se).
4 changes: 2 additions & 2 deletions Singularity
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Bootstrap:docker
=======
MAINTAINER Hadrien Gourlé <hadrien.gourle@slu.se>
DESCRIPTION Singularity image containing all requirements for nf-core/mag pipeline
VERSION 0.1.0
VERSION 1.0.0

%environment
PATH=/opt/conda/envs/nf-core-mag-1.0dev/bin:$PATH
PATH=/opt/conda/envs/nf-core-mag-1.0.0/bin:$PATH
export PATH

%files
Expand Down
61 changes: 61 additions & 0 deletions bin/filter_ssu.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/usr/bin/env python

from __future__ import print_function

import os
import sys
import argparse


def filter(args):
"""filter blast hits from refinem

Args:
args (obj): arguments from argparse
"""
with open(args.ssu, "r") as i, open(args.output, "w") as o:
header = i.readline()
for line in i:
splitted_line = line.split()
evalue = splitted_line[7]
align_length = splitted_line[8]
percent_ident = splitted_line[9]

if int(evalue) <= args.evalue:
o.write(line)
else:
continue


def main():
parser = argparse.ArgumentParser(
prog="filter_ssu.py",
usage="filter ssu hits from refinem"
)
parser.add_argument(
"--evalue",
help="evalue threshold"
)
parser.add_argument(
"ssu",
metavar="ssu.tsv",
help="ssu tsv file generated by refinem"
)
parser.add_argument(
"output",
metavar="output.tsv",
default="output.tsv",
help="output file name"
)
parser.set_defaults(func=filter)
args = parser.parse_args()

try:
args.func(args)
except AttributeError as e:
parser.print_help()
raise


if __name__ == "__main__":
main()
Loading