Skip to content

Commit

Permalink
Merge pull request #4 from druvus/master
Browse files Browse the repository at this point in the history
Packing the code
  • Loading branch information
rozovr authored Feb 13, 2017
2 parents 59505d1 + 8babdda commit db982e8
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 8 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# Getting Recycler
You can download Recycler [here](https://github.com/Shamir-Lab/Recycler/releases/download/Recycler-v0.6/Recycler-0.6.zip) or clone it via the link below. In case you download the zip, unzip the file before following the instructions below (ignoring the 'git clone' line)

# Installation
To install Recycler and scripts follow the following instructions.

git clone https://github.com/rozovr/Recycler.git
python setup.py install


# Quick start

Assuming we have prepared a filtered BAM file (aln-pe.bam) prepared as described [below](#bam-prep) and an isolate assembly graph (e.g., assembly_graph.fastg from [SPAdes 3.6+](http://bioinf.spbau.ru/en/spades)), and that 55 was the maximum k-mer length used by the assembler,

git clone https://github.com/rozovr/Recycler.git
cd Recycler
python recycle.py -g assembly_graph.fastg -k 55 -b aln-pe.bam -i True
recycle.py -g assembly_graph.fastg -k 55 -b aln-pe.bam -i True

For metagenome/plasmidome assemblies, we remove the final ("-i") parameter, which has a default False value.

Expand All @@ -33,7 +38,7 @@ Recommended for generating inputs (as used during testing):

# Detailed usage

python recycle.py -g GRAPH -k MAX_K -b BAM [-l LENGTH] [-m MAX_CV] [-i ISO]
recycle.py -g GRAPH -k MAX_K -b BAM [-l LENGTH] [-m MAX_CV] [-i ISO]

### required arguments:

Expand All @@ -60,7 +65,7 @@ python recycle.py -g GRAPH -k MAX_K -b BAM [-l LENGTH] [-m MAX_CV] [-i ISO]

Recycler uses paired-end alignments of the reads originally assembled to the output assembly graph to filter and select amongst candidate circular sequences. In order to do so, it requires as input a BAM file containing the set of best alignment hits for each read pair. We recommend the following steps (tested on BWA 0.7.5 and samtools 1.19) to prepare the BAM file:

python make_fasta_from_fastg.py -g assembly_graph.fastg
make_fasta_from_fastg.py -g assembly_graph.fastg

bwa index assembly_graph.nodes.fasta

Expand Down
2 changes: 2 additions & 0 deletions get_simple_cycs.py → bin/get_simple_cycs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python

# gets simple (single contig) cycles from
# (usually plasmid) metagenomes, leaves rest of
# graph as is
Expand Down
1 change: 1 addition & 0 deletions make_fasta_from_fastg.py → bin/make_fasta_from_fastg.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
import re, argparse, os
from recycle.utils import readfq

Expand Down
5 changes: 2 additions & 3 deletions recycle.py → bin/recycle.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

#!/usr/bin/env python

import argparse, os
from recycle.utils import *

from recycle import *
import pysam

def parse_user_input():
parser = argparse.ArgumentParser(
Expand Down
18 changes: 18 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from setuptools import setup

setup(name='recycler',
version='0.6',
description='Recycler: an algorithm for detecting plasmids from de novo assembly graphs',
url='https://github.com/Shamir-Lab/Recycler',
author='Roye Rozov',
author_email = '',
license='BSD-3-Clause',
scripts = ['bin/recycle.py', 'bin/make_fasta_from_fastg.py', 'bin/get_simple_cycs.py'],
packages = ['recycle'],
requires=['python (<3.0)'],
install_requires=[
'networkx',
'pysam',
'nose',
'numpy']
)

0 comments on commit db982e8

Please sign in to comment.