This repository has been archived by the owner on May 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ikit
committed
Oct 6, 2016
1 parent
8df7e72
commit 8401bc3
Showing
2 changed files
with
83 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# PirusBasic Pipeline | ||
|
||
This document explain you how to build a simple pipeline image for Pirus. | ||
|
||
## Requirement | ||
* You need LXD on your computer to create it | ||
* You should read the official doc of Pirus | ||
|
||
##Instructions | ||
|
||
# create a container | ||
lxc launch images:ubuntu/xenial pirus | ||
# configure it | ||
lxc exec pirus -- /bin/bash | ||
|
||
# following directories are mandatory | ||
mkdir /pipeline/run | ||
mkdir /pipeline/inputs | ||
mkdir /pipeline/outputs | ||
mkdir /pipeline/logs | ||
mkdir /pipeline/db | ||
|
||
# need curl if you want to notify server with the progress of your run | ||
apt install curl | ||
|
||
# the script run.sh is the "entry point" of your run | ||
echo "curl ${NOTIFY}50" > /pipeline/run/run.sh | ||
echo "ls -l /pipeline/database/db > /pipeline/outputs/result.txt" >> /pipeline/run/run.sh | ||
chmod +x /pipeline/run/run.sh | ||
|
||
# exit the container | ||
exit | ||
|
||
# stop it and create an image | ||
lxc stop pirus | ||
lxc publish pirus --alias=PirusSimple | ||
|
||
# Your Pipeline is ready to use on your server | ||
|
||
|
||
## TODO : export image as file and edit image conf to create a piruse package installable on any pirus server |
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,42 @@ | ||
#!/bin/sh | ||
# coding: utf-8 | ||
|
||
|
||
DB="/pipeline/db/" | ||
OUT="/pipeline/outputs/" | ||
IN="/pipeline/inputs/" | ||
LOG="/pipeline/logs/" | ||
RUN="/pipeline/run/" | ||
|
||
|
||
echo "START Plugin de test" | ||
echo "====================" | ||
cd ${RUN} | ||
pwd | ||
ls -l | ||
|
||
echo "Environment" | ||
echo "===========" | ||
env | ||
|
||
echo "Inputs files" | ||
echo "============" | ||
ls -l ${IN} | ||
|
||
|
||
echo "Loop" | ||
echo "====" | ||
for i in `seq 0 100` | ||
do | ||
echo "$i %" | ||
curl "$NOTIFY$i" | ||
sleep 1 | ||
done | ||
|
||
echo "Create output file" | ||
echo "==================" | ||
echo "Gene in refGene that have more than 50 exons:" > ${OUT}refGenAnalysis.txt | ||
zcat ${DB}refGene.txt.gz | awk '$9 > 50{print $13}' >> ${OUT}refGenAnalysis.txt | ||
|
||
echo "Done" | ||
echo "====" |