Skip to content

Commit

Permalink
v2.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
cmkobel committed Sep 21, 2023
1 parent fcb48fd commit 4e92d14
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 9 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM condaforge/mambaforge:latest
LABEL io.github.snakemake.containerized="true"
LABEL io.github.snakemake.conda_env_hash="3e0f6a910323a150167cddb17cdf65d15adb02b0502443384c88795d2a6fc76e"

# v2.5.5

# Step 1: Retrieve conda environments

# Conda environment:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Finally, define the alias that will be used to launch asscom2 from any directory
```bash
echo "export ASSCOM2_BASE=$(pwd -P)" >> ~/.bashrc # Save installation directory.
echo "export ASSCOM2_PROFILE=\${ASSCOM2_BASE}/profiles/apptainer/local" >> ~/.bashrc # Define profile selection.
echo "export ASSCOM2_DATABASES=${ASSCOM2_BASE}/databases" >> ~/.bashrc # Define database base directory.
echo "export ASSCOM2_DATABASES=\${ASSCOM2_BASE}/databases" >> ~/.bashrc # Define database base directory.
echo "alias asscom2='conda run --live-stream --name asscom2_launcher snakemake --snakefile \${ASSCOM2_BASE}/snakefile --profile \${ASSCOM2_PROFILE} --configfile \${ASSCOM2_BASE}/config.yaml'" >> ~/.bashrc
source ~/.bashrc
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2.5.5
- Use $ASSCOM_DATABASES to define where the databases are placed.
- Docker images have a versioning system so an incompatible image can't be used.

2.5.4
- Using the mashtree order in plots in the report. Using alphabetical order redundantly in case mashtree hasn't run (sucessfully). Minor adjustments to other plots. TODO: midpoint root tree somehow and order all tables in the report as well.

Expand Down
5 changes: 3 additions & 2 deletions profiles/apptainer/local/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ keep-incomplete: true # true only for debugging
# Apptainer
use-conda: true # Omitting this line was the culprit, now the 'snakemake --containerize' auto stuff works!
use-singularity: true
# What happens if I don't define the singularity-prefix? Does it download the image to the running directory of the alias?
#singularity-prefix: '~/.asscom2/apptainer-prefix' # Directory in which singularity images will be stored. Couldn't find a way of using the $ASSCOM_BASE system variable.

# If you don't define a common singularity-prefix, the image will be pulled every single time
singularity-prefix: "~/.asscom2/singularity-prefix" # Directory in which singularity images will be stored. Couldn't find a way of using the $ASSCOM_BASE system variable, so users should manually change this here if they want to use something else.
singularity-args: "--bind $ASSCOM2_BASE,$ASSCOM2_DATABASES" # Must also bind ASSCOM2_BASE so we can access databases and report scripts etc. When this issue is solved I'll add individual arguments to rules and make it more flexible https://github.com/snakemake/snakemake/issues/262

# Comments for the singularity-args parameter. I don't know why the necessary /opt/conda/bin path, which is present when I run the image, is gone when snakemake runs. Also, since the databases are likely in a soft linked directory, you must bind it if you want access
Expand Down
2 changes: 1 addition & 1 deletion report_subpipeline/scripts/genomes_to_report_v3.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -434,5 +434,5 @@ section_definition_table %>%



<p class = "shaded">[assemblycomparator2 v2.5.4](https://github.com/cmkobel/assemblycomparator2#assemblycomparator2) genomes to report pipeline. Copyright (C) 2019-2023 [Carl M. Kobel](https://github.com/cmkobel) [GNU GPL v3](https://github.com/cmkobel/assemblycomparator2/blob/master/LICENSE)</p>
<p class = "shaded">[assemblycomparator2 v2.5.5](https://github.com/cmkobel/assemblycomparator2#assemblycomparator2) genomes to report pipeline. Copyright (C) 2019-2023 [Carl M. Kobel](https://github.com/cmkobel) [GNU GPL v3](https://github.com/cmkobel/assemblycomparator2/blob/master/LICENSE)</p>

2 changes: 1 addition & 1 deletion report_subpipeline/snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

containerized: "docker://cmkobel/assemblycomparator2"

__version__ = "v2.5.4"
__version__ = "v2.5.5"
__author__ = 'Carl M. Kobel'


Expand Down
17 changes: 13 additions & 4 deletions snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# asscom2 --containerize > Dockerfile # And remove header-text.


__version__ = "v2.5.4" # Four places to bump. Here, in the bottom of the report, in the report snakefile. And in the changelog.
__version__ = "v2.5.5" # Five places to bump. Here, in the bottom of the report, in the report snakefile, in the changelog and the Dockerfile.
__author__ = 'Carl M. Kobel'

# May the data passing through this pipeline
Expand Down Expand Up @@ -128,6 +128,12 @@ print()



# The DATABASES directory must exist, otherwise apptainer gets confused and throws:
# WARNING: skipping mount of /home/thylakoid/assemblycomparator2/adatabaseas: stat /home/thylakoid/assemblycomparator2/adatabaseas: no such file or directory
if not os.path.isdir(DATABASES):
os.mkdir(DATABASES)


# --- Make sure the output directory exists. ----------------------------------

""" try:
Expand Down Expand Up @@ -252,7 +258,7 @@ rule busco_download:
# https://busco.ezlab.org/busco_userguide.html#download-and-automated-update
busco \
--in dummy.fasta \
--out shouldnotbenecessarytosettheoutdirwhenjustdownloading \
--out dummy \
--mode geno \
--auto-lineage-prok \
--force \
Expand Down Expand Up @@ -707,7 +713,8 @@ rule dbcan: # I can't decide whether this rule should really be called "run_dbca
input:
metadata = "{results_directory}/metadata.tsv",
aminoacid = "{results_directory}/samples/{sample}/prokka/{sample}.faa", # From prokka
database_representative = expand("{base_variable}/databases/dbcan/ac2_dbcan_database_representative.flag", base_variable = base_variable),
#database_representative = expand("{base_variable}/databases/dbcan/ac2_dbcan_database_representative.flag", base_variable = base_variable),
database_representative = DATABASES + "/dbcan/ac2_dbcan_database_representative.flag"
output:
overview_table = "{results_directory}/samples/{sample}/dbcan/overview.txt"
params:
Expand Down Expand Up @@ -935,7 +942,9 @@ rule diamond_kegg: # or uniref_ko?
input:
metadata = "{results_directory}/metadata.tsv", # For the report
aminoacid = "{results_directory}/samples/{sample}/prokka/{sample}.faa", # From prokka
database_representative = base_variable + "/databases/checkm2/ac2_checkm2_database_representative.flag",
#database_representative = base_variable + "/databases/checkm2/ac2_checkm2_database_representative.flag",
database_representative = DATABASES + "/checkm2/ac2_checkm2_database_representative.flag",

output:
tsv = "{results_directory}/samples/{sample}/diamond_kegg/{sample}_diamond_kegg.tsv", # Or should it be named uniref-100?
params:
Expand Down

0 comments on commit 4e92d14

Please sign in to comment.