-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from nf-core/dev
Assembly/Binning
- Loading branch information
Showing
27 changed files
with
1,143 additions
and
608 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ work/ | |
results/ | ||
.DS_Store | ||
tests/test_data | ||
.vscode | ||
db/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
FROM nfcore/base | ||
======= | ||
MAINTAINER Hadrien Gourlé <[email protected]> | ||
|
||
LABEL maintainer="Hadrien Gourlé <[email protected]>" | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,10 @@ Bootstrap:docker | |
======= | ||
MAINTAINER Hadrien Gourlé <[email protected]> | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Oops, something went wrong.