Commit ac58a0c1 authored by Sander Bollen's avatar Sander Bollen
Browse files

use full path in softlinks in seqtk.sh

parent 73091256
Pipeline #2447 failed with stage
in 1 minute and 6 seconds
......@@ -22,13 +22,14 @@ input_fastq=${2}
output_fastq=${3}
max_bases=${4}
full_input=$(readlink -f ${input_fastq})
if [[ ${max_bases} -eq 'None' ]]; then
ln -s ${input_fastq} ${output_fastq}
ln -s ${full_input} ${output_fastq}
exit 0
fi
if [[ -z $max_bases ]]; then
ln -s ${input_fastq} ${output_fastq}
ln -s ${full_input} ${output_fastq}
exit 0
fi
......@@ -37,7 +38,7 @@ frac=$(jq -n "$max_bases / $bases" | sed -e "s:e:E:g")
echo $frac
frac_higher_than_one=$(echo "${frac} > 1" | bc )
if [[ ${frac_higher_than_one} -eq 1 ]]; then
ln -s ${input_fastq} ${output_fastq}
ln -s ${full_input} ${output_fastq}
else
seqtk sample -s100 ${input_fastq} ${frac} | gzip -c > ${output_fastq}
fi
Supports Markdown
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