Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ channels:
dependencies:
- conda-forge::python=3.10
- bioconda::snakemake-minimal=7.25.0
- conda-forge::conda=24.1.2
- conda-forge::mamba=1.5.9
- bioconda::genomepy=0.16.2
- conda-forge::conda=23.5.2
- conda-forge::mamba=1.5.1
- bioconda::genomepy=0.16.3
- conda-forge::biopython=1.81
- conda-forge::filelock=3.10.7
- conda-forge::pyyaml=6.0
Expand All @@ -20,3 +20,5 @@ dependencies:
- conda-forge::argcomplete=3.0.5
- conda-forge::tabulate=0.9.0
- conda-forge::conda-ecosystem-user-package-isolation=1.0
- conda-forge::setuptools=59.4.0
- conda-forge::toml=0.10.2
2 changes: 1 addition & 1 deletion seq2science/envs/assembly_stats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ channels:
dependencies:
- conda-forge::python=3.9
- conda-forge::matplotlib-base=3.7.1
- bioconda::genomepy=0.15.0
- bioconda::genomepy=0.16.3
- conda-forge::conda-ecosystem-user-package-isolation=1.0
2 changes: 1 addition & 1 deletion seq2science/envs/gimme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::gimmemotifs-minimal=0.18.0
- bioconda::gimmemotifs-minimal=0.18.1
- bioconda::gffread=0.12.7
- bioconda::orthofinder=2.5.4
- conda-forge::xgboost=1.0.2
Expand Down
2 changes: 1 addition & 1 deletion seq2science/envs/pytxi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::genomepy=0.15.0
- bioconda::genomepy=0.16.3
- conda-forge::conda-ecosystem-user-package-isolation=1.0
- pip:
- git+https://github.com/vanheeringen-lab/pytxi.git@v0.1.2
6 changes: 3 additions & 3 deletions seq2science/rules/configuration_generic.smk
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,10 @@ if WORKFLOW != "download_fastq":
used_assemblies = list(set(samples["assembly"]))
# we make a temporary _used assemblies as gimme maelstrom might need more assemblies downloaded
# and those assemblies need to be saved in the local/remote assemblies variable
if "motif2factors_reference" in config and config["run_gimme_maelstrom"]:
_used_assemblies = used_assemblies
if (config.get("run_gimme_maelstrom") and config.get("infer_motif2factors") and
set(samples["assembly"]) - set(config.get("motif2factors_database_references"))):
_used_assemblies = used_assemblies + config["motif2factors_reference"] + config["motif2factors_database_references"]
else:
_used_assemblies = used_assemblies

# dictionary with which providers to use per genome
providers = PickleDict(os.path.join(CACHE_DIR, "providers.p"))
Expand Down
2 changes: 2 additions & 0 deletions seq2science/rules/configuration_logging.smk
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ if not config.get("no_config_log"):
("min_mapping_quality", no_aligners),
("only_primary_align", no_aligners),
("remove_blacklist", no_aligners),
("motif2factors_database_references", not config.get("motif2factors_database_references")),
("motif2factors_reference", not config.get("motif2factors_reference")),
("tx2gene_from_gtf", config.get("quantifier") != "salmon"),
("tximeta", config.get("quantifier") != "salmon"),
("deseq2", not config.get("contrasts")),
Expand Down
12 changes: 12 additions & 0 deletions seq2science/rules/configuration_workflows.smk
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,18 @@ if config.get("peak_caller", False):
"To run gimme maelstrom you need more than one biological replicate!"
)

# only need additional assemblies when ortholog inference is truly needed
if config["infer_motif2factors"] is True:
if len(set(samples["assembly"]) - set(config["motif2factors_database_references"])) == 0:
config["infer_motif2factors"] = False
if config["infer_motif2factors"] is False:
config["motif2factors_database_references"] = []
config["motif2factors_reference"] = []
else:
config["infer_motif2factors"] = False
config["motif2factors_database_references"] = []
config["motif2factors_reference"] = []

# make sure that both maximum and minimum insert sizes are existing when one of them is used
if config.get("min_template_length") and not config.get("max_template_length"):
config["max_template_length"] = 1_000_000_000
Expand Down
13 changes: 11 additions & 2 deletions seq2science/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1039,12 +1039,21 @@ def _get_current_version(package):
"""
Attempt to return a given package's version
"""
# package-isolation is not a package
# conda-ecosystem-user-package-isolation is not a package
# xdg keeps its version in a pyproject.toml (not included)
# argcomplete keeps its version in a setup.py (not included)
# trackhub versioning is weird
# mamba is not a package
if package in ["conda-ecosystem-user-package-isolation", "xdg", "argcomplete", "trackhub", "mamba"]:
# setuptools and toml are for packaging only
if package in [
"conda-ecosystem-user-package-isolation",
"xdg",
"argcomplete",
"trackhub",
"mamba",
"setuptools",
"toml",
]:
return None
if package == "python":
return sys.version.split()[0]
Expand Down