-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from mdmparis/merge_folders
- defense-finder is now able to run defense-finder-models >= v2, in which all models (except Cas and RM) are in a single model directory. - add retrocompatibility with older models - add a check to let the user know whether they run the last version of defense-finder-models or not. (checks for new updates once a month) - pin to Macsyfinder version 2.1.4 - remove support for python < 3.10
- Loading branch information
Showing
17 changed files
with
48,792 additions
and
22,718 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,9 @@ To retrieve it run: | |
defense-finder update | ||
``` | ||
|
||
**Conda/Mamba** installation is not linked to this repo and is publish by other than us, so there might be some delays between a release here on pip and on conda. | ||
***We recommand to install with pip*** when possible. | ||
|
||
### Updating DefenseFinder | ||
When you have not used DefenseFinder in the last days, make sure you have the latest versions of the models. | ||
To verify and downloaded if necessary the latest models run: | ||
|
@@ -204,25 +207,34 @@ Usage: defense-finder run [OPTIONS] FILE | |
Search for all known anti-phage defense systems in the target fasta file. | ||
|
||
Options: | ||
-o, --out-dir TEXT The target directory where to store the results. | ||
Defaults to the current directory. | ||
-w, --workers INTEGER The workers count. By default all cores will be used | ||
(w=0). | ||
-c, --coverage FLOAT Minimal percentage of coverage for each profiles. By | ||
default set to 0.4 | ||
--db-type TEXT The macsyfinder --db-type option. Run macsyfinder | ||
--help for more details. Possible values are | ||
ordered_replicon, gembase, unordered, defaults to | ||
ordered_replicon. | ||
--preserve-raw Preserve raw MacsyFinder outputs alongside Defense | ||
Finder results inside the output directory. | ||
--models-dir TEXT Specify a directory containing your models. | ||
--no-cut-ga Advanced! Run macsyfinder in no-cut-ga mode. The | ||
validity of the genes and systems found is not | ||
guaranteed! | ||
--log-level TEXT set the logging level among DEBUG, [INFO], WARNING, | ||
ERROR, CRITICAL | ||
-h, --help Show this message and exit. | ||
-o, --out-dir TEXT The target directory where to store the | ||
results. Defaults to the current directory. | ||
-w, --workers INTEGER The workers count. By default all cores will | ||
be used (w=0). | ||
-c, --coverage FLOAT Minimal percentage of coverage for each | ||
profiles. By default set to 0.4 | ||
--db-type TEXT The macsyfinder --db-type option. Run | ||
macsyfinder --help for more details. Possible | ||
values are ordered_replicon, | ||
gembase, unordered, defaults to | ||
ordered_replicon. | ||
--preserve-raw Preserve raw MacsyFinder outputs alongside | ||
Defense Finder results inside the output | ||
directory. | ||
--models-dir TEXT Specify a directory containing your models. | ||
--no-cut-ga Advanced! Run macsyfinder in no-cut-ga mode. | ||
The validity of the genes and systems found is | ||
not guaranteed! | ||
-a, --antidefensefinder Also run AntiDefenseFinder models to find | ||
antidefense systems. | ||
-A, --antidefensefinder-only Run only AntiDefenseFinder for antidefense | ||
system and not DefenseFinder | ||
--log-level TEXT set the logging level among DEBUG, [INFO], | ||
WARNING, ERROR, CRITICAL | ||
--index-dir TEXT Specify a directory to write the index files | ||
required by macsyfinder when the input file is | ||
in a read-only folder | ||
-h, --help Show this message and exit. | ||
``` | ||
## Development | ||
|
@@ -254,4 +266,4 @@ done | |
``` | ||
--- | ||
For questions: you can contact [email protected] | ||
For questions: you can contact [email protected], [email protected], or [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "1.3.0" | ||
__version__ = "2.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
import shlex | ||
from macsypy.scripts import macsydata | ||
|
||
from macsypy.scripts.macsydata import main as mdmain | ||
|
||
|
||
def update_models(models_dir, force_reinstall: bool): | ||
# Updating DefenseFinder models | ||
args_models_dir = f"-t {models_dir}" if models_dir is not None else "-u" | ||
args_force = "-f" if force_reinstall else "" | ||
cmd_args = f"install -U {args_models_dir} {args_force} --org mdmparis defense-finder-models" | ||
macsydata.main(shlex.split(cmd_args)) | ||
mdmain(shlex.split(cmd_args)) | ||
|
||
# Updating CASFinder models | ||
args_models_dir = f"-t {models_dir}" if models_dir is not None else "-u" | ||
cmd_args = f"install -U {args_models_dir} {args_force} CasFinder" | ||
macsydata.main(shlex.split(cmd_args)) | ||
mdmain(shlex.split(cmd_args)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
macsyfinder==2.1.1 | ||
macsyfinder==2.1.4 | ||
colorlog==6.3.0a1 | ||
click==8.0.3 | ||
pyhmmer | ||
|
Oops, something went wrong.