Skip to content
Snippets Groups Projects
Commit 8431633e authored by Blaise Li's avatar Blaise Li
Browse files

Script and links to start pipelines more easily.

parent 1bba523f
No related branches found
No related tags found
No related merge requests found
CLIP
\ No newline at end of file
iCLIP.snakefile
\ No newline at end of file
PRO-seq
\ No newline at end of file
PRO-seq.snakefile
\ No newline at end of file
RNA_Seq_Cecere
\ No newline at end of file
iCLIP 0 → 120000
CLIP
\ No newline at end of file
iCLIP
\ No newline at end of file
run_pipeline.sh
\ No newline at end of file
run_pipeline.sh
\ No newline at end of file
run_pipeline.sh
\ No newline at end of file
run_pipeline.sh
\ No newline at end of file
run_pipeline.sh
\ No newline at end of file
run_pipeline.sh
\ No newline at end of file
#!/bin/bash
# Usage: run_pipeline.sh [<snakefile>] <configuration_file> [extra arguments for snakemake]
# If no snakefile is provided, the script should be called from one of its aliases.
# Each alias will run a specific pipeline, depending on its name.
# http://linuxcommand.org/wss0150.php
PROGNAME=$(basename "${0}")
function error_exit
{
# ----------------------------------------------------------------
# Function for exit due to fatal program error
# Accepts 1 argument:
# string containing descriptive error message
# ----------------------------------------------------------------
echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2
exit 1
}
# https://stackoverflow.com/a/1638397/1878788
# Absolute path to this script
SCRIPT=$(readlink -f "${0}")
# Absolute path this script is in
BASEDIR=$(dirname "${SCRIPT}")
# This script can be called from various symbolic links.
# The name of the link determines which snakefile to use.
# PRO-seq and GRO-seq are actually the same pipeline
# similarly for sRNA-seq and small_RNA-seq
# similarly for iCLIP-seq and iCLIP
case "${PROGNAME}" in
"run_RNA-seq_pipeline")
snakefile="${BASEDIR}/RNA-seq/RNA-seq.snakefile"
;;
"run_GRO-seq_pipeline")
snakefile="${BASEDIR}/PRO-seq/GRO-seq.snakefile"
;;
"run_PRO-seq_pipeline")
snakefile="${BASEDIR}/PRO-seq/PRO-seq.snakefile"
;;
"run_small_RNA-seq_pipeline")
snakefile="${BASEDIR}/small_RNA-seq/small_RNA-seq.snakefile"
;;
"run_sRNA-seq_pipeline")
snakefile="${BASEDIR}/sRNA-seq/sRNA-seq.snakefile"
;;
"run_iCLIP-seq_pipeline")
snakefile="${BASEDIR}/iCLIP-seq/iCLIP-seq.snakefile"
;;
"run_iCLIP_pipeline")
snakefile="${BASEDIR}/iCLIP/iCLIP.snakefile"
;;
"run_Ribo-seq_pipeline")
snakefile="${BASEDIR}/Ribo-seq/Ribo-seq.snakefile"
;;
*)
snakefile="${1}"
shift
;;
esac
configfile="${1}"
shift
if [ -e ${configfile} ]
then
cmd="snakemake -s ${snakefile} --configfile ${configfile} $@"
else
error_exit "Pipeline configuration file ${configfile} not found."
fi
echo ${cmd}
eval ${cmd} || error_exit "${cmd} failed"
exit 0
run_pipeline.sh
\ No newline at end of file
run_pipeline.sh
\ No newline at end of file
small_RNA-seq.snakefile
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment