Skip to content
This repository has been archived by the owner on May 26, 2018. It is now read-only.

Commit

Permalink
fix #9
Browse files Browse the repository at this point in the history
  • Loading branch information
ikit committed Oct 6, 2016
1 parent 8df7e72 commit 8401bc3
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
41 changes: 41 additions & 0 deletions examples/pipelines/PirusBasic/readme.md
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
42 changes: 42 additions & 0 deletions examples/pipelines/PirusBasic/run.sh
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 "===="

0 comments on commit 8401bc3

Please sign in to comment.