};
function set_up_the_run {
- FROM_SRR_SRR=$1
- FROM_SRR_REF=$2
- FROM_SRR_GTF=$3
+ FROM_SRR_SRR="$1"
+ FROM_SRR_REF="$2"
+ FROM_SRR_GTF="$3"
export FROM_SRR_SRR FROM_SRR_GTF FROM_SRR_REF;
- mkdir -p $FROM_SRR_SRR;
+ mkdir -p "$FROM_SRR_SRR";
set -e;
(cd $FROM_SRR_SRR;
wget -O ${FROM_SRR_SRR}.sra ftp://ftp-trace.ncbi.nlm.nih.gov:/sra/sra-instant/reads/ByRun/sra/SRR/${SRR:0:6}/${FROM_SRR_SRR}/${FROM_SRR_SRR}.sra;
};
-if [ -z "$1" ] || [ -z "$2"] || [ -z "$3" ]; then
+if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
if [ -z "$FROM_SRR_SRR" ]; then
actually_run_the_alignment;
exit 0;
fi;
else
- set_up_the_run;
+ set_up_the_run "$1" "$2" "$3";
exit 0;
fi;
echo "You need to give an SRR, REF, and GTF on the command line";