-
-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Beta support for configurable dependency resolution & Biocontainers.
Consider the included tool ``seqtk_seq.cwl``. It includes the following SoftwareRequirement hint: ``` hints: SoftwareRequirement: packages: - package: seqtk version: - r93 ``` I'm not happy that ``version`` is a list - but I can live with it for now I guess. If cwltool is executed with the hidden ``--beta-conda-dependencies`` flag, this requirement will be processed by galaxy-lib, Conda will be installed, and seqtk will be installed, and a Conda environment including seqtk will be setup for the job. ``` virtualenv .venv . .venv/bin/activate python setup.py install pip install galaxy-lib cwltool --beta-conda-dependencies tests/seqtk_seq.cwl tests/seqtk_seq_job.json ``` Additional flags are available to configure dependency resolution in a more fine grained way - using Conda however has a number of advantages that make it particularily well suited to CWL. Conda packages are distributed as binaries that work across Mac and Linux and work on relatively old version of Linux (great for HPC). Conda also doesn't require root and supports installation of multiple different versions of a package - again these factors make it great for HPC and non-Docker targets. The Biocontainers project (previously Biodocker) dovetails nicely with this. Every version of every Bioconda package has a corresponding best-practice (very lightweight, very small) Docker container on quay.io (assembled by @bgruening and colleagues). There are over 1800 such containers currently. Continuing with the example above, the new ``--beta-use-biocontainers`` flag instructs cwltool to fetch the corresponding Biocontainers container from quay.io automatically or build one to use locally (required for instance for tools with multiple software requirements - fat tools). ``` cwltool --beta-use-biocontainers tests/seqtk_seq.cwl tests/seqtk_seq_job.json ``` These containers contain the same binaries that the package would use locally (outside of Docker). Therefore this technique allows cross platform reproducibility/remixability across CWL, Galaxy, and CLI - both inside and outside of Docker. My sincerest hope is that we move away from CWL-specific Dockerfiles. For less effort, a community bioconda package can be made and the result can be used in many more contexts. The Docker image will then be maintained by the community Biocontainer project. Rebased with correct spelling of DependenciesConfiguration thanks to @tetron.
- Loading branch information
Showing
28 changed files
with
954 additions
and
4 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
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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
>Sequence 561 BP; 135 A; 106 C; 98 G; 222 T; 0 other; | ||
gttcgatgcc taaaatacct tcttttgtcc ctacacagac cacagttttc ctaatggctt | ||
tacaccgact agaaattctt gtgcaagcac taattgaaag cggttggcct agagtgttac | ||
cggtttgtat agctgagcgc gtctcttgcc ctgatcaaag gttcattttc tctactttgg | ||
aagacgttgt ggaagaatac aacaagtacg agtctctccc ccctggtttg ctgattactg | ||
gatacagttg taataccctt cgcaacaccg cgtaactatc tatatgaatt attttccctt | ||
tattatatgt agtaggttcg tctttaatct tcctttagca agtcttttac tgttttcgac | ||
ctcaatgttc atgttcttag gttgttttgg ataatatgcg gtcagtttaa tcttcgttgt | ||
ttcttcttaa aatatttatt catggtttaa tttttggttt gtacttgttc aggggccagt | ||
tcattattta ctctgtttgt atacagcagt tcttttattt ttagtatgat tttaatttaa | ||
aacaattcta atggtcaaaa a |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@EAS54_6_R1_2_1_413_324 | ||
CCCTTCTTGTCTTCAGCGTTTCTCC | ||
+ | ||
;;3;;;;;;;;;;;;7;;;;;;;88 | ||
@EAS54_6_R1_2_1_540_792 | ||
TTGGCAGGCCAAGGCCGATGGATCA | ||
+ | ||
;;;;;;;;;;;7;;;;;-;;;3;83 | ||
@EAS54_6_R1_2_1_443_348 | ||
GTTGCTTCTGGCGTGGGTGGGGGGG | ||
+EAS54_6_R1_2_1_443_348 | ||
;;;;;;;;;;;9;7;;.7;393333 |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
cwlVersion: v1.0 | ||
class: CommandLineTool | ||
id: "seqtk_seq" | ||
doc: "Convert to FASTA (seqtk)" | ||
inputs: | ||
- id: input1 | ||
type: File | ||
inputBinding: | ||
position: 1 | ||
prefix: "-a" | ||
outputs: | ||
- id: output1 | ||
type: File | ||
outputBinding: | ||
glob: out | ||
baseCommand: ["seqtk", "seq"] | ||
arguments: [] | ||
stdout: out | ||
hints: | ||
SoftwareRequirement: | ||
packages: | ||
- package: seqtk | ||
version: | ||
- r93 |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"input1": { | ||
"class": "File", | ||
"location": "2.fastq" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Stubs for galaxy (Python 3.5) | ||
# | ||
# NOTE: This dynamically typed stub was automatically generated by stubgen. | ||
|
||
from typing import Any | ||
|
||
PROJECT_NAME = ... # type: str | ||
PROJECT_OWNER = ... # type: str | ||
PROJECT_USERAME = ... # type: str | ||
PROJECT_URL = ... # type: str | ||
PROJECT_AUTHOR = ... # type: str | ||
PROJECT_EMAIL = ... # type: str | ||
RAW_CONTENT_URL = ... # type: Any |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Stubs for galaxy.tools (Python 3.5) | ||
# | ||
# NOTE: This dynamically typed stub was automatically generated by stubgen. | ||
|
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Stubs for galaxy.tools.deps (Python 3.5) | ||
# | ||
# NOTE: This dynamically typed stub was automatically generated by stubgen. | ||
|
||
from typing import Any, Optional | ||
from .resolvers import NullDependency as NullDependency | ||
from .resolvers.conda import CondaDependencyResolver as CondaDependencyResolver | ||
from .resolvers.galaxy_packages import GalaxyPackageDependencyResolver as GalaxyPackageDependencyResolver | ||
from .resolvers.tool_shed_packages import ToolShedPackageDependencyResolver as ToolShedPackageDependencyResolver | ||
|
||
log = ... # type: Any | ||
EXTRA_CONFIG_KWDS = ... # type: Any | ||
CONFIG_VAL_NOT_FOUND = ... # type: Any | ||
|
||
def build_dependency_manager(config: Any): ... # type: DependencyManager | ||
|
||
class NullDependencyManager: | ||
dependency_resolvers = ... # type: Any | ||
def uses_tool_shed_dependencies(self): ... | ||
def dependency_shell_commands(self, requirements: Any, **kwds) -> List[str]: ... | ||
def find_dep(self, name, version: Optional[Any] = ..., type: str = ..., **kwds): ... | ||
|
||
class DependencyManager: | ||
extra_config = ... # type: Any | ||
default_base_path = ... # type: Any | ||
resolver_classes = ... # type: Any | ||
dependency_resolvers = ... # type: Any | ||
def __init__(self, default_base_path, conf_file: Optional[Any] = ..., **extra_config) -> None: ... | ||
def dependency_shell_commands(self, requirements: Any, **kwds) -> List[str]: ... | ||
def requirements_to_dependencies(self, requirements, **kwds): ... | ||
def uses_tool_shed_dependencies(self): ... | ||
def find_dep(self, name, version: Optional[Any] = ..., type: str = ..., **kwds): ... |
Oops, something went wrong.