Skip to content

Commit db982e8

Browse files
authored
Merge pull request #4 from druvus/master
Packing the code
2 parents 59505d1 + 8babdda commit db982e8

File tree

5 files changed

+33
-8
lines changed

5 files changed

+33
-8
lines changed

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
# Getting Recycler
22
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)
33

4+
# Installation
5+
To install Recycler and scripts follow the following instructions.
6+
7+
git clone https://github.com/rozovr/Recycler.git
8+
python setup.py install
9+
10+
411
# Quick start
512

613
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,
714

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

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

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

3439
# Detailed usage
3540

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

3843
### required arguments:
3944

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

6166
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:
6267

63-
python make_fasta_from_fastg.py -g assembly_graph.fastg
68+
make_fasta_from_fastg.py -g assembly_graph.fastg
6469

6570
bwa index assembly_graph.nodes.fasta
6671

get_simple_cycs.py renamed to bin/get_simple_cycs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env python
2+
13
# gets simple (single contig) cycles from
24
# (usually plasmid) metagenomes, leaves rest of
35
# graph as is

make_fasta_from_fastg.py renamed to bin/make_fasta_from_fastg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env python
12
import re, argparse, os
23
from recycle.utils import readfq
34

recycle.py renamed to bin/recycle.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
21
#!/usr/bin/env python
32

43
import argparse, os
5-
from recycle.utils import *
6-
4+
from recycle import *
5+
import pysam
76

87
def parse_user_input():
98
parser = argparse.ArgumentParser(

setup.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from setuptools import setup
2+
3+
setup(name='recycler',
4+
version='0.6',
5+
description='Recycler: an algorithm for detecting plasmids from de novo assembly graphs',
6+
url='https://github.com/Shamir-Lab/Recycler',
7+
author='Roye Rozov',
8+
author_email = '',
9+
license='BSD-3-Clause',
10+
scripts = ['bin/recycle.py', 'bin/make_fasta_from_fastg.py', 'bin/get_simple_cycs.py'],
11+
packages = ['recycle'],
12+
requires=['python (<3.0)'],
13+
install_requires=[
14+
'networkx',
15+
'pysam',
16+
'nose',
17+
'numpy']
18+
)

0 commit comments

Comments
 (0)