...
 
Commits (2)
...@@ -25,7 +25,7 @@ if [ "$cluster" = "mogon" ]; then ...@@ -25,7 +25,7 @@ if [ "$cluster" = "mogon" ]; then
_arg_queue="nodeshort" _arg_queue="nodeshort"
else else
_arg_queue="parallel" _arg_queue="parallel"
_arg_constraint="skylake" _arg_constraint="broadwell"
fi fi
_arg_dependency="" _arg_dependency=""
_arg_tag="" _arg_tag=""
...@@ -38,7 +38,7 @@ _arg_qtrim_format="i1.8" ...@@ -38,7 +38,7 @@ _arg_qtrim_format="i1.8"
SCRIPT="$0" SCRIPT="$0"
SCRIPT_VERSION="0.3.1" SCRIPT_VERSION="0.3.2"
die() die()
{ {
...@@ -132,6 +132,9 @@ credits() ...@@ -132,6 +132,9 @@ credits()
echo "- v0.3.1 -- 22. Feb. 2019 -- bug fixes:" echo "- v0.3.1 -- 22. Feb. 2019 -- bug fixes:"
echo " - striping only, when creating unstriped output dir on MII" echo " - striping only, when creating unstriped output dir on MII"
echo " - preventing to write to HOME" echo " - preventing to write to HOME"
echo "- v0.3.2 -- 18. Oct. 2019 -- bug fixes:"
echo " - mate file was corrupted for paired end cases"
echo " - -o flag appropriately working, now"
echo echo
echo "This script was written by Christian Meesters 2018-2019 (ZDV, HPC group)". echo "This script was written by Christian Meesters 2018-2019 (ZDV, HPC group)".
echo "See https://gitlab.rlp.net/hpc-jgu-lifescience/seq-analysis/blob/master/LICENSE" echo "See https://gitlab.rlp.net/hpc-jgu-lifescience/seq-analysis/blob/master/LICENSE"
...@@ -525,7 +528,7 @@ samples=$(find -L $(realpath "$_arg_inputdir") -type f \( -iname \*.fastq\* -o - ...@@ -525,7 +528,7 @@ samples=$(find -L $(realpath "$_arg_inputdir") -type f \( -iname \*.fastq\* -o -
read -r -a samples <<< $samples read -r -a samples <<< $samples
if [ ${#samples[@]} -eq 0 ]; then if [ ${#samples[@]} -eq 0 ]; then
error "no input found (was looking for '*gz', '*fastq' and '*fq')." error "no input found (was looking for '*fastq*' and '*fq*')."
exit 1 exit 1
fi fi
...@@ -543,40 +546,44 @@ if [ $_arg_paired -eq 1 ]; then ...@@ -543,40 +546,44 @@ if [ $_arg_paired -eq 1 ]; then
fi fi
fi fi
# assume to be true by default # now, we have figured out, which - in paired end scenarios - is the mate pattern
compression=".gz" # overwrite the samples and start afresh
# determine the actual suffix, to determine the compression / no compression type set +e
# just look on the first file set -o pipefail
ffile=${samples[0]} samples=$(find $(realpath $_arg_inputdir) -name '*.gz' | grep -v $second)
if [ ${ffile: -4} = ".bz2" ]; then # hit something?
compression=".bz2" if [ ! -z "$samples" ]; then
elif [ ${ffile: -3} = ".gz" ]; then # transform into array
compression=".gz" read -r -a samples <<< $samples
else compression='.gz'
compression="" fi
fi # nothing found?
if [ ${#samples[@]} -eq 0 ]; then if [ -z "$samples" ]; then
samples=$(find $(realpath $_arg_inputdir) -name '*bz2' | grep -v $second) samples=$(find $(realpath $_arg_inputdir) -name '*.bz2' | grep -v $second)
# transform into array # transform into array
read -r -a samples <<< $samples read -r -a samples <<< $samples
compression='.bz2' compression='.bz2'
fi fi
if [ ${#samples[@]} -eq 0 ]; then #if [ ${#samples[@]} -eq 0 ]; then
samples=$(find $(realpath $_arg_inputdir) -name '*fastq' | grep -v $second) if [ -z "$samples" ]; then
samples=$(find $(realpath $_arg_inputdir) -name '*.fastq' | grep -v $second)
# transform into array # transform into array
read -r -a samples <<< $samples read -r -a samples <<< $samples
compression='' compression=''
fi fi
if [ ${#samples[@]} -eq 0 ]; then #if [ ${#samples[@]} -eq 0 ]; then
samples=$(find $(realpath $_arg_inputdir) -name '*fq' | grep -v $second) if [ -z "$samples" ]; then
samples=$(find $(realpath $_arg_inputdir) -name '*.fq' | grep -v $second)
# transform into array # transform into array
read -r -a samples <<< $samples read -r -a samples <<< $samples
compression='' compression=''
fi fi
if [ ${#samples[@]} -eq 0 ]; then #if [ ${#samples[@]} -eq 0 ]; then
error "no input found (was looking for '*gz', '*fastq' and '*fq')." if [ -z "$samples" ]; then
error "no input found (was looking for '*.gz', '*.bz2', '*.fastq' or '*.fq')."
exit 1 exit 1
fi fi
set -e
### special case for jgu-cbdm ### special case for jgu-cbdm
if [[ "$cluster" = "mogon" && "$_arg_assoc" = "jgu-cbdm" ]]; then if [[ "$cluster" = "mogon" && "$_arg_assoc" = "jgu-cbdm" ]]; then
...@@ -587,7 +594,6 @@ fi ...@@ -587,7 +594,6 @@ fi
JOBTAG="QC_on_$(basename $_arg_inputdir)" JOBTAG="QC_on_$(basename $_arg_inputdir)"
if [[ ! -z "${_arg_tag/ /}" ]]; then if [[ ! -z "${_arg_tag/ /}" ]]; then
JOBTAG=${_arg_tag} JOBTAG=${_arg_tag}
>>>>>>> update_mapper
fi fi
INPUTDIR=$_arg_inputdir INPUTDIR=$_arg_inputdir
...@@ -673,7 +679,6 @@ if [ -z "$SLURM_JOB_ID" ]; then ...@@ -673,7 +679,6 @@ if [ -z "$SLURM_JOB_ID" ]; then
script_statement="${script_statement} $INPUTDIR" script_statement="${script_statement} $INPUTDIR"
# paste them together # paste them together
submit_statement="${submit_statement} ${script_statement}" submit_statement="${submit_statement} ${script_statement}"
echo $submit_statement
if [[ $_arg_test == "on" ]]; then if [[ $_arg_test == "on" ]]; then
exit exit
fi fi
......