Commit 14b36ebe authored by Christoph Ziegenhain's avatar Christoph Ziegenhain
Browse files

prevent error with too little RAM for samtools

parent 46423135
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -88,6 +88,9 @@ checkRsubreadVersion<- function(){
    mempercpu <- round(100/cpu,0)
  }else{
    mempercpu <- round(mem/cpu,0)
    if(mempercpu==0){
      mempercpu <- 1
    }
  }

  system(paste("samtools sort -n -O 'BAM' -@",cpu,paste0("-m ",mempercpu,"G"),"-o",nfn,fn))