Skip to content

Commit

Permalink
Merge pull request #101 from pdimens/100-impute-create-separate-conda…
Browse files Browse the repository at this point in the history
…-env-for-stitch

100 impute create separate conda env for stitch
  • Loading branch information
pdimens authored Jul 3, 2024
2 parents 0844aac + bb1867f commit d22bc3a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "harpy"
version = "1.1.0"
version = "1.1.1"
authors = [
{name = "Pavel Dimens"}
]
Expand Down
2 changes: 1 addition & 1 deletion src/harpy/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
click.rich_click.ERRORS_EPILOGUE = "See the documentation: [link=https://pdimens.github.io/harpy/]https://pdimens.github.io/harpy/[/link]"

@click.group(options_metavar='', context_settings={"help_option_names" : ["-h", "--help"]})
@click.version_option("1.1.0", prog_name="Harpy")
@click.version_option("1.1.1", prog_name="Harpy")
def cli():
"""
An automated workflow for haplotagging linked-read data
Expand Down
5 changes: 3 additions & 2 deletions src/harpy/conda_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ def generate_conda_deps():
"""Create the YAML files of the workflow conda dependencies"""
condachannels = ["bioconda","conda-forge","defaults"]
environ = {
"qc" : ["bioconda::falco", "bioconda::fastp", "bioconda::multiqc=1.22", "bioconda::pysam=0.22"],
"qc" : ["bioconda::quickdeconvolution", "bioconda::falco", "bioconda::fastp", "bioconda::multiqc=1.22", "bioconda::pysam=0.22"],
"align": ["bioconda::bwa", "bioconda::ema","bioconda::strobealign", "conda-forge::icu","conda-forge::libzlib", "bioconda::samtools=1.20", "bioconda::seqtk", "bioconda::tabix", "conda-forge::xz"],
"snp": ["bioconda::bcftools=1.20", "bioconda::freebayes=1.3.6"],
"sv": ["bioconda::leviathan", "bioconda::naibr-plus"],
"phase" : ["bioconda::hapcut2", "bioconda::whatshap"],
"simulations" : ["conda-forge::perl", "bioconda::perl-math-random", "bioconda::perl-inline-c", "bioconda::perl-parse-recdescent", "conda-forge::numpy", "bioconda::dwgsim", "alienzj::msort"],
"r" : ["conda-forge::r-xml2", "conda-forge::r-highcharter", "conda-forge::r-circlize", "r::r-biocircos", "conda-forge::r-dt", "conda-forge::r-flexdashboard", "conda-forge::r-ggplot2", "conda-forge::r-ggridges", "conda-forge::r-plotly", "conda-forge::r-tidyr", "bioconda::r-stitch"]
"r" : ["conda-forge::r-xml2", "conda-forge::r-highcharter", "conda-forge::r-circlize", "r::r-biocircos", "conda-forge::r-dt", "conda-forge::r-flexdashboard", "conda-forge::r-ggplot2", "conda-forge::r-ggridges", "conda-forge::r-plotly", "conda-forge::r-tidyr"],
"stitch" : ["bioconda::r-stitch=1.6.10"]
}
os.makedirs(".harpy_envs", exist_ok = True)
# overwrites existing
Expand Down
9 changes: 7 additions & 2 deletions src/harpy/snakefiles/containerize.smk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ onsuccess:

rule all:
input:
collect("{conda}.env", conda = ["qc","align","snp","sv","phase","r","simulations"])
collect("{conda}.env", conda = ["align", "phase", "qc", "r", "simulations", "snp", "stitch", "sv"])

rule qc:
output: "qc.env"
Expand All @@ -33,11 +33,16 @@ rule phase:
conda: os.getcwd() + "/.harpy_envs/phase.yaml"
shell: "touch {output}"

rule r_env:
rule r:
output: "r.env"
conda: os.getcwd() + "/.harpy_envs/r.yaml"
shell: "touch {output}"

rule stitch:
output: "stitch.env"
conda: os.getcwd() + "/.harpy_envs/stitch.yaml"
shell: "touch {output}"

rule simulations:
output: "simulations.env"
conda: os.getcwd() + "/.harpy_envs/simulations.yaml"
Expand Down
2 changes: 1 addition & 1 deletion src/harpy/snakefiles/impute.smk
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ rule impute:
parameters = paramspace.instance,
extra = config.get("extra", "")
conda:
f"{envdir}/r.yaml"
f"{envdir}/stitch.yaml"
benchmark:
f".Benchmark/{outdir}/stitch.{paramspace.wildcard_pattern}" + ".{part}.txt"
threads:
Expand Down
2 changes: 1 addition & 1 deletion src/harpy/validations.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def check_envdir(dirpath):
print_error("This working directory does not contain the expected directory of conda environment definitions ([blue bold].harpy_envs/[/blue bold])\n - use [green bold]--conda[/green bold] to recreate it")
sys.exit(1)
envlist = os.listdir(dirpath)
envs = ["qc", "align", "snp", "sv", "phase", "simulations", "r"]
envs = ["align", "phase", "qc", "r", "simulations", "snp", "stitch", "sv"]
errcount = 0
errtable = Table(show_footer=True, box=box.SIMPLE)
errtable.add_column("File", justify="left", style="blue", no_wrap=True)
Expand Down

0 comments on commit d22bc3a

Please sign in to comment.