Unverified Commit e0a12c31 authored by Xavi Moreno's avatar Xavi Moreno Committed by GitHub
Browse files

Update zUMIs.sh

This is a small optimization suggestion. There is no need to use `cat` to pipe `head` since `head` can read the file and stop when reaching the number of lines.
parent 60f7965c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ if [[ "${whichStage}" == "Filtering" ]] ; then
      pref=$(basename ${f} .gz)
      l=$(ls ${tmpMerge}${pref}* | sed "s|${tmpMerge}${pref}||" | sed 's/.gz//')
  else
      cat ${f} | head -n 4000000 > ${tmpMerge}/${project}.1mio.check.fq
      head -n 4000000 ${f} > ${tmpMerge}/${project}.1mio.check.fq
      smallsize=$(stat --printf="%s" ${tmpMerge}/${project}.1mio.check.fq)
      rm ${tmpMerge}/${project}.1mio.check.fq
      nreads=$(expr ${fullsize} \* 1000000 / ${smallsize})