### About
Python package to replace [BioWardrobe's](https://github.com/Barski-lab/biowardrobe) python/cron scripts. It uses
[Apache-Airflow](https://github.com/apache/incubator-airflow)
functionality with [CWL v1.0](http://www.commonwl.org/v1.0/).
### Install
1. Add biowardrobe MySQL connection into Airflow connections
```sql
select * from airflow.connection;
insert into airflow.connection values(NULL,'biowardrobe','mysql','localhost','ems','wardrobe','',null,'{"cursor":"dictcursor"}',0,0);
```
2. Install
```sh
sudo pip3 install .
```
### Requirements
1. Make sure your system satisfies the following criteria:
- Ubuntu 16.04.3
- python3.6
```sh
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6
```
- pip3
```sh
curl https://bootstrap.pypa.io/get-pip.py | sudo python3.6
pip3 install --upgrade pip3
```
- setuptools
```sh
pip3 install setuptools
```
- [docker](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/)
```sh
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
sudo groupadd docker
sudo usermod -aG docker $USER
```
Log out and log back in so that your group membership is re-evaluated.
- libmysqlclient-dev
```sh
sudo apt-get install libmysqlclient-dev
```
- nodejs
```sh
sudo apt-get install nodejs
```
2. Get the latest version of `cwl-airflow-parser`.
If **[Apache-Airflow](https://github.com/apache/incubator-airflow)**
or **[cwltool](http://www.commonwl.org/ "cwltool main page")** aren't installed,
installation will be done automatically with recommended versions. Set `AIRFLOW_HOME` environment
variable to airflow config directory default is `~/airflow/`.
```sh
git clone https://github.com/datirium/cwl-airflow-parser.git
cd cwl-airflow-parser
sudo pip3 install .
```
3. If required, add **[extra airflow packages](https://airflow.incubator.apache.org/installation.html#extra-packages)**
for extending Airflow functionality, for instance, with MySQL support `pip3 install apache-airflow[mysql]`.
### Running
1. To create BioWardrobe's dags run `biowardrobe-init` in airflow's dags directory
```
cd ~/airflow/dags
./biowardrobe-init
```
2. Run Airflow scheduler:
```sh
airflow scheduler
```
3. Use `airflow trigger_dag` with input parameter `--conf "JSON"` where JSON is either job definition or biowardrobe_uid
and explicitly specified cwl descriptor `dag_id`.
```sh
airflow trigger_dag --conf "{\"job\":$(cat ./hg19.job)}" "bowtie-index"
```
where `hg19.job` is:
```json
{
"fasta_input_file": {
"class": "File",
"location": "file:///wardrobe/indices/bowtie/hg19/chrM.fa",
"format":"http://edamontology.org/format_1929",
"size": 16909,
"basename": "chrM.fa",
"nameroot": "chrM",
"nameext": ".fa"
},
"output_folder": "/wardrobe/indices/bowtie/hg19/",
"threads": 6,
"genome": "hg19"
}
```
4. All the output will be moved from temporary directory into **output_folder** parameter
of the job.
Metadata
Release files for biowardrobe-airflow-analysis 1.0.20180430223646
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| biowardrobe-airflow-analysis-1.0.20180430223646.tar.gz | 28.2 kB | Without provenance | Details for biowardrobe-airflow-analysis-1.0.20180430223646.tar.gz |
Release files / biowardrobe-airflow-analysis-1.0.20180430223646.tar.gz
| Download URL | biowardrobe-airflow-analysis-1.0.20180430223646.tar.gz |
|---|---|
| Size | 28.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9050ab6b31457c05d6c3be95319ff82c63a04300423eaf31e61ff748e1c6a6e0
|
|
BLAKE2b-256 checksum How to use checksums |
414d334ef08ebbaf975f0000137ca984ec5ecabfab030ed547d5f716a7967edc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for biowardrobe-airflow-analysis 1.0.20180430223646
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.