Commit 8fba6bd9 authored by Venkat Malladi's avatar Venkat Malladi
Browse files

Add usage statement.

parent d9e3b2b4
Pipeline #6322 failed with stages
in 456 minutes and 1 second
......@@ -488,7 +488,6 @@ process plotProfile {
output:
file '*.{png,gz}' into plotProfile
file gtf from gtfFile
when:
......@@ -497,7 +496,7 @@ process plotProfile {
script:
"""
module load deeptools/2.5.0.1
bash $baseDir/scripts/plot_profile.sh
bash $baseDir/scripts/plot_profile.sh -g $gtfFile
"""
}
......
#!/bin/bash
#plot_profile.sh
script_name="plot_profile.sh"
#Help function
usage() {
echo "-h --Help documentation for $script_name"
echo "-g --File path to gtf/bed files"
echo "Example: $script_name -g 'genome.gtf'"
exit 1
}
raise()
{
echo "${1}" >&2
......@@ -55,8 +66,25 @@ plot_profile() {
run_main() {
# Parsing options
OPTIND=1 # Reset OPTIND
while getopts :g:h opt
do
case $opt in
g) gtf=$OPTARG;;
h) usage;;
esac
done
shift $(($OPTIND -1))
# Check for mandatory options
if [[ -z $gtf ]]; then
usage
fi
bws=$(ls *.bw)
gtf=$(ls *.gtf *.bed)
check_tools || exit 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment