Replidec 0.2.3.1__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {Replidec-0.2.3.1/Replidec.egg-info → replidec-0.3.2}/PKG-INFO +37 -16
- {Replidec-0.2.3.1 → replidec-0.3.2}/README.rst +20 -13
- {Replidec-0.2.3.1 → replidec-0.3.2}/Replidec/Replidec.py +19 -3
- {Replidec-0.2.3.1 → replidec-0.3.2}/Replidec/Replidec_cmdline.py +9 -3
- {Replidec-0.2.3.1 → replidec-0.3.2}/Replidec/Replidec_multi.py +16 -10
- {Replidec-0.2.3.1 → replidec-0.3.2}/Replidec/__init__.py +1 -1
- {Replidec-0.2.3.1 → replidec-0.3.2/Replidec.egg-info}/PKG-INFO +37 -16
- {Replidec-0.2.3.1 → replidec-0.3.2}/setup.cfg +1 -1
- {Replidec-0.2.3.1 → replidec-0.3.2}/setup.py +1 -1
- {Replidec-0.2.3.1 → replidec-0.3.2}/LICENSE +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/MANIFEST.in +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/Replidec/cli.py +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/Replidec/utility.py +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/Replidec.egg-info/SOURCES.txt +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/Replidec.egg-info/dependency_links.txt +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/Replidec.egg-info/entry_points.txt +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/Replidec.egg-info/requires.txt +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/Replidec.egg-info/top_level.txt +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/Replidec.egg-info/zip-safe +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/example.list +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/example.small.list +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/generate.sh +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaaa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaab +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaac +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaad +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaae +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaaf +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaag +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaah +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaai +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaaj +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaak +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaal +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaam +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaan +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaao +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaap +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test/genome.test.fnaaq +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test.index +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/genome_test.small.index +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/mock_data_single_lifestyleBC.py +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.1.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.10.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.11.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.12.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.13.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.14.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.15.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.16.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.17.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.18.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.19.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.2.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.20.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.21.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.22.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.3.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.4.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.5.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.6.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.7.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.8.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/simulate_art_sample1.9.faa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example/test.contig.small.fa +0 -0
- {Replidec-0.2.3.1 → replidec-0.3.2}/test/example.sh +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: Replidec
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Replication Cycle Detector for Phages
|
|
5
5
|
Home-page: https://github.com/deng-lab/Replidec
|
|
6
6
|
Author: Xue Peng
|
|
@@ -15,8 +15,22 @@ Classifier: Intended Audience :: Science/Research
|
|
|
15
15
|
Requires-Python: >=3.8
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
Requires-Dist: biopython>=1.77
|
|
19
|
+
Requires-Dist: future>=0.18.2
|
|
20
|
+
Dynamic: author
|
|
21
|
+
Dynamic: author-email
|
|
22
|
+
Dynamic: classifier
|
|
23
|
+
Dynamic: description
|
|
24
|
+
Dynamic: description-content-type
|
|
25
|
+
Dynamic: home-page
|
|
26
|
+
Dynamic: keywords
|
|
27
|
+
Dynamic: license
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
Dynamic: requires-dist
|
|
30
|
+
Dynamic: requires-python
|
|
31
|
+
Dynamic: summary
|
|
32
|
+
|
|
33
|
+
# Replidec: Replication Cycle Decipher for Phages
|
|
20
34
|
|
|
21
35
|
[](https://pypi.python.org/pypi/Replidec)
|
|
22
36
|
[](https://anaconda.org/denglab/replidec)
|
|
@@ -29,26 +43,26 @@ Use bayes classifier combine with homology search to predict virus replication c
|
|
|
29
43
|
|
|
30
44
|
## Install
|
|
31
45
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
### Method 1: using Docker (recommended)
|
|
46
|
+
### Method 1: using Conda
|
|
35
47
|
|
|
36
48
|
```bash
|
|
37
|
-
|
|
49
|
+
conda create -n replidec
|
|
50
|
+
conda activate replidec
|
|
51
|
+
conda install -c conda-forge -c bioconda replidec
|
|
52
|
+
or
|
|
53
|
+
conda install -c denglab -c conda-forge -c bioconda replidec
|
|
38
54
|
```
|
|
39
55
|
|
|
40
|
-
|
|
56
|
+
### Method 2: using Docker
|
|
41
57
|
|
|
42
58
|
```bash
|
|
43
|
-
|
|
59
|
+
docker pull denglab/replidec
|
|
44
60
|
```
|
|
45
61
|
|
|
46
|
-
|
|
62
|
+
If you want to use `Replidec` on an HPC, singularity is recommended. You can create a singularity image using following command,
|
|
47
63
|
|
|
48
64
|
```bash
|
|
49
|
-
|
|
50
|
-
conda activate replidec
|
|
51
|
-
conda install -c denglab -c conda-forge replidec
|
|
65
|
+
singularity pull replidec.sif docker://denglab/replidec
|
|
52
66
|
```
|
|
53
67
|
|
|
54
68
|
### Method 3: using pip
|
|
@@ -70,9 +84,9 @@ pip3 install Replidec
|
|
|
70
84
|
```
|
|
71
85
|
Replidec [-h] [--version] -p {multiSeqAsOne,batch,multiSeqEachAsOne}
|
|
72
86
|
[-i INPUT_FILE] [-w WORKDIR] [-s SUMMARY] [-t THREADS] [-c HMMER_CRETERIA] [-H HMMER_PARAMETER] [-m MMSEQS_CRETERIA]
|
|
73
|
-
[-M MMSEQS_PARAMETER] [-b BLASTP_CRETERIA] [-B BLASTP_PARAMETER] [-d]
|
|
87
|
+
[-M MMSEQS_PARAMETER] [-b BLASTP_CRETERIA] [-B BLASTP_PARAMETER] [-d] [-D]
|
|
74
88
|
```
|
|
75
|
-
## Usage: database
|
|
89
|
+
## Usage: database (-d & -D)
|
|
76
90
|
|
|
77
91
|
Database used in Replidec will be download automatically.
|
|
78
92
|
|
|
@@ -80,6 +94,13 @@ Location: will be download at the where Replidec installed
|
|
|
80
94
|
|
|
81
95
|
If you want to redownload the database, `-d` parameter can be used. The older database will be mv to "discarded_db" in the workdir(-w); This dir can be removed manually by user.
|
|
82
96
|
|
|
97
|
+
We provide 2 database for user choose. Use -D to choose database. all|prokaryote
|
|
98
|
+
|
|
99
|
+
1. all: This database contain all proteins from the prokaryotic, eukaryotic
|
|
100
|
+
virus and prophage.
|
|
101
|
+
2. prokaryote: This database contain proteins from the prokaryotic virus and
|
|
102
|
+
prophage. eukaryotic virus gene was removed from this database
|
|
103
|
+
|
|
83
104
|
## Usage: Input(-i) and Propgram(-p)
|
|
84
105
|
|
|
85
106
|
**Input file is different base on different program**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Replidec: Replication Cycle
|
|
1
|
+
# Replidec: Replication Cycle Decipher for Phages
|
|
2
2
|
|
|
3
3
|
[](https://pypi.python.org/pypi/Replidec)
|
|
4
4
|
[](https://anaconda.org/denglab/replidec)
|
|
@@ -11,26 +11,26 @@ Use bayes classifier combine with homology search to predict virus replication c
|
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### Method 1: using Docker (recommended)
|
|
14
|
+
### Method 1: using Conda
|
|
17
15
|
|
|
18
16
|
```bash
|
|
19
|
-
|
|
17
|
+
conda create -n replidec
|
|
18
|
+
conda activate replidec
|
|
19
|
+
conda install -c conda-forge -c bioconda replidec
|
|
20
|
+
or
|
|
21
|
+
conda install -c denglab -c conda-forge -c bioconda replidec
|
|
20
22
|
```
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
### Method 2: using Docker
|
|
23
25
|
|
|
24
26
|
```bash
|
|
25
|
-
|
|
27
|
+
docker pull denglab/replidec
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
If you want to use `Replidec` on an HPC, singularity is recommended. You can create a singularity image using following command,
|
|
29
31
|
|
|
30
32
|
```bash
|
|
31
|
-
|
|
32
|
-
conda activate replidec
|
|
33
|
-
conda install -c denglab -c conda-forge replidec
|
|
33
|
+
singularity pull replidec.sif docker://denglab/replidec
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### Method 3: using pip
|
|
@@ -52,9 +52,9 @@ pip3 install Replidec
|
|
|
52
52
|
```
|
|
53
53
|
Replidec [-h] [--version] -p {multiSeqAsOne,batch,multiSeqEachAsOne}
|
|
54
54
|
[-i INPUT_FILE] [-w WORKDIR] [-s SUMMARY] [-t THREADS] [-c HMMER_CRETERIA] [-H HMMER_PARAMETER] [-m MMSEQS_CRETERIA]
|
|
55
|
-
[-M MMSEQS_PARAMETER] [-b BLASTP_CRETERIA] [-B BLASTP_PARAMETER] [-d]
|
|
55
|
+
[-M MMSEQS_PARAMETER] [-b BLASTP_CRETERIA] [-B BLASTP_PARAMETER] [-d] [-D]
|
|
56
56
|
```
|
|
57
|
-
## Usage: database
|
|
57
|
+
## Usage: database (-d & -D)
|
|
58
58
|
|
|
59
59
|
Database used in Replidec will be download automatically.
|
|
60
60
|
|
|
@@ -62,6 +62,13 @@ Location: will be download at the where Replidec installed
|
|
|
62
62
|
|
|
63
63
|
If you want to redownload the database, `-d` parameter can be used. The older database will be mv to "discarded_db" in the workdir(-w); This dir can be removed manually by user.
|
|
64
64
|
|
|
65
|
+
We provide 2 database for user choose. Use -D to choose database. all|prokaryote
|
|
66
|
+
|
|
67
|
+
1. all: This database contain all proteins from the prokaryotic, eukaryotic
|
|
68
|
+
virus and prophage.
|
|
69
|
+
2. prokaryote: This database contain proteins from the prokaryotic virus and
|
|
70
|
+
prophage. eukaryotic virus gene was removed from this database
|
|
71
|
+
|
|
65
72
|
## Usage: Input(-i) and Propgram(-p)
|
|
66
73
|
|
|
67
74
|
**Input file is different base on different program**
|
|
@@ -310,7 +310,8 @@ def checkdb_and_download(scriptPos, redownload=False):
|
|
|
310
310
|
|
|
311
311
|
if not os.path.exists(os.path.join(scriptPos,"db")):
|
|
312
312
|
print("db not exist! download database ...")
|
|
313
|
-
url="https://zenodo.org/record/6975142/files/db_v0.2.3.tar.gz"
|
|
313
|
+
#url="https://zenodo.org/record/6975142/files/db_v0.2.3.tar.gz"
|
|
314
|
+
url="https://zenodo.org/record/8101942/files/db_v0.3.1.tar.gz"
|
|
314
315
|
file=os.path.split(url)[-1]
|
|
315
316
|
cmd = "wget {0} -P {1} && cd {1} && tar -zxvf {2} && rm -rf {2}".format(url, scriptPos, file)
|
|
316
317
|
obj = Popen(cmd,shell=True, stdout=PIPE)
|
|
@@ -322,6 +323,7 @@ def checkdb_and_download(scriptPos, redownload=False):
|
|
|
322
323
|
|
|
323
324
|
|
|
324
325
|
def bayes_classifier_single(inputfile, prefix, wd,
|
|
326
|
+
db_name="prokaryte",
|
|
325
327
|
hmm_creteria=1e-5, mmseqs_creteria=1e-5, blastp_creteria=1e-3,
|
|
326
328
|
blastp_para="-num_threads 3",
|
|
327
329
|
hmmer_para="--noali --cpu 3",
|
|
@@ -382,7 +384,15 @@ def bayes_classifier_single(inputfile, prefix, wd,
|
|
|
382
384
|
|
|
383
385
|
# phase 2 bayes classifier
|
|
384
386
|
# run mmseqs search
|
|
385
|
-
|
|
387
|
+
if db_name == "all":
|
|
388
|
+
print("Using prokaryote and eukaryote protein as DB")
|
|
389
|
+
bc_mmseqsDB = os.path.join(fileDir, "db/bayes_mmseqs_index/all.protein")
|
|
390
|
+
elif db_name == "prokaryote":
|
|
391
|
+
print("Using only prokaryote protein as DB")
|
|
392
|
+
bc_mmseqsDB = os.path.join(fileDir, "db/bayes_mmseqs_index/prokaryote_only")
|
|
393
|
+
else:
|
|
394
|
+
print("Please check parameter -D")
|
|
395
|
+
|
|
386
396
|
mmseqs_wd = os.path.join(wd, "BC_mmseqs")
|
|
387
397
|
mmseqs_prefix = "%s.BC_mmseqs" % prefix
|
|
388
398
|
mmseq_opt = runMmseqsEasysearch(inputfile, mmseqs_prefix, mmseqs_wd, bc_mmseqsDB,
|
|
@@ -390,7 +400,13 @@ def bayes_classifier_single(inputfile, prefix, wd,
|
|
|
390
400
|
# print(mmseq_opt)
|
|
391
401
|
|
|
392
402
|
# load score file
|
|
393
|
-
|
|
403
|
+
if db_name == "all":
|
|
404
|
+
score_file = os.path.join(fileDir, "db/all_mmseq2_linclust_cluster.stat.scoreOpt.tsv")
|
|
405
|
+
elif db_name == "prokaryote":
|
|
406
|
+
score_file = os.path.join(fileDir, "db/prokaryote_only_mmseq2_linclust_cluster.stat.scoreOpt.tsv")
|
|
407
|
+
else:
|
|
408
|
+
print("Please check parameter -D")
|
|
409
|
+
|
|
394
410
|
member2scoreD = load_scoreD(score_file)
|
|
395
411
|
|
|
396
412
|
# read mmseqs easy search file
|
|
@@ -51,6 +51,9 @@ parser.add_argument("-B", "--bp",default="-num_threads 3", dest="blastp_paramete
|
|
|
51
51
|
|
|
52
52
|
parser.add_argument("-d", "--db",action='store_true',default=False,dest="db_redownload", help="remove db and redownload")
|
|
53
53
|
|
|
54
|
+
parser.add_argument("-D", "--databaseN",default="prokaryote",choices=["all","prokaryote"],dest="db_name",
|
|
55
|
+
help="specific which database will use. all contain protein from prokaryote and eukaryote; prokaryote contain protein only from prokaryote")
|
|
56
|
+
|
|
54
57
|
args = parser.parse_args()
|
|
55
58
|
|
|
56
59
|
|
|
@@ -62,15 +65,18 @@ def main():
|
|
|
62
65
|
|
|
63
66
|
print("Using %s"%args.program)
|
|
64
67
|
if args.program == "multiSeqAsOne":
|
|
65
|
-
bayes_classifier_genomes(args.input_file, args.workdir,
|
|
68
|
+
bayes_classifier_genomes(args.input_file, args.workdir,db_name=args.db_name,
|
|
69
|
+
summaryfile=args.summary, threads=args.threads,
|
|
66
70
|
hmm_creteria=args.hmmer_creteria, mmseqs_creteria=args.mmseqs_creteria, blastp_creteria=args.blastp_creteria,
|
|
67
71
|
hmmer_para=args.hmmer_parameter, mmseqs_para=args.mmseqs_parameter, blastp_para=args.blastp_parameter)
|
|
68
72
|
elif args.program == "multiSeqEachAsOne":
|
|
69
|
-
bayes_classifier_contig(args.input_file, args.workdir,
|
|
73
|
+
bayes_classifier_contig(args.input_file, args.workdir,db_name=args.db_name,
|
|
74
|
+
summaryfile=args.summary, threads=args.threads,
|
|
70
75
|
hmm_creteria=args.hmmer_creteria, mmseqs_creteria=args.mmseqs_creteria, blastp_creteria=args.blastp_creteria,
|
|
71
76
|
hmmer_para=args.hmmer_parameter, mmseqs_para=args.mmseqs_parameter, blastp_para=args.blastp_parameter)
|
|
72
77
|
elif args.program == "batch":
|
|
73
|
-
bayes_classifier_batch(args.input_file, args.workdir,
|
|
78
|
+
bayes_classifier_batch(args.input_file, args.workdir,db_name=args.db_name,
|
|
79
|
+
summaryfile=args.summary, threads=args.threads,
|
|
74
80
|
hmm_creteria=args.hmmer_creteria, mmseqs_creteria=args.mmseqs_creteria, blastp_creteria=args.blastp_creteria,
|
|
75
81
|
hmmer_para=args.hmmer_parameter, mmseqs_para=args.mmseqs_parameter, blastp_para=args.blastp_parameter)
|
|
76
82
|
#elif args.program == "test_multiSeqAsOne":
|
|
@@ -9,7 +9,7 @@ from subprocess import Popen
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
def bayes_classifier_batch(inputfile, wd, summaryfile="BC_predict.summary",threads=10,
|
|
12
|
+
def bayes_classifier_batch(inputfile, wd, db_name="prokaryte", summaryfile="BC_predict.summary",threads=10,
|
|
13
13
|
hmm_creteria=1e-5, mmseqs_creteria=1e-5, blastp_creteria=1e-5,
|
|
14
14
|
blastp_para="-num_threads 3",
|
|
15
15
|
hmmer_para="--noali --cpu 3",
|
|
@@ -41,7 +41,8 @@ def bayes_classifier_batch(inputfile, wd, summaryfile="BC_predict.summary",threa
|
|
|
41
41
|
executor = ThreadPoolExecutor(max_workers=threads)
|
|
42
42
|
all_task = []
|
|
43
43
|
kwargsD={"hmm_creteria":hmm_creteria, "mmseqs_creteria":mmseqs_creteria, "blastp_creteria":blastp_creteria,
|
|
44
|
-
"blastp_para":blastp_para,"hmmer_para":hmmer_para,"mmseqs_para":mmseqs_para
|
|
44
|
+
"blastp_para":blastp_para,"hmmer_para":hmmer_para,"mmseqs_para":mmseqs_para,
|
|
45
|
+
"db_name":db_name}
|
|
45
46
|
|
|
46
47
|
## n is try to control the sceond job will be submit after the first, cause some env or dir will be confilct when run all jobs at same time
|
|
47
48
|
n=0
|
|
@@ -62,7 +63,7 @@ def bayes_classifier_batch(inputfile, wd, summaryfile="BC_predict.summary",threa
|
|
|
62
63
|
#opt.flush()
|
|
63
64
|
opt.close()
|
|
64
65
|
|
|
65
|
-
def bayes_classifier_contig(inputfile, wd, summaryfile="BC_predict.summary",threads=10,
|
|
66
|
+
def bayes_classifier_contig(inputfile, wd, db_name="prokaryte",summaryfile="BC_predict.summary",threads=10,
|
|
66
67
|
hmm_creteria=1e-5, mmseqs_creteria=1e-5, blastp_creteria=1e-5,
|
|
67
68
|
blastp_para="-num_threads 3",
|
|
68
69
|
hmmer_para="--noali --cpu 3",
|
|
@@ -95,14 +96,18 @@ def bayes_classifier_contig(inputfile, wd, summaryfile="BC_predict.summary",thre
|
|
|
95
96
|
executor = ThreadPoolExecutor(max_workers=threads)
|
|
96
97
|
all_task = []
|
|
97
98
|
kwargsD={"hmm_creteria":hmm_creteria, "mmseqs_creteria":mmseqs_creteria, "blastp_creteria":blastp_creteria,
|
|
98
|
-
"blastp_para":blastp_para,"hmmer_para":hmmer_para,"mmseqs_para":mmseqs_para
|
|
99
|
+
"blastp_para":blastp_para,"hmmer_para":hmmer_para,"mmseqs_para":mmseqs_para,
|
|
100
|
+
"db_name":db_name}
|
|
101
|
+
|
|
99
102
|
faaDict = {}
|
|
100
103
|
for seq in SeqIO.parse(inputfile,"fasta"):
|
|
101
|
-
|
|
104
|
+
tmpdir = "%s/tmp"%wd
|
|
105
|
+
mkdirs(tmpdir)
|
|
106
|
+
seq.id=seq.id.replace("|","_")
|
|
107
|
+
tmpfile="%s/%s.tmp"%(tmpdir,seq.id)
|
|
102
108
|
SeqIO.write(seq,tmpfile,"fasta")
|
|
103
109
|
faaFile = runProdigal(tmpfile, seq.id, "%s/BC_prodigal"%wd, program="meta", otherPara="-g 11")
|
|
104
110
|
faaDict[seq.id] = faaFile
|
|
105
|
-
#res = ["sample_name"] + ['NA']*6 + [0]
|
|
106
111
|
#print(faaDict)
|
|
107
112
|
|
|
108
113
|
n = 0
|
|
@@ -118,15 +123,15 @@ def bayes_classifier_contig(inputfile, wd, summaryfile="BC_predict.summary",thre
|
|
|
118
123
|
for future in as_completed(all_task):
|
|
119
124
|
res = future.result()
|
|
120
125
|
faaFile = faaDict[res[0]]
|
|
121
|
-
|
|
126
|
+
tmpfile_com="%s/%s.tmp"%(tmpdir,res[0])
|
|
122
127
|
res.append(faaFile)
|
|
123
128
|
opt.write("\t".join([str(i) for i in res])+"\n")
|
|
124
129
|
#opt.flush()
|
|
125
|
-
os.remove(
|
|
130
|
+
os.remove(tmpfile_com)
|
|
126
131
|
opt.close()
|
|
127
132
|
|
|
128
133
|
|
|
129
|
-
def bayes_classifier_genomes(inputfile, wd, summaryfile="BC_predict.summary",threads=10,
|
|
134
|
+
def bayes_classifier_genomes(inputfile, wd, db_name="prokaryte",summaryfile="BC_predict.summary",threads=10,
|
|
130
135
|
hmm_creteria=1e-5, mmseqs_creteria=1e-5, blastp_creteria=1e-5,
|
|
131
136
|
blastp_para="-num_threads 3",
|
|
132
137
|
hmmer_para="--noali --cpu 3",
|
|
@@ -160,7 +165,8 @@ def bayes_classifier_genomes(inputfile, wd, summaryfile="BC_predict.summary",thr
|
|
|
160
165
|
executor = ThreadPoolExecutor(max_workers=threads)
|
|
161
166
|
all_task = []
|
|
162
167
|
kwargsD={"hmm_creteria":hmm_creteria, "mmseqs_creteria":mmseqs_creteria, "blastp_creteria":blastp_creteria,
|
|
163
|
-
"blastp_para":blastp_para,"hmmer_para":hmmer_para,"mmseqs_para":mmseqs_para
|
|
168
|
+
"blastp_para":blastp_para,"hmmer_para":hmmer_para,"mmseqs_para":mmseqs_para,
|
|
169
|
+
"db_name":db_name}
|
|
164
170
|
faaDict = {}
|
|
165
171
|
|
|
166
172
|
with open(inputfile) as f:
|
|
@@ -15,7 +15,7 @@ The package consists of the following Python modules:
|
|
|
15
15
|
|
|
16
16
|
__author__ = """Xue Peng"""
|
|
17
17
|
__email__ = 'xue.peng@helmholtz-muenchen.de'
|
|
18
|
-
__version__ = '0.2
|
|
18
|
+
__version__ = '0.3.2'
|
|
19
19
|
from Replidec import *
|
|
20
20
|
#from .Replidec_cmdline import *
|
|
21
21
|
#from .Replidec_multi import *
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: Replidec
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Replication Cycle Detector for Phages
|
|
5
5
|
Home-page: https://github.com/deng-lab/Replidec
|
|
6
6
|
Author: Xue Peng
|
|
@@ -15,8 +15,22 @@ Classifier: Intended Audience :: Science/Research
|
|
|
15
15
|
Requires-Python: >=3.8
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
Requires-Dist: biopython>=1.77
|
|
19
|
+
Requires-Dist: future>=0.18.2
|
|
20
|
+
Dynamic: author
|
|
21
|
+
Dynamic: author-email
|
|
22
|
+
Dynamic: classifier
|
|
23
|
+
Dynamic: description
|
|
24
|
+
Dynamic: description-content-type
|
|
25
|
+
Dynamic: home-page
|
|
26
|
+
Dynamic: keywords
|
|
27
|
+
Dynamic: license
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
Dynamic: requires-dist
|
|
30
|
+
Dynamic: requires-python
|
|
31
|
+
Dynamic: summary
|
|
32
|
+
|
|
33
|
+
# Replidec: Replication Cycle Decipher for Phages
|
|
20
34
|
|
|
21
35
|
[](https://pypi.python.org/pypi/Replidec)
|
|
22
36
|
[](https://anaconda.org/denglab/replidec)
|
|
@@ -29,26 +43,26 @@ Use bayes classifier combine with homology search to predict virus replication c
|
|
|
29
43
|
|
|
30
44
|
## Install
|
|
31
45
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
### Method 1: using Docker (recommended)
|
|
46
|
+
### Method 1: using Conda
|
|
35
47
|
|
|
36
48
|
```bash
|
|
37
|
-
|
|
49
|
+
conda create -n replidec
|
|
50
|
+
conda activate replidec
|
|
51
|
+
conda install -c conda-forge -c bioconda replidec
|
|
52
|
+
or
|
|
53
|
+
conda install -c denglab -c conda-forge -c bioconda replidec
|
|
38
54
|
```
|
|
39
55
|
|
|
40
|
-
|
|
56
|
+
### Method 2: using Docker
|
|
41
57
|
|
|
42
58
|
```bash
|
|
43
|
-
|
|
59
|
+
docker pull denglab/replidec
|
|
44
60
|
```
|
|
45
61
|
|
|
46
|
-
|
|
62
|
+
If you want to use `Replidec` on an HPC, singularity is recommended. You can create a singularity image using following command,
|
|
47
63
|
|
|
48
64
|
```bash
|
|
49
|
-
|
|
50
|
-
conda activate replidec
|
|
51
|
-
conda install -c denglab -c conda-forge replidec
|
|
65
|
+
singularity pull replidec.sif docker://denglab/replidec
|
|
52
66
|
```
|
|
53
67
|
|
|
54
68
|
### Method 3: using pip
|
|
@@ -70,9 +84,9 @@ pip3 install Replidec
|
|
|
70
84
|
```
|
|
71
85
|
Replidec [-h] [--version] -p {multiSeqAsOne,batch,multiSeqEachAsOne}
|
|
72
86
|
[-i INPUT_FILE] [-w WORKDIR] [-s SUMMARY] [-t THREADS] [-c HMMER_CRETERIA] [-H HMMER_PARAMETER] [-m MMSEQS_CRETERIA]
|
|
73
|
-
[-M MMSEQS_PARAMETER] [-b BLASTP_CRETERIA] [-B BLASTP_PARAMETER] [-d]
|
|
87
|
+
[-M MMSEQS_PARAMETER] [-b BLASTP_CRETERIA] [-B BLASTP_PARAMETER] [-d] [-D]
|
|
74
88
|
```
|
|
75
|
-
## Usage: database
|
|
89
|
+
## Usage: database (-d & -D)
|
|
76
90
|
|
|
77
91
|
Database used in Replidec will be download automatically.
|
|
78
92
|
|
|
@@ -80,6 +94,13 @@ Location: will be download at the where Replidec installed
|
|
|
80
94
|
|
|
81
95
|
If you want to redownload the database, `-d` parameter can be used. The older database will be mv to "discarded_db" in the workdir(-w); This dir can be removed manually by user.
|
|
82
96
|
|
|
97
|
+
We provide 2 database for user choose. Use -D to choose database. all|prokaryote
|
|
98
|
+
|
|
99
|
+
1. all: This database contain all proteins from the prokaryotic, eukaryotic
|
|
100
|
+
virus and prophage.
|
|
101
|
+
2. prokaryote: This database contain proteins from the prokaryotic virus and
|
|
102
|
+
prophage. eukaryotic virus gene was removed from this database
|
|
103
|
+
|
|
83
104
|
## Usage: Input(-i) and Propgram(-p)
|
|
84
105
|
|
|
85
106
|
**Input file is different base on different program**
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|