-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request #21 from apriltuesday/conda
EVA-3439 - Conda build
- Loading branch information
Showing
6 changed files
with
158 additions
and
5 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 |
---|---|---|
|
@@ -4,7 +4,48 @@ EVA Submission Command Line Interface for Validation | |
|
||
## Installation | ||
|
||
TBD | ||
There are currently three ways to install and run the tool: using conda, from source using Docker, | ||
and from source natively (i.e. managing dependencies on your own). | ||
|
||
### Conda | ||
|
||
The most straightforward way to install eva-sub-cli and its dependencies is through conda. | ||
For example the following installs eva-sub-cli in a new environment called `eva`, activates the environment, and prints | ||
the help message: | ||
```bash | ||
conda create -n eva -c conda-forge -c bioconda eva-sub-cli | ||
conda activate eva | ||
eva-sub-cli.py --help | ||
```` | ||
|
||
### From source using Docker | ||
|
||
This method requires just Python 3.8+ and [Docker](https://docs.docker.com/engine/install/) to be installed. | ||
Then either clone the git repository, or download the newest tagged release from [here](https://github.com/EBIvariation/eva-sub-cli/tags): | ||
```bash | ||
git clone [email protected]:EBIvariation/eva-sub-cli.git | ||
# OR | ||
wget -O eva-sub-cli.zip https://github.com/EBIvariation/eva-sub-cli/archive/refs/tags/v0.2.zip | ||
unzip eva-sub-cli.zip | ||
``` | ||
|
||
Then install the library and its dependencies as follows (e.g. in a virtual environment): | ||
```bash | ||
cd eva-sub-cli | ||
pip install -r requirements.txt | ||
python setup.py install | ||
``` | ||
|
||
### From source natively | ||
|
||
This method requires the following: | ||
* Python 3.8+ | ||
* [Nextflow](https://www.nextflow.io/docs/latest/getstarted.html) 21.10+ | ||
* [biovalidator](https://github.com/elixir-europe/biovalidator) 2.1.0+ | ||
* [vcf-validator](https://github.com/EBIvariation/vcf-validator) 0.9.6+ | ||
|
||
Install each of these and ensure they are available on the path. | ||
Then git clone the repo or install the newest release as described above. | ||
|
||
## Input files for the validation and submission tool | ||
|
||
|
@@ -46,6 +87,9 @@ More detail documentation to follow | |
|
||
## Execution | ||
|
||
Note for Docker users: for each of the below commands, add the command line option `--executor docker`, which will | ||
fetch and manage the docker container for you. | ||
|
||
### Validate and submit your dataset | ||
|
||
To validate and submit run the following command | ||
|
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,48 @@ | ||
#!/bin/bash | ||
|
||
VCF_VALIDATOR_VERSION=0.9.6 | ||
BIOVALIDATOR_VERSION=2.1.0 | ||
EVA_PYUTILS_VERSION=0.6.1 | ||
|
||
EVA_SUB_CLI="${PREFIX}/share/${PKG_NAME}-${PKG_VERSION}" | ||
mkdir -p ${PREFIX}/bin ${EVA_SUB_CLI} | ||
|
||
# Install eva-sub-cli | ||
$PYTHON -m pip install . | ||
cp bin/* ${PREFIX}/bin | ||
echo "Done with eva-sub-cli" | ||
|
||
cd ${EVA_SUB_CLI} | ||
|
||
# Install python dependencies not yet on conda | ||
curl -Lo eva-pyutils.zip https://github.com/EBIvariation/eva-common-pyutils/archive/refs/tags/v${EVA_PYUTILS_VERSION}.zip \ | ||
&& unzip eva-pyutils.zip && rm eva-pyutils.zip \ | ||
&& cd eva-common-pyutils-${EVA_PYUTILS_VERSION} \ | ||
&& $PYTHON setup.py install \ | ||
&& cd .. | ||
|
||
# Install biovalidator from source | ||
# Includes some workarounds that can be cleaned up once a new version is released | ||
curl -Lo biovalidator.zip https://github.com/elixir-europe/biovalidator/archive/refs/tags/v${BIOVALIDATOR_VERSION}.zip \ | ||
&& unzip biovalidator.zip && rm biovalidator.zip \ | ||
&& cd biovalidator-${BIOVALIDATOR_VERSION} \ | ||
&& bash -c "cat <(echo '#!/usr/bin/env node') <(cat src/biovalidator.js) > tmp" \ | ||
&& mv tmp src/biovalidator.js \ | ||
&& chmod +x src/biovalidator.js \ | ||
&& sed -i 's/dist/src/' package.json \ | ||
&& npm install && npm install -g \ | ||
&& cd .. | ||
echo "Done with biovalidator" | ||
|
||
# Download pre-built vcf-validator | ||
# Check if linux or osx | ||
if [ -z ${OSX_ARCH+x} ]; then | ||
curl -LJo ${PREFIX}/bin/vcf_validator https://github.com/EBIvariation/vcf-validator/releases/download/v${VCF_VALIDATOR_VERSION}/vcf_validator_linux \ | ||
&& curl -LJo ${PREFIX}/bin/vcf_assembly_checker https://github.com/EBIvariation/vcf-validator/releases/download/v${VCF_VALIDATOR_VERSION}/vcf_assembly_checker_linux \ | ||
&& chmod 755 ${PREFIX}/bin/vcf_assembly_checker ${PREFIX}/bin/vcf_validator | ||
else | ||
curl -LJo ${PREFIX}/bin/vcf_validator https://github.com/EBIvariation/vcf-validator/releases/download/v${VCF_VALIDATOR_VERSION}/vcf_validator_macos \ | ||
&& curl -LJo ${PREFIX}/bin/vcf_assembly_checker https://github.com/EBIvariation/vcf-validator/releases/download/v${VCF_VALIDATOR_VERSION}/vcf_assembly_checker_macos \ | ||
&& chmod 755 ${PREFIX}/bin/vcf_assembly_checker ${PREFIX}/bin/vcf_validator | ||
fi | ||
echo "Done with vcf-validator" |
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,57 @@ | ||
{% set name = "eva-sub-cli" %} | ||
{% set version = "0.2" %} | ||
|
||
package: | ||
name: {{ name }} | ||
version: {{ version }} | ||
|
||
source: | ||
path: ../ | ||
# For submission to bioconda recipes, replace 'path' with the following (filling in the appropriate sha256): | ||
# url: https://github.com/EBIvariation/eva-sub-cli/archive/v{{version}}.tar.gz | ||
# sha256: | ||
|
||
build: | ||
number: 0 | ||
noarch: generic | ||
preserve_egg_dir: True | ||
# For submission to bioconda recipes, replace 'preserve_egg_dir' with the following: | ||
# run_exports: | ||
# - {{ pin_subpackage(name, max_pin="x.x") }} | ||
|
||
requirements: | ||
host: | ||
- nextflow >=21.10.0 | ||
- python >=3.8 | ||
- nodejs >=10.19.1 | ||
- pyyaml | ||
- jinja2 | ||
- openpyxl | ||
- requests | ||
- jsonschema | ||
run: | ||
- nextflow >=21.10.0 | ||
- python >=3.8 | ||
- pyyaml | ||
- jinja2 | ||
- openpyxl | ||
- requests | ||
- jsonschema | ||
|
||
test: | ||
imports: | ||
- eva_sub_cli | ||
commands: | ||
- biovalidator --help | ||
- vcf_validator --help | ||
- eva-sub-cli.py --help | ||
|
||
about: | ||
home: https://github.com/EBIvariation/eva-sub-cli | ||
summary: EVA Submission Command Line Interface | ||
license: Apache-2.0 | ||
license_file: LICENSE | ||
|
||
extra: | ||
recipe-maintainers: | ||
- apriltuesday |
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 @@ | ||
0.1 | ||
0.2 |
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