genelastic 0.7.0__py3-none-any.whl → 0.9.0__py3-none-any.whl
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.
- genelastic/api/.env +4 -0
- genelastic/api/cli_start_api.py +18 -0
- genelastic/api/errors.py +52 -0
- genelastic/api/extends/example.py +0 -6
- genelastic/api/extends/example.yml +0 -0
- genelastic/api/routes.py +313 -181
- genelastic/api/server.py +34 -26
- genelastic/api/settings.py +5 -9
- genelastic/api/specification.yml +512 -0
- genelastic/common/__init__.py +0 -39
- genelastic/common/cli.py +100 -0
- genelastic/common/elastic.py +374 -46
- genelastic/common/exceptions.py +34 -2
- genelastic/common/server.py +59 -0
- genelastic/common/types.py +1 -14
- genelastic/import_data/__init__.py +0 -27
- genelastic/import_data/checker.py +99 -0
- genelastic/import_data/checker_observer.py +13 -0
- genelastic/import_data/cli/__init__.py +0 -0
- genelastic/import_data/cli/cli_check.py +136 -0
- genelastic/import_data/cli/gen_data.py +143 -0
- genelastic/import_data/cli/import_data.py +346 -0
- genelastic/import_data/cli/info.py +247 -0
- genelastic/import_data/{cli_integrity.py → cli/integrity.py} +29 -7
- genelastic/import_data/cli/validate.py +146 -0
- genelastic/import_data/collect.py +185 -0
- genelastic/import_data/constants.py +136 -11
- genelastic/import_data/import_bundle.py +102 -59
- genelastic/import_data/import_bundle_factory.py +70 -149
- genelastic/import_data/importers/__init__.py +0 -0
- genelastic/import_data/importers/importer_base.py +131 -0
- genelastic/import_data/importers/importer_factory.py +85 -0
- genelastic/import_data/importers/importer_types.py +223 -0
- genelastic/import_data/logger.py +2 -1
- genelastic/import_data/models/__init__.py +0 -0
- genelastic/import_data/models/analyses.py +178 -0
- genelastic/import_data/models/analysis.py +144 -0
- genelastic/import_data/models/data_file.py +110 -0
- genelastic/import_data/models/process.py +45 -0
- genelastic/import_data/models/processes.py +84 -0
- genelastic/import_data/models/tags.py +170 -0
- genelastic/import_data/models/unique_list.py +109 -0
- genelastic/import_data/models/validate.py +26 -0
- genelastic/import_data/patterns.py +90 -0
- genelastic/import_data/random_bundle.py +79 -54
- genelastic/import_data/resolve.py +157 -0
- genelastic/ui/.env +1 -0
- genelastic/ui/cli_start_ui.py +20 -0
- genelastic/ui/routes.py +333 -0
- genelastic/ui/server.py +9 -82
- genelastic/ui/settings.py +2 -6
- genelastic/ui/static/cea-cnrgh.ico +0 -0
- genelastic/ui/static/cea.ico +0 -0
- genelastic/ui/static/layout.ico +0 -0
- genelastic/ui/static/novaseq6000.png +0 -0
- genelastic/ui/static/style.css +430 -0
- genelastic/ui/static/ui.js +458 -0
- genelastic/ui/templates/analyses.html +98 -0
- genelastic/ui/templates/analysis_detail.html +44 -0
- genelastic/ui/templates/bi_process_detail.html +129 -0
- genelastic/ui/templates/bi_processes.html +116 -0
- genelastic/ui/templates/explorer.html +356 -0
- genelastic/ui/templates/home.html +207 -0
- genelastic/ui/templates/layout.html +153 -0
- genelastic/ui/templates/version.html +21 -0
- genelastic/ui/templates/wet_process_detail.html +131 -0
- genelastic/ui/templates/wet_processes.html +116 -0
- genelastic-0.9.0.dist-info/METADATA +686 -0
- genelastic-0.9.0.dist-info/RECORD +76 -0
- genelastic-0.9.0.dist-info/WHEEL +4 -0
- genelastic-0.9.0.dist-info/entry_points.txt +10 -0
- genelastic-0.9.0.dist-info/licenses/LICENSE +519 -0
- genelastic/import_data/analyses.py +0 -69
- genelastic/import_data/analysis.py +0 -205
- genelastic/import_data/bi_process.py +0 -27
- genelastic/import_data/bi_processes.py +0 -49
- genelastic/import_data/cli_gen_data.py +0 -116
- genelastic/import_data/cli_import.py +0 -379
- genelastic/import_data/cli_info.py +0 -256
- genelastic/import_data/cli_validate.py +0 -54
- genelastic/import_data/data_file.py +0 -87
- genelastic/import_data/filename_pattern.py +0 -57
- genelastic/import_data/tags.py +0 -123
- genelastic/import_data/wet_process.py +0 -28
- genelastic/import_data/wet_processes.py +0 -53
- genelastic-0.7.0.dist-info/METADATA +0 -105
- genelastic-0.7.0.dist-info/RECORD +0 -40
- genelastic-0.7.0.dist-info/WHEEL +0 -5
- genelastic-0.7.0.dist-info/entry_points.txt +0 -6
- genelastic-0.7.0.dist-info/top_level.txt +0 -1
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"""This module defines the DataFile class, which handles the representation,
|
|
2
|
-
management, and extraction of metadata for a data file within a data bundle.
|
|
3
|
-
|
|
4
|
-
It includes functionality to construct DataFile instances from paths and
|
|
5
|
-
optional filename patterns, retrieve file paths and metadata, and support
|
|
6
|
-
for extracting metadata from filenames using specified patterns.
|
|
7
|
-
"""
|
|
8
|
-
|
|
9
|
-
import logging
|
|
10
|
-
import pathlib
|
|
11
|
-
from pathlib import Path
|
|
12
|
-
|
|
13
|
-
from genelastic.common import AnalysisMetaData
|
|
14
|
-
|
|
15
|
-
from .filename_pattern import FilenamePattern
|
|
16
|
-
|
|
17
|
-
logger = logging.getLogger("genelastic")
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class DataFile:
|
|
21
|
-
"""Class for handling a data file and its metadata."""
|
|
22
|
-
|
|
23
|
-
# Initializer
|
|
24
|
-
def __init__(
|
|
25
|
-
self,
|
|
26
|
-
path: Path,
|
|
27
|
-
bundle_path: Path | None = None,
|
|
28
|
-
metadata: AnalysisMetaData | None = None,
|
|
29
|
-
) -> None:
|
|
30
|
-
self._path = path
|
|
31
|
-
self._bundle_path = bundle_path # The bundle YAML file in which this
|
|
32
|
-
# file was listed.
|
|
33
|
-
self._metadata = {} if metadata is None else metadata
|
|
34
|
-
|
|
35
|
-
def __repr__(self) -> str:
|
|
36
|
-
return f"File {self._path}, from bundle {self._bundle_path}, with metadata {self._metadata}"
|
|
37
|
-
|
|
38
|
-
# Get path
|
|
39
|
-
@property
|
|
40
|
-
def path(self) -> Path:
|
|
41
|
-
"""Retrieve the data file path."""
|
|
42
|
-
return self._path
|
|
43
|
-
|
|
44
|
-
def exists(self) -> bool:
|
|
45
|
-
"""Tests if the associated file exists on disk."""
|
|
46
|
-
return self._path.is_file()
|
|
47
|
-
|
|
48
|
-
# Get bundle path
|
|
49
|
-
@property
|
|
50
|
-
def bundle_path(self) -> Path | None:
|
|
51
|
-
"""Retrieve the path to the associated data bundle file."""
|
|
52
|
-
return self._bundle_path
|
|
53
|
-
|
|
54
|
-
# Get metadata
|
|
55
|
-
@property
|
|
56
|
-
def metadata(self) -> AnalysisMetaData:
|
|
57
|
-
"""Retrieve a copy of the metadata associated with the data file."""
|
|
58
|
-
return self._metadata.copy()
|
|
59
|
-
|
|
60
|
-
# Factory
|
|
61
|
-
@classmethod
|
|
62
|
-
def make_from_bundle(
|
|
63
|
-
cls,
|
|
64
|
-
path: Path,
|
|
65
|
-
bundle_path: Path | None,
|
|
66
|
-
pattern: FilenamePattern | None = None,
|
|
67
|
-
) -> "DataFile":
|
|
68
|
-
"""Construct a DataFile instance from a bundle path, file path,
|
|
69
|
-
and optional filename pattern.
|
|
70
|
-
"""
|
|
71
|
-
# Make absolute path
|
|
72
|
-
if not path.is_absolute() and bundle_path is not None:
|
|
73
|
-
path = bundle_path.parent / path
|
|
74
|
-
|
|
75
|
-
# Extract filename metadata
|
|
76
|
-
metadata = None
|
|
77
|
-
if pattern is not None:
|
|
78
|
-
metadata = pattern.extract_metadata(path.name)
|
|
79
|
-
|
|
80
|
-
if metadata:
|
|
81
|
-
if "ext" not in metadata:
|
|
82
|
-
metadata["ext"] = pathlib.Path(path).suffixes[0][1:]
|
|
83
|
-
|
|
84
|
-
if "cov_depth" in metadata:
|
|
85
|
-
metadata["cov_depth"] = int(metadata["cov_depth"])
|
|
86
|
-
|
|
87
|
-
return cls(path, bundle_path, metadata)
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"""This module defines the FilenamePattern class, used to define a filename pattern
|
|
2
|
-
and extract metadata from file names using this pattern.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
import re
|
|
6
|
-
|
|
7
|
-
from genelastic.common import AnalysisMetaData
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class FilenamePattern:
|
|
11
|
-
"""Class for defining a filename pattern.
|
|
12
|
-
The pattern is used to extract metadata from filenames
|
|
13
|
-
and verify filename conformity.
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
# Initializer
|
|
17
|
-
def __init__(self, pattern: str) -> None:
|
|
18
|
-
"""Initializes a FilenamePattern instance.
|
|
19
|
-
|
|
20
|
-
Args:
|
|
21
|
-
pattern (str): The pattern string used for defining
|
|
22
|
-
the filename pattern.
|
|
23
|
-
"""
|
|
24
|
-
self._re = re.compile(pattern)
|
|
25
|
-
|
|
26
|
-
def extract_metadata(self, filename: str) -> AnalysisMetaData:
|
|
27
|
-
"""Extracts metadata from the given filename based
|
|
28
|
-
on the defined pattern.
|
|
29
|
-
|
|
30
|
-
Args:
|
|
31
|
-
filename (str): The filename from which metadata
|
|
32
|
-
needs to be extracted.
|
|
33
|
-
|
|
34
|
-
Returns:
|
|
35
|
-
dict: A dictionary containing the extracted metadata.
|
|
36
|
-
|
|
37
|
-
Raises:
|
|
38
|
-
RuntimeError: If parsing of filename fails
|
|
39
|
-
with the defined pattern.
|
|
40
|
-
"""
|
|
41
|
-
m = self._re.search(filename)
|
|
42
|
-
if not m:
|
|
43
|
-
msg = f'Failed parsing filename "{filename}" with pattern "{self._re.pattern}".'
|
|
44
|
-
raise RuntimeError(msg)
|
|
45
|
-
return m.groupdict()
|
|
46
|
-
|
|
47
|
-
def matches_pattern(self, filename: str) -> bool:
|
|
48
|
-
"""Checks if the given filename matches the defined pattern.
|
|
49
|
-
|
|
50
|
-
Args:
|
|
51
|
-
filename (str): The filename to be checked.
|
|
52
|
-
|
|
53
|
-
Returns:
|
|
54
|
-
bool: True if the filename matches the pattern,
|
|
55
|
-
False otherwise.
|
|
56
|
-
"""
|
|
57
|
-
return bool(self._re.match(filename))
|
genelastic/import_data/tags.py
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
import re
|
|
3
|
-
import typing
|
|
4
|
-
|
|
5
|
-
from genelastic.common import BundleDict
|
|
6
|
-
|
|
7
|
-
from .constants import DEFAULT_TAG2FIELD, DEFAULT_TAG_PREFIX, DEFAULT_TAG_SUFFIX
|
|
8
|
-
|
|
9
|
-
logger = logging.getLogger("genelastic")
|
|
10
|
-
|
|
11
|
-
TagsDefinition: typing.TypeAlias = dict[str, dict[str, str | dict[str, str]]]
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class Tags:
|
|
15
|
-
"""This class handles the definition of default and custom tags.
|
|
16
|
-
Tags are used to extract custom metadata from files belonging to an analysis.
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
def __init__(self, documents: typing.Sequence[BundleDict] | None) -> None:
|
|
20
|
-
"""Create a Tag instance."""
|
|
21
|
-
self._tags: dict[str, dict[str, str]] = DEFAULT_TAG2FIELD
|
|
22
|
-
self._tag_prefix: str = DEFAULT_TAG_PREFIX
|
|
23
|
-
self._tag_suffix: str = DEFAULT_TAG_SUFFIX
|
|
24
|
-
|
|
25
|
-
redefined_tags = None
|
|
26
|
-
|
|
27
|
-
if documents:
|
|
28
|
-
# Search for tags definition across loaded YAML documents.
|
|
29
|
-
redefined_tags = self._search_redefined_tags(documents)
|
|
30
|
-
|
|
31
|
-
if redefined_tags:
|
|
32
|
-
self._build_tags(redefined_tags)
|
|
33
|
-
logger.info(
|
|
34
|
-
"The following tags will be used to extract metadata from filenames : %s",
|
|
35
|
-
self._tags,
|
|
36
|
-
)
|
|
37
|
-
else:
|
|
38
|
-
logger.info(
|
|
39
|
-
"Using the default tags to extract metadata from filenames : %s",
|
|
40
|
-
self._tags,
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
def _build_tags(self, redefined_tags: TagsDefinition) -> None:
|
|
44
|
-
# Erase the tags defined by defaults.
|
|
45
|
-
self._tags = {}
|
|
46
|
-
|
|
47
|
-
if "format" in redefined_tags:
|
|
48
|
-
tag_format = redefined_tags["format"]
|
|
49
|
-
|
|
50
|
-
# extra type check for mypy
|
|
51
|
-
if "prefix" in tag_format and isinstance(tag_format["prefix"], str):
|
|
52
|
-
self._tag_prefix = tag_format["prefix"]
|
|
53
|
-
|
|
54
|
-
# extra type check for mypy
|
|
55
|
-
if "suffix" in tag_format and isinstance(tag_format["suffix"], str):
|
|
56
|
-
self._tag_suffix = tag_format["suffix"]
|
|
57
|
-
|
|
58
|
-
for tag_name, tag_attrs in redefined_tags["match"].items():
|
|
59
|
-
if isinstance(tag_attrs, dict): # extra type check for mypy
|
|
60
|
-
self._tags[
|
|
61
|
-
f"{self._tag_prefix}{tag_name}{self._tag_suffix}"
|
|
62
|
-
] = tag_attrs
|
|
63
|
-
|
|
64
|
-
@staticmethod
|
|
65
|
-
def _search_redefined_tags(
|
|
66
|
-
documents: typing.Sequence[BundleDict],
|
|
67
|
-
) -> TagsDefinition | None:
|
|
68
|
-
documents_with_redefined_tags: list[BundleDict] = [
|
|
69
|
-
d for d in documents if "tags" in d
|
|
70
|
-
]
|
|
71
|
-
bundle_paths = [d["bundle_file"] for d in documents_with_redefined_tags]
|
|
72
|
-
|
|
73
|
-
# If there are more than one 'tags' redefinition across the documents, raise an error.
|
|
74
|
-
if len(documents_with_redefined_tags) > 1:
|
|
75
|
-
msg = (
|
|
76
|
-
f"Only one 'tags' key should be defined across all documents, "
|
|
77
|
-
f"but multiple were found : {', '.join(bundle_paths)}"
|
|
78
|
-
)
|
|
79
|
-
raise RuntimeError(msg)
|
|
80
|
-
|
|
81
|
-
if len(documents_with_redefined_tags) == 1:
|
|
82
|
-
redefined_tags: TagsDefinition = documents_with_redefined_tags[0][
|
|
83
|
-
"tags"
|
|
84
|
-
]
|
|
85
|
-
return redefined_tags
|
|
86
|
-
|
|
87
|
-
return None
|
|
88
|
-
|
|
89
|
-
@property
|
|
90
|
-
def tag_prefix(self) -> str:
|
|
91
|
-
"""Return the tag prefix. Default prefix is '%'."""
|
|
92
|
-
return self._tag_prefix
|
|
93
|
-
|
|
94
|
-
@property
|
|
95
|
-
def tag_suffix(self) -> str:
|
|
96
|
-
"""Return the tag suffix. There is no suffix by default."""
|
|
97
|
-
return self._tag_suffix
|
|
98
|
-
|
|
99
|
-
@property
|
|
100
|
-
def items(self) -> typing.ItemsView[str, dict[str, str]]:
|
|
101
|
-
"""Returns the tag items : the key is the tag name,
|
|
102
|
-
and the value is the tag attributes (a dict containing the 'field' and 'regex' keys).
|
|
103
|
-
"""
|
|
104
|
-
return self._tags.items()
|
|
105
|
-
|
|
106
|
-
@property
|
|
107
|
-
def search_regex(self) -> str:
|
|
108
|
-
"""Returns a regex to search for a tag inside a string."""
|
|
109
|
-
return (
|
|
110
|
-
r"("
|
|
111
|
-
+ re.escape(self._tag_prefix)
|
|
112
|
-
+ r"\w+"
|
|
113
|
-
+ re.escape(self._tag_suffix)
|
|
114
|
-
+ r")"
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
def __len__(self) -> int:
|
|
118
|
-
"""Return the number of registered tags."""
|
|
119
|
-
return len(self._tags)
|
|
120
|
-
|
|
121
|
-
def __getitem__(self, key: str) -> dict[str, str]:
|
|
122
|
-
"""Return a tag by its key."""
|
|
123
|
-
return self._tags[key]
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import copy
|
|
2
|
-
|
|
3
|
-
from genelastic.common import WetProcessesData
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class WetProcess:
|
|
7
|
-
"""Class WetProcess that represents a wet process."""
|
|
8
|
-
|
|
9
|
-
def __init__(
|
|
10
|
-
self,
|
|
11
|
-
proc_id: str,
|
|
12
|
-
bundle_file: str | None = None,
|
|
13
|
-
**data: str | float,
|
|
14
|
-
) -> None:
|
|
15
|
-
"""Create a WetProcess instance."""
|
|
16
|
-
self._proc_id = proc_id
|
|
17
|
-
self._bundle_file = bundle_file
|
|
18
|
-
self._data: WetProcessesData = data
|
|
19
|
-
|
|
20
|
-
@property
|
|
21
|
-
def id(self) -> str:
|
|
22
|
-
"""Get the wet process ID."""
|
|
23
|
-
return self._proc_id
|
|
24
|
-
|
|
25
|
-
@property
|
|
26
|
-
def data(self) -> WetProcessesData:
|
|
27
|
-
"""Get data associated to the wet process."""
|
|
28
|
-
return copy.deepcopy(self._data)
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
import typing
|
|
3
|
-
|
|
4
|
-
from genelastic.common import BundleDict
|
|
5
|
-
|
|
6
|
-
from .wet_process import WetProcess
|
|
7
|
-
|
|
8
|
-
logger = logging.getLogger("genelastic")
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class WetProcesses:
|
|
12
|
-
"""Class WetProcesses is a container of WetProces objects."""
|
|
13
|
-
|
|
14
|
-
def __init__(self) -> None:
|
|
15
|
-
"""Create an empty container."""
|
|
16
|
-
self._dict: dict[str, WetProcess] = {}
|
|
17
|
-
|
|
18
|
-
def __len__(self) -> int:
|
|
19
|
-
"""Return the number of WetProcess objects inside the container."""
|
|
20
|
-
return len(self._dict)
|
|
21
|
-
|
|
22
|
-
def __getitem__(self, key: str) -> WetProcess:
|
|
23
|
-
"""Return a WetProcess present in the container by its key."""
|
|
24
|
-
return self._dict[key]
|
|
25
|
-
|
|
26
|
-
def add(self, process: WetProcess) -> None:
|
|
27
|
-
"""Add one WetProces object.
|
|
28
|
-
If a WetProces object with the same ID already exists in the container, the program exits.
|
|
29
|
-
"""
|
|
30
|
-
if process.id in self._dict:
|
|
31
|
-
msg = (
|
|
32
|
-
f"A wet process with the id '{process.id}' is already present."
|
|
33
|
-
)
|
|
34
|
-
raise ValueError(msg)
|
|
35
|
-
|
|
36
|
-
# Add one WetProcess object.
|
|
37
|
-
self._dict[process.id] = process
|
|
38
|
-
|
|
39
|
-
def get_process_ids(self) -> set[str]:
|
|
40
|
-
"""Get a list of the wet processes IDs."""
|
|
41
|
-
return set(self._dict.keys())
|
|
42
|
-
|
|
43
|
-
@classmethod
|
|
44
|
-
def from_array_of_dicts(
|
|
45
|
-
cls, arr: typing.Sequence[BundleDict]
|
|
46
|
-
) -> typing.Self:
|
|
47
|
-
"""Build a WetProcesses instance."""
|
|
48
|
-
wet_processes = cls()
|
|
49
|
-
|
|
50
|
-
for d in arr:
|
|
51
|
-
wet_processes.add(WetProcess(**d))
|
|
52
|
-
|
|
53
|
-
return wet_processes
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.2
|
|
2
|
-
Name: genelastic
|
|
3
|
-
Version: 0.7.0
|
|
4
|
-
Summary: Generate and store genetic data into an Elasticsearch database.
|
|
5
|
-
Author: CNRGH
|
|
6
|
-
Author-email: Pierrick ROGER <pierrick.roger@cnrgh.fr>, Maxime BLANCHON <maxime.blanchon@cnrgh.fr>
|
|
7
|
-
License: CeCILL
|
|
8
|
-
Keywords: CNRGH,genelastic,generation,storage,elasticsearch,database
|
|
9
|
-
Classifier: Development Status :: 3 - Alpha
|
|
10
|
-
Classifier: Intended Audience :: Science/Research
|
|
11
|
-
Classifier: License :: OSI Approved :: CEA CNRS Inria Logiciel Libre License, version 2.1 (CeCILL-2.1)
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Requires-Python: >=3.11
|
|
14
|
-
Description-Content-Type: text/markdown
|
|
15
|
-
Requires-Dist: elasticsearch
|
|
16
|
-
Requires-Dist: PyVCF3
|
|
17
|
-
Requires-Dist: schema
|
|
18
|
-
Requires-Dist: PyYAML
|
|
19
|
-
Requires-Dist: biophony>=1.2.1
|
|
20
|
-
Requires-Dist: colorlog
|
|
21
|
-
Provides-Extra: tests
|
|
22
|
-
Requires-Dist: pytest; extra == "tests"
|
|
23
|
-
Requires-Dist: mypy; extra == "tests"
|
|
24
|
-
Requires-Dist: coverage; extra == "tests"
|
|
25
|
-
Requires-Dist: yamllint; extra == "tests"
|
|
26
|
-
Requires-Dist: types-PyYAML; extra == "tests"
|
|
27
|
-
Requires-Dist: ruff<0.9,>=0.8.1; extra == "tests"
|
|
28
|
-
Requires-Dist: pre-commit<4.1,>=4.0.1; extra == "tests"
|
|
29
|
-
Requires-Dist: types-requests; extra == "tests"
|
|
30
|
-
Requires-Dist: ansible<10.5,>=10.4.0; extra == "tests"
|
|
31
|
-
Requires-Dist: ansible-lint<25,>=24.12.2; extra == "tests"
|
|
32
|
-
Provides-Extra: docs
|
|
33
|
-
Requires-Dist: sphinx; extra == "docs"
|
|
34
|
-
Requires-Dist: sphinx-autoapi; extra == "docs"
|
|
35
|
-
Requires-Dist: furo; extra == "docs"
|
|
36
|
-
Provides-Extra: api
|
|
37
|
-
Requires-Dist: flask; extra == "api"
|
|
38
|
-
Requires-Dist: elasticsearch; extra == "api"
|
|
39
|
-
Requires-Dist: environs; extra == "api"
|
|
40
|
-
Requires-Dist: connexion[flask,swagger-ui,uvicorn]; extra == "api"
|
|
41
|
-
Provides-Extra: ui
|
|
42
|
-
Requires-Dist: flask; extra == "ui"
|
|
43
|
-
Requires-Dist: requests; extra == "ui"
|
|
44
|
-
Requires-Dist: environs; extra == "ui"
|
|
45
|
-
|
|
46
|
-
# genelastic
|
|
47
|
-
|
|
48
|
-
Storing of genetics data into an Elasticsearch database.
|
|
49
|
-
|
|
50
|
-
## Prerequisites
|
|
51
|
-
|
|
52
|
-
- `python` >= 3.11
|
|
53
|
-
- `make`
|
|
54
|
-
|
|
55
|
-
## Installation
|
|
56
|
-
|
|
57
|
-
To install dependencies, run the following command:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
python -m venv .venv
|
|
61
|
-
source .venv/bin/activate
|
|
62
|
-
make install.deps
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## Configuration
|
|
66
|
-
|
|
67
|
-
To start the **API server**, the following environment variables should be defined:
|
|
68
|
-
|
|
69
|
-
- `GENAPI_ES_URL`: URL of the Elasticsearch server,
|
|
70
|
-
- `GENAPI_ES_ENCODED_API_KEY`: Encoded API key,
|
|
71
|
-
- `GENAPI_ES_INDEX_PREFIX`: Prefix to identify indices of interest,
|
|
72
|
-
- `GENAPI_ES_CERT_FP`: Certificate fingerprint of the Elasticsearch server.
|
|
73
|
-
|
|
74
|
-
Then, run the following command:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
make start-api
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
To start the **UI server**, the following environment variables should be defined:
|
|
81
|
-
|
|
82
|
-
- `GENUI_API_URL`: URL of the API server.
|
|
83
|
-
|
|
84
|
-
Then, run the following command:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
make start-ui
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## Developers
|
|
91
|
-
|
|
92
|
-
This project uses [pre-commit](https://pre-commit.com/) to manage Git hooks scripts. To install project hooks, run:
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
pre-commit install
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
After that, each commit will succeed only if all hooks (defined in `.pre-commit-config.yaml`) pass.
|
|
99
|
-
|
|
100
|
-
If necessary (though not recommended),
|
|
101
|
-
you can skip these hooks by using the `--no-verify` / `-n` option when committing:
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
git commit -m "My commit message" --no-verify # This commit will not run installed hooks.
|
|
105
|
-
```
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
genelastic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
genelastic/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
genelastic/api/routes.py,sha256=O_bZGhKex04tWauE1fYRXjNmR2smIA4JZShwcakbJJA,6938
|
|
4
|
-
genelastic/api/server.py,sha256=XkkHpv_28OrfrY6CMDnImBFlDiEQSA8f1BpSSn2LGL4,2248
|
|
5
|
-
genelastic/api/settings.py,sha256=vLfj8ASLqq9f6c3eGg30L_WSBiaOIpnCsk-S-TUZRlk,403
|
|
6
|
-
genelastic/api/extends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
genelastic/api/extends/example.py,sha256=5vOw2ToYWzOj-vYkOLbqoa1MCnXIvKuv7xW6qBQ-eHU,164
|
|
8
|
-
genelastic/common/__init__.py,sha256=GfM4XaiaHsA2v8N0T3VgnXpZsLXjTc1wIPpRi4BlkZ8,937
|
|
9
|
-
genelastic/common/cli.py,sha256=cDbgc2m20Y1NO0CZR1qaTrCttcf0cjFAP885tuPZsH0,1770
|
|
10
|
-
genelastic/common/elastic.py,sha256=0XpECyNMC9RzQN1X7u-0IXmHp_KbSjkmGizArLjxTS0,7260
|
|
11
|
-
genelastic/common/exceptions.py,sha256=l4sQBW91OuzV2R7DhrVzEMDrfsyKM-iVYufp2Cv6rR8,159
|
|
12
|
-
genelastic/common/types.py,sha256=JeQ6XzIemIF1QgvprGA0UxFHyJSKjEkgMaIumOvpbNg,1013
|
|
13
|
-
genelastic/import_data/__init__.py,sha256=Ir_fI0BrdC44JiiQaWm29_SyHbDe2CQsElKHgQxELCI,602
|
|
14
|
-
genelastic/import_data/analyses.py,sha256=yA4DKtXIUR7JTCp7PEndEjI6FOooW-6lR9vkqTZ0Izs,1861
|
|
15
|
-
genelastic/import_data/analysis.py,sha256=MuHYfIWFFwHfCp9tDkWTtVKkg5AasASwrdOUZ177EeM,7799
|
|
16
|
-
genelastic/import_data/bi_process.py,sha256=CBBGx6oO7KYzUypXzpaopGY4J_nAKcDi2UPJe7B63Bs,650
|
|
17
|
-
genelastic/import_data/bi_processes.py,sha256=Kv93NOntycEiB_BldoMxHNfM6sJvgHQvVqrUSSEb_VA,1365
|
|
18
|
-
genelastic/import_data/cli_gen_data.py,sha256=WYvSgiC30pDvhQuGMxtDKookUF9IQpjQP6UMANvvHSU,3012
|
|
19
|
-
genelastic/import_data/cli_import.py,sha256=Ej-EqaBUNoVHGCefzLsmFbKaXNTaOBs8xJsEdRhbbLo,11622
|
|
20
|
-
genelastic/import_data/cli_info.py,sha256=ue0Pf5cJvrmJ_bBZKG2CXkXDsQO3zQ6CIXhtUwpqXhU,7301
|
|
21
|
-
genelastic/import_data/cli_integrity.py,sha256=lOMA-I1iPXiJD4X80Xg91NKO-fa3Su0uSqBUtdMKU4Q,12282
|
|
22
|
-
genelastic/import_data/cli_validate.py,sha256=AcirmmJQWFDrpiPUNTYnpFjSnvD6YyStYJHIbfi1Ly0,1515
|
|
23
|
-
genelastic/import_data/constants.py,sha256=AKYXdDqWkDzvt-laZqbWlN6C9IoQSSqD70mpSWMU6NQ,760
|
|
24
|
-
genelastic/import_data/data_file.py,sha256=P5oe_yCVQQAALetrUs93Kl1XuqoLQS0iMkeEqPKaY7g,2661
|
|
25
|
-
genelastic/import_data/filename_pattern.py,sha256=3QXOF5ZG9vFA8KG7XXucpA7EIN3dqZmmtXnuFbh0bUQ,1709
|
|
26
|
-
genelastic/import_data/import_bundle.py,sha256=7W0hKwoxwGDtWEGV_NQvyesiNx1lCMpSaqKohpTLmtY,5030
|
|
27
|
-
genelastic/import_data/import_bundle_factory.py,sha256=COdMLTTrx_Y4svZAHVJ5Y0rHM4eQj027rFJiQ66u36M,9546
|
|
28
|
-
genelastic/import_data/logger.py,sha256=X12LBoNTmV6iR8vEPyYIMYSUeQ3LpTvDO69tQYDiOuA,1915
|
|
29
|
-
genelastic/import_data/random_bundle.py,sha256=Fk4oudK42pboGI14aaJjh8tTJxSxYNyF_89BBJ532RY,13821
|
|
30
|
-
genelastic/import_data/tags.py,sha256=N6_dGYqQy2QTN6AEzoEXPxRFmtq3GgTfpId-RjBstJY,4195
|
|
31
|
-
genelastic/import_data/wet_process.py,sha256=2SgN1yZFQA8Hb4ZNNeHpUhmeWlJDApqdjc_oq6ZF0jA,694
|
|
32
|
-
genelastic/import_data/wet_processes.py,sha256=mVUfFG0QUboTEoD3c-Hd1Z2_Tvid_yrKJG_XdC4n6oA,1535
|
|
33
|
-
genelastic/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
|
-
genelastic/ui/server.py,sha256=7QX-54tT7CbpKje34kVVXnktI0wuZJOSLUChxeUGd20,2805
|
|
35
|
-
genelastic/ui/settings.py,sha256=hmgDNMVKk_OkKSBKyV8Eth57ULCTINwzeBCFAH7DdeU,218
|
|
36
|
-
genelastic-0.7.0.dist-info/METADATA,sha256=dj4cFcq7LXEv9v-turnGvHnK2KZ4zXrDxG0YKe11zPU,3127
|
|
37
|
-
genelastic-0.7.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
38
|
-
genelastic-0.7.0.dist-info/entry_points.txt,sha256=KHtfefg-7-v0MZ0jAcHrb6z3V6hq7UdCiYYIAlD6hIg,284
|
|
39
|
-
genelastic-0.7.0.dist-info/top_level.txt,sha256=ra4gCsuKH1d0sXygcnwD_u597ir6bYYxWTS7dkA6vdM,11
|
|
40
|
-
genelastic-0.7.0.dist-info/RECORD,,
|
genelastic-0.7.0.dist-info/WHEEL
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
[console_scripts]
|
|
2
|
-
gnl-data = genelastic.import_data.cli_gen_data:main
|
|
3
|
-
gnl-import = genelastic.import_data.cli_import:main
|
|
4
|
-
gnl-info = genelastic.import_data.cli_info:main
|
|
5
|
-
gnl-integrity = genelastic.import_data.cli_integrity:main
|
|
6
|
-
gnl-validate = genelastic.import_data.cli_validate:main
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
genelastic
|