Commit 86e96103 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

add possibility to skip some steps in script taxo

parent 0ea79473
Pipeline #17562 passed with stages
in 2 minutes and 7 seconds
......@@ -126,6 +126,8 @@ def parse_arguments():
# Common arguments for analysis and annotations
parser.add_argument('--nodes', help='nodes.dmp file from ncbi_taxonomy', required=True)
parser.add_argument('--names', help='names.dmp file from ncbi_taxonomy', required=True)
parser.add_argument('--skip_creation', action='store_true', help='Skip taxonomy creation.')
parser.add_argument('--skip_hierarchy', action='store_true', help='Skip taxonomy hierarchy built.')
parser.add_argument('--url', help='base URL of the instance.', default='http://localhost/')
parser.add_argument('-v', '--verbose', action='store_true')
......@@ -141,9 +143,11 @@ def run():
logger.setLevel(logging.INFO)
import_ncbi_tax = ImportNCBITaxonomy(args.url, args.names, args.nodes)
taxonomy_names = import_ncbi_tax.import_names()
import_ncbi_tax.create_taxo_nodes(taxonomy_names)
import_ncbi_tax.update_taxo_nodes()
import_ncbi_tax.build_all_hierarchy()
if not args.skip_creation:
import_ncbi_tax.create_taxo_nodes(taxonomy_names)
import_ncbi_tax.update_taxo_nodes()
if not args.skip_hierarchy:
import_ncbi_tax.build_all_hierarchy()
if __name__ == "__main__":
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment