Skip to content
Snippets Groups Projects
Commit 831d369d authored by Hanna  JULIENNE's avatar Hanna JULIENNE
Browse files

added optional parameter to the create inittable command line

parent c10cf502
No related branches found
No related tags found
No related merge requests found
...@@ -5,14 +5,14 @@ import os ...@@ -5,14 +5,14 @@ import os
import shutil import shutil
import sys import sys
import argparse import argparse
from datetime import timedelta, datetime from datetime import timedelta, datetime, date
from json import JSONDecodeError from json import JSONDecodeError
import uvicorn import uvicorn
from jass.config import config from jass.config import config
from jass.models.phenotype import get_available_phenotypes from jass.models.phenotype import get_available_phenotypes
from jass.models.inittable import create_inittable_file, add_gene_annotation from jass.models.inittable import create_inittable_file, add_gene_annotation, add_inittable_meta
from jass.models.worktable import create_worktable_file from jass.models.worktable import create_worktable_file
from jass.models.project import get_projects_last_access, load_project from jass.models.project import get_projects_last_access, load_project
from jass.models.plots import ( from jass.models.plots import (
...@@ -241,7 +241,8 @@ def w_create_inittable(args): ...@@ -241,7 +241,8 @@ def w_create_inittable(args):
init_covariance_path, init_covariance_path,
init_genetic_covariance_path, init_genetic_covariance_path,
) )
add_inittable_meta(init_table_path, args.title, args.description_inittable)
def w_plot_manhattan(args): def w_plot_manhattan(args):
worktable_path = absolute_path_of_the_file(args.worktable_path) worktable_path = absolute_path_of_the_file(args.worktable_path)
...@@ -438,6 +439,20 @@ def get_parser(): ...@@ -438,6 +439,20 @@ def get_parser():
default=None, default=None,
help="path to the genetic covariance file to import. Used only for display on Jass web application", help="path to the genetic covariance file to import. Used only for display on Jass web application",
) )
parser_create_it.add_argument(
"--title",
required=False,
default="inittable_{}".format(date.today()),
help="Title of the dataset (optional)",
)
parser_create_it.add_argument(
"--description-inittable",
required=False,
default="inittable generated the {}".format(date.today()),
help="Textual description of the dataset (optional)",
)
parser_create_it.set_defaults(func=w_create_inittable) parser_create_it.set_defaults(func=w_create_inittable)
# ------- create-worktable ------- # ------- create-worktable -------
......
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment