Skip to content

Commit

Permalink
added --reduced option to bam2*/sam2* wrapper scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpreynolds committed Jul 17, 2017
1 parent 611da80 commit 3800d8d
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
10 changes: 9 additions & 1 deletion applications/bed/conversion/src/wrappers/bam2bed
Expand Up @@ -37,14 +37,15 @@ all_reads=false
keep_header=false
split=false
split_with_deletions=false
reduced=false

help()
{
${cmd} --help-bam
exit $1
}

optspec=":r:m:dhaksS-:"
optspec=":r:m:dhaksSR-:"
while getopts "$optspec" optchar; do
case "${optchar}" in
-)
Expand Down Expand Up @@ -98,6 +99,9 @@ while getopts "$optspec" optchar; do
split-with-deletions)
split_with_deletions=true
;;
reduced)
reduced=true
;;
*)
help 1
#if [ "$OPTERR" = 1 ] && [ "${optspec:0:1}" != ":" ]; then echo "Unknown option --${OPTARG}" >&2; fi
Expand Down Expand Up @@ -129,6 +133,9 @@ while getopts "$optspec" optchar; do
S)
split_with_deletions=true
;;
R)
reduced=true
;;
*)
help 1
#if [ "$OPTERR" != 1 ] || [ "${optspec:0:1}" = ":" ]; then echo "Non-option argument: '-${OPTARG}'" >&2; fi
Expand All @@ -152,5 +159,6 @@ if [ "${all_reads}" = true ]; then options="${options} --all-reads"; fi
if [ "${keep_header}" = true ]; then options="${options} --keep-header"; fi
if [ "${split}" = true ]; then options="${options} --split"; fi
if [ "${split_with_deletions}" = true ]; then options="${options} --split-with-deletions"; fi
if [ "${reduced}" = true ]; then options="${options} --reduced"; fi

${cmd} ${options} - <&0
10 changes: 9 additions & 1 deletion applications/bed/conversion/src/wrappers/bam2starch
Expand Up @@ -41,14 +41,15 @@ all_reads=false
keep_header=false
split=false
split_with_deletions=false
reduced=false

help()
{
${cmd} --help-bam
exit $1
}

optspec=":e:zgr:m:dhaksS-:"
optspec=":e:zgr:m:dhaksSR-:"
while getopts "$optspec" optchar; do
case "${optchar}" in
-)
Expand Down Expand Up @@ -118,6 +119,9 @@ while getopts "$optspec" optchar; do
split-with-deletions)
split_with_deletions=true
;;
reduced)
reduced=true
;;
*)
help 1
#if [ "$OPTERR" = 1 ] && [ "${optspec:0:1}" != ":" ]; then echo "Unknown option --${OPTARG}" >&2; fi
Expand Down Expand Up @@ -159,6 +163,9 @@ while getopts "$optspec" optchar; do
S)
split_with_deletions=true
;;
R)
reduced=true
;;
*)
help 1
#if [ "$OPTERR" != 1 ] || [ "${optspec:0:1}" = ":" ]; then echo "Non-option argument: '-${OPTARG}'" >&2; fi
Expand All @@ -185,5 +192,6 @@ if [ "${all_reads}" = true ]; then options="${options} --all-reads"; fi
if [ "${keep_header}" = true ]; then options="${options} --keep-header"; fi
if [ "${split}" = true ]; then options="${options} --split"; fi
if [ "${split_with_deletions}" = true ]; then options="${options} --split-with-deletions"; fi
if [ "${reduced}" = true ]; then options="${options} --reduced"; fi

${cmd} ${options} - <&0
10 changes: 9 additions & 1 deletion applications/bed/conversion/src/wrappers/sam2bed
Expand Up @@ -37,14 +37,15 @@ all_reads=false
keep_header=false
split=false
split_with_deletions=false
reduced=false

help()
{
${cmd} --help-sam
exit $1
}

optspec=":r:m:dhaksS-:"
optspec=":r:m:dhaksSR-:"
while getopts "$optspec" optchar; do
case "${optchar}" in
-)
Expand Down Expand Up @@ -98,6 +99,9 @@ while getopts "$optspec" optchar; do
split-with-deletions)
split_with_deletions=true
;;
reduced)
reduced=true
;;
*)
help 1
#if [ "$OPTERR" = 1 ] && [ "${optspec:0:1}" != ":" ]; then echo "Unknown option --${OPTARG}" >&2; fi
Expand Down Expand Up @@ -129,6 +133,9 @@ while getopts "$optspec" optchar; do
S)
split_with_deletions=true
;;
R)
reduced=true
;;
*)
help 1
#if [ "$OPTERR" != 1 ] || [ "${optspec:0:1}" = ":" ]; then echo "Non-option argument: '-${OPTARG}'" >&2; fi
Expand All @@ -152,5 +159,6 @@ if [ "${all_reads}" = true ]; then options="${options} --all-reads"; fi
if [ "${keep_header}" = true ]; then options="${options} --keep-header"; fi
if [ "${split}" = true ]; then options="${options} --split"; fi
if [ "${split_with_deletions}" = true ]; then options="${options} --split-with-deletions"; fi
if [ "${reduced}" = true ]; then options="${options} --reduced"; fi

${cmd} ${options} - <&0
10 changes: 9 additions & 1 deletion applications/bed/conversion/src/wrappers/sam2starch
Expand Up @@ -41,14 +41,15 @@ all_reads=false
keep_header=false
split=false
split_with_deletions=false
reduced=false

help()
{
${cmd} --help-sam
exit $1
}

optspec=":e:zgr:m:dhaks-:"
optspec=":e:zgr:m:dhaksSR-:"
while getopts "$optspec" optchar; do
case "${optchar}" in
-)
Expand Down Expand Up @@ -118,6 +119,9 @@ while getopts "$optspec" optchar; do
split-with-deletions)
split_with_deletions=true
;;
reduced)
reduced=true
;;
*)
help 1
#if [ "$OPTERR" = 1 ] && [ "${optspec:0:1}" != ":" ]; then echo "Unknown option --${OPTARG}" >&2; fi
Expand Down Expand Up @@ -159,6 +163,9 @@ while getopts "$optspec" optchar; do
S)
split_with_deletions=true
;;
R)
reduced=true
;;
*)
help 1
#if [ "$OPTERR" != 1 ] || [ "${optspec:0:1}" = ":" ]; then echo "Non-option argument: '-${OPTARG}'" >&2; fi
Expand All @@ -185,5 +192,6 @@ if [ "${all_reads}" = true ]; then options="${options} --all-reads"; fi
if [ "${keep_header}" = true ]; then options="${options} --keep-header"; fi
if [ "${split}" = true ]; then options="${options} --split"; fi
if [ "${split_with_deletions}" = true ]; then options="${options} --split-with-deletions"; fi
if [ "${reduced}" = true ]; then options="${options} --reduced"; fi

${cmd} ${options} - <&0

0 comments on commit 3800d8d

Please sign in to comment.