-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpipedm.py
More file actions
executable file
·76 lines (65 loc) · 3.01 KB
/
pipedm.py
File metadata and controls
executable file
·76 lines (65 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env python3
from BioMetaPipeline.Accessories.arg_parse import ArgParse
from BioMetaPipeline.Accessories.program_caller import ProgramCaller
from BioMetaPipeline.Pipeline.metagenome_evaluation import metagenome_evaluation
from BioMetaPipeline.Pipeline.eukaryotic_pangenome import eukaryotic_pangenome
from BioMetaPipeline.Pipeline.metagenome_annotation import metagenome_annotation
if __name__ == "__main__":
args_list = (
(("program",),
{"help": "Program to run"}),
(("-d", "--directory"),
{"help": "Directory containing genomes", "required": True}),
(("-c", "--config_file"),
{"help": "Config file", "required": True}),
(("-a", "--cancel_autocommit"),
{"help": "Cancel commit to database", "action": "store_true", "default": False}),
(("-o", "--output_directory"),
{"help": "Output directory prefix, default out", "default": "out"}),
(("-b", "--biometadb_project"),
{"help": "/path/to/BioMetaDB_project (updates values of existing database)", "default": "None"}),
# (("-l", "--list_file"),
# {"help": "/path/to/list_file formatted as 'prefix\\tdata_file_1,data_file_2[,...]\\n'"}),
(("-t", "--type_file"),
{"help": "/path/to/type_file formatted as 'file_name.fna\\t[Archaea/Bacteria]\\t[gram+/gram-]\\n'",
"default": "None"}),
(("-y", "--is_docker"),
{"help": "For use in docker version", "default": False, "action": "store_true"}),
(("-z", "--remove_intermediates"),
{"help": "For use in docker version", "default": True, "action": "store_false"}),
)
programs = {
"MET_EVAL": metagenome_evaluation,
# "EU_PAN": eukaryotic_pangenome,
"MET_ANNOT": metagenome_annotation,
}
flags = {
"MET_EVAL": ("directory", "config_file", "cancel_autocommit", "output_directory",
"biometadb_project", "is_docker", "remove_intermediates"),
# "EU_PAN": ("directory", "config_file", "cancel_autocommit", "output_directory",
# "biometadb_project", "list_file"),
"MET_ANNOT": ("directory", "config_file", "cancel_autocommit", "output_directory",
"biometadb_project", "type_file", "is_docker", "remove_intermediates"),
}
errors = {
}
_help = {
"MET_EVAL": "Evaluates completion, contamination, and redundancy of MAGs",
# "EU_PAN": "Assembles, aligns, annotates, and creates pan-genomes for Eukaryotes",
"MET_ANNOT": "Runs gene callers and annotation programs on MAGs",
}
ap = ArgParse(
args_list,
description=ArgParse.description_builder(
"pipedm:\tRun meta/genomes evaluation and annotation pipelines",
_help,
flags
)
)
pc = ProgramCaller(
programs=programs,
flags=flags,
_help=_help,
errors=errors
)
pc.run(ap.args, debug=True)