Skip to content

Commit c7aab36

Browse files
committed
init. v1.2.2, which is used for paper submission.
0 parents  commit c7aab36

932 files changed

Lines changed: 409648 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
CXX = g++
2+
3+
MAIN = meta_platanus.pl
4+
SUBDIRS = src/minimap2 src/meta_platanus src/meta_platanus_phase src/megahit src/samtools src/bwa
5+
SUBBIN = sub_bin
6+
7+
.PHONY:all clean $(SUBDIRS) $(SUBBIN)
8+
9+
10+
all: $(MAIN) $(SUBDIRS) $(SUBBIN)
11+
12+
$(MAIN):
13+
14+
src/samtools:
15+
cd src/samtools && ./configure
16+
17+
$(SUBDIRS):
18+
$(MAKE) -C $@
19+
20+
$(SUBBIN):
21+
mkdir -p $(SUBBIN)
22+
cp src/meta_platanus/meta_platanus $(SUBBIN)
23+
cp src/meta_platanus_phase/meta_platanus_phase $(SUBBIN)
24+
cp src/minimap2/minimap2 $(SUBBIN)
25+
cp src/megahit/megahit* $(SUBBIN)
26+
cp src/samtools/samtools $(SUBBIN)
27+
cp src/bwa/bwa $(SUBBIN)
28+
cp src/scripts/*.pl src/scripts/*.pm $(SUBBIN)
29+
cp pre_built_bin/metabat/metabat2 $(SUBBIN)
30+
cp pre_built_bin/metabat/jgi_summarize_bam_contig_depths $(SUBBIN)
31+
32+
clean:
33+
rm -rf $(SUBBIN)
34+
cd src/meta_platanus && make clean
35+
cd src/meta_platanus_phase && make clean
36+
cd src/minimap2 && make clean
37+
cd src/megahit && make clean
38+
cd src/samtools && make clean
39+
cd src/bwa&& make clean
40+
# $(MAKE) clean -C $(SUBDIRS)

README.md

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
# MetaPlatanus README.md
2+
3+
## Description
4+
MetaPlatanus is a de novo assembler for metagenome (microbiome). The features of this tool are as follows:
5+
(1) It can utilize various types of long-range information such as mate-pairs (jumping libraries), Oxford-Nanopore/PacBio long reads and 10x linked reads (barcoded reads).
6+
(2) Coverage depths, k-mer frequencies and results of the binning tool are also employed to extend sequences and correct mis-assemblies.
7+
(3) Contig-assembly, scaffolding, gap-closing and binning are automatically executed at once.
8+
(4) As the other mode, haplotypes (strain genomes) in a metagenome can be distinguished and constructed.
9+
(5) MetaPlatanus requires at least one short-read paired-end library.
10+
11+
12+
## Version
13+
v1.2.2
14+
15+
## Web site
16+
<http://platanus.bio.titech.ac.jp/>
17+
18+
## Author
19+
Rei Kajitani at Tokyo Institute of Technology wrote key source codes.
20+
Address for this tool: <platanus@bio.titech.ac.jp>
21+
22+
23+
## Dependency (the tools below are included in this package)
24+
* Minimap2
25+
- <https://github.com/lh3/minimap2>
26+
- Only required to use Oxford-Nanopore/PacBio long reads.
27+
- v2.17-r943
28+
29+
* BWA
30+
- <http://bio-bwa.sourceforge.net/>
31+
- v0.7.17-r1194
32+
33+
* MEGAHIT
34+
- <https://github.com/voutcn/megahit>
35+
- v1.1.3
36+
37+
* MetaBAT2
38+
- <https://bitbucket.org/berkeleylab/metabat>
39+
- v2.12.1
40+
41+
* SAMtools
42+
- <http://www.htslib.org/>
43+
- v1.3.1
44+
45+
46+
## Installation
47+
Currently MetaPlatanus can be executed in Linux.
48+
To compile (build), just type "make".
49+
```
50+
make
51+
```
52+
53+
The main program is "meta_platanus.pl".
54+
Note that the directory "sub_bin", which consists of Perl-scripts and other tools, should be specified (-sub_bin option) or put in the same directory of meta_platanus.pl.
55+
There are four ways to execute meta_platanus.pl.
56+
Below, "build-directory" means the directory where you typed "make" and it consists of meta_platanus.pl and sub_bin.
57+
58+
(1) Directly type the path to build meta_platanus.pl.
59+
```
60+
/build-directory/mata_platanus.pl ...
61+
```
62+
63+
(2) Add the build-directory to PATH.
64+
```
65+
export PATH=/build-directory/:$PATH
66+
meta_platanus.pl ...
67+
```
68+
69+
(3) Copy meta_platanus.pl and sub_bin to a directory listed in PATH (e.g. $HOME/bin).
70+
```
71+
cp -r sub_bin meta_platanus.pl $HOME/bin
72+
meta_platanus.pl ...
73+
```
74+
75+
(3) Copy meta_platanus.pl to a directory listed in PATH, and use the "-sub_bin" option.
76+
```
77+
cp meta_platanus.pl $HOME/bin
78+
meta_platanus.pl [command] -sub_bin /build-directory/sub_bin ...
79+
```
80+
81+
82+
## Synopsis of consensus assembly
83+
### Inputs
84+
* Illumina paired-end: PE_1.fq PE_2.fq (mandatory)
85+
* Illumina mate-pair: MP_1.fq MP_2.fq (optional)
86+
* Oxford Nanopor long-reads: ONT.fq (optional)
87+
88+
### Commands
89+
```
90+
meta_platanus.pl cons_asm -IP1 PE_1.fq PE_2.fq -OP2 MP_1.fq MP_2.fq -ont ONT.fq >log.txt 2>&1
91+
```
92+
93+
### Final output
94+
out_finalClusters_all.fa
95+
out_finalClusters (directory)
96+
97+
98+
## Synopsis of haplotype-phasing assembly
99+
### Inputs
100+
* Illumina paired-end: PE_1.fq PE_2.fq (mandatory)
101+
* Illumina mate-pair: MP_1.fq MP_2.fq (optional)
102+
* Oxford Nanopor long-reads: ONT.fq (optional)
103+
104+
### Commands
105+
```
106+
meta_platanus.pl phase_asm -IP1 PE_1.fq PE_2.fq -OP2 MP_1.fq MP_2.fq -ont ONT.fq >log.txt 2>&1
107+
```
108+
109+
### Final output
110+
out_allPhasedBlock.fa (including sequences below)
111+
out_primaryBubble.fa
112+
out_secondaryBubble.fa
113+
out_nonBubbleOther.fa
114+
...
115+
116+
117+
118+
---
119+
## Consensus assembly usage
120+
### Command
121+
```
122+
meta_platanus.pl cons_asm -IP1 short_R1.fastq(a) short_R2.fastq(a) [Options] ...
123+
```
124+
125+
### Options
126+
```
127+
-IP{INT} FWD1 REV1 [FWD2 REV2 ...] : lib_id inward_pair_files (reads in 2 files, fasta or fastq; at least one library required)
128+
-OP{INT} FWD1 REV1 [FWD2 REV2 ...] : lib_id outward_pair_files (reads in 2 files, fasta or fastq; aka mate-pairs or jumping-library)
129+
-binning_IP{INT} FWD1 REV1 ... : lib_id inward_pair_files for binning process. (reads in 2 files, fasta or fastq; the data are usually from another sample)
130+
-p FILE1 [FILE2 ...] : PacBio long-read file (fasta or fastq)
131+
-ont FILE1 [FILE2 ...] : Oxford Nanopore long-read file (fasta or fastq)
132+
-x PAIR1 [PAIR2 ...] : barcoded_pair_files (10x Genomics) (reads in 1 file, interleaved, fasta or fastq)
133+
-X FWD1 REV1 [FWD2 REV2 ...] : barcoded_pair_files (10x Genomics) (reads in 2 files, fasta or fastq)
134+
-t INT : number of threads (<= 1; default, 1)
135+
-m INT : memory limit for making kmer distribution (unit, GB; default, 0.75 * available_memory))
136+
-o STR : prefix of output files (default "out")
137+
-tmp DIR : directory for temporary files (default, ".")
138+
-sub_bin DIR : directory for sub-executables, such as mata_plantaus and minimap2 (default, directory-of-this-script/sub_bin)
139+
-megahit_min_len : minimum length of contigs of MEGAHIT (default, 500)
140+
-overwrite : overwrite the previous results, not re-start (default, off)
141+
-h, -help : display usage
142+
```
143+
144+
145+
### Outputs:
146+
PREFIX_finalClusters_all.fa
147+
PREFIX_finalClusters (directory
148+
149+
PREFIX is specified by -o
150+
151+
152+
## Assemble each haplotype in a metanogme (phasing)
153+
### Command
154+
```sh
155+
meta_platanus.pl phase_asm -IP1 short_R1.fastq(a) short_R2.fastq(a) [Options] ...
156+
```
157+
158+
### Options
159+
```
160+
-IP{INT} FWD1 REV1 [FWD2 REV2 ...] : lib_id inward_pair_files (reads in 2 files, fasta or fastq; at least one library required)
161+
-OP{INT} FWD1 REV1 [FWD2 REV2 ...] : lib_id outward_pair_files (reads in 2 files, fasta or fastq; aka mate-pairs or jumping-library)
162+
-p FILE1 [FILE2 ...] : PacBio long-read file (fasta or fastq)
163+
-ont FILE1 [FILE2 ...] : Oxford Nanopore long-read file (fasta or fastq)
164+
-x PAIR1 [PAIR2 ...] : barcoded_pair_files (10x Genomics) (reads in 1 file, interleaved, fasta or fastq)
165+
-X FWD1 REV1 [FWD2 REV2 ...] : barcoded_pair_files (10x Genomics) (reads in 2 files, fasta or fastq)
166+
-t INT : number of threads (<= 1; default, 1)
167+
-m INT : memory limit for making kmer distribution (unit, GB; default, 0.75 * available_memory))
168+
-o STR : prefix of output files (default "out")
169+
-tmp DIR : directory for temporary files (default, ".")
170+
-sub_bin DIR : directory for sub-executables, such as mata_plantaus and minimap2 (default, directory-of-this-script/sub_bin)
171+
-overwrite : overwrite the previous results, not re-start (default, off)
172+
-h, -help : display usage
173+
```
174+
175+
176+
### Outputs:
177+
```
178+
PREFIX_allPhasedBlock.fa (including sequences below)
179+
PREFIX_primaryBubble.fa
180+
PREFIX_secondaryBubble.fa
181+
PREFIX_nonBubbleOther.fa
182+
...
183+
```
184+
185+
PREFIX is specified by -o
186+
187+
188+
---
189+
## Notes
190+
* Options related to run time
191+
Although -t (number of threads) of all commands and -m (memory amount) of the "assemble" command are
192+
not mandatory to run, it is recommended to set the values adjusting your machine-environment.
193+
These options may severely effect the run time.
194+
e.g.,
195+
Available number of threads and memory amount are 4 and 16GB, respectively.
196+
-> -t 4 -m 16
197+
198+
* Paired-end (mate-pair) input
199+
The "phase" and "consensus" accept paired-end and/or mate-pair libraries. Paired libraries are
200+
classified into "inward-pair" and "outward-pair" according to the sequence direction.
201+
For file formats, separate and interleaved files can be input through -IP (-OP) and -ip (-op)
202+
options, respectively.
203+
204+
Inward-pair (usually called "paired-end", accepted in options "-IP" or "-ip"):
205+
206+
FWD --->
207+
5' -------------------- 3'
208+
3' -------------------- 5'
209+
<--- REV
210+
211+
Outward-pair (usually called "mate-pair", accepted in options "-OP" or "-op"):
212+
213+
---> REV
214+
5' -------------------- 3'
215+
3' -------------------- 5'
216+
FWD <---
217+
218+
Example inputs:
219+
220+
Inward-pair (separate, insert=300) : PE300_1.fq PE300_2.fq
221+
Outward-pair (separate, insert=2k) : MP2k_1.fa MP2k_2.fq
222+
223+
Corresponding options:
224+
225+
-IP1 PE300_1_pair.fq PE300_2.fq \
226+
-OP2 MP2k_1.fq MP2k_2.fq
227+
228+
229+
To utilize multiple-samples data, MetaPlatanus can accept the short-reads
230+
that exclusivelly used for the binning process through -binning-IP# options.
231+
e.g.,
232+
```
233+
meta_platanus.pl cons_asm \
234+
-IP1 sample1_R1.fq sample1_R2.fq \
235+
-binning_IP1 sample1_R1.fq sample1_R2.fq \
236+
-binning_IP2 sample2_R1.fq sample2_R2.fq \
237+
-binning_IP3 sample3_R1.fq sample3_R2.fq \
238+
...
239+
```

0 commit comments

Comments
 (0)