Commit d761949e authored by EC2 Default User's avatar EC2 Default User
Browse files

Remove internal SLURM option

parent 96fcf395
Loading
Loading
Loading
Loading
+44 −47
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@ ui <- fluidPage(
                            numericInput("numThreads","Number of CPU Threads:",value=8,min=1,step=1),
                            numericInput("memLimit","Memory limit (Gb) 0 = no limit:",value=0,step=1),
                            checkboxInput("makeStats",label="Produce summary statistics",value = T),
                            checkboxInput("useSLURM",label="Use SLURM workload manager",value = F),
                            selectInput("whichStage",label = "Start zUMIs from following stage:",choices = c("Filtering", "Mapping", "Counting", "Summarising"),selected = "Filtering",multiple = F)
                          )),

@@ -271,7 +270,6 @@ server <- function(input, output, session) {
        "twoPass" = input$twoPass
      ),
      "make_stats" = input$makeStats,
      "use_SLURM" = input$useSLURM,
      "which_Stage" = input$whichStage
    )
    return(y)
@@ -332,7 +330,6 @@ server <- function(input, output, session) {
      updateNumericInput(session = session, inputId = "numThreads", value = ya$num_threads)
      updateNumericInput(session = session, inputId = "memLimit", value = ya$mem_limit)
      updateCheckboxInput(session = session, inputId = "makeStats", value = ya$make_stats)
      updateCheckboxInput(session = session, inputId = "useSLURM", value = ya$use_SLURM)
      updateSelectInput(session = session, inputId = "whichStage", selected = ya$which_Stage)
      updateCheckboxInput(session = session, inputId = "countIntrons", value = ya$counting_opts$introns)
      updateTextInput(session = session, inputId = "downsamp", value = ya$counting_opts$downsampling)
+1 −45
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ num_threads=`grep 'num_threads' $yaml | awk '{print $2}'`
project=`grep 'project:' $yaml | awk '{print $2}'`
whichStage=`grep 'which_Stage:' $yaml | awk '{print $2}'`
outdir=`grep 'out_dir' $yaml | awk '{print $2}'`
isslurm=`grep 'use_SLURM:' $yaml | awk '{print $2}'`
genomedir=`grep 'STAR_index:' $yaml | awk '{print $2}'`
mem_limit=`grep 'mem_limit:' $yaml | awk '{print $2}'`
isstats=`grep 'make_stats:' $yaml | awk '{print $2}'`
@@ -140,27 +139,6 @@ then

  tmpMerge=$outdir/zUMIs_output/.tmpMerge/

  if [[ "$isslurm" == "yes" ]]; then

    if [[ $f =~ \.gz$ ]]; then
      
      for i in $fqfiles;do sbatch --cpus-per-task=1 --job-name=splitfq --mem=10M --wrap="bash $zumisdir/splitfq.sh $i $pigzexc $num_threads $tmpMerge splitfqgz $project $f" >> $outdir/$project.slurmjobid.txt;done
    else
      for i in $fqfiles;do sbatch --cpus-per-task=1 --job-name=splitfq --mem=10M --wrap="bash $zumisdir/splitfq.sh $i $pigzexc $num_threads $tmpMerge splitfq $project $f" >> $outdir/$project.slurmjobid.txt;done
    fi

    j=`cat $outdir/$project.slurmjobid.txt | cut -f4 -d' ' | tr '\n' ':' | sed 's/.$//'`

    sbatch --cpus-per-task=1 --job-name=listPrefix --dependency=afterok:$j --mem=1M --wrap="bash $zumisdir/listPrefix.sh $zumisdir $tmpMerge $f $project $yaml $samtoolsexc $Rexc $pigzexc" >> $outdir/$project.slurmjobid.txt

    j=`cat $outdir/$project.slurmjobid.txt | cut -f4 -d' ' | tr '\n' ':' | sed 's/.$//'`
	
    sbatch --cpus-per-task=1 --job-name=mergeBAM --dependency=afterok:$j --mem=1M --wrap="bash $zumisdir/mergeBAM.sh $zumisdir $tmpMerge $num_threads $project $outdir $yaml" >> $outdir/$project.slurmjobid.txt

    j=`cat $outdir/$project.slurmjobid.txt | cut -f4 -d' ' | tr '\n' ':' | sed 's/.$//'`

  else

    if [[ $f =~ \.gz$ ]]; then
      for i in $fqfiles;do bash $zumisdir/splitfq.sh $i $pigzexc $num_threads $tmpMerge splitfqgz $project $f & done
      wait
@@ -177,21 +155,14 @@ then
    wait
    bash $zumisdir/mergeBAM.sh $zumisdir $tmpMerge $num_threads $project $outdir $yaml
fi
fi

if
[[ "$whichStage" == "Filtering" ]] ||
[[ "$whichStage" == "Mapping" ]]
then
  echo "Mapping..."
  if [[ "$isslurm" == "yes" ]]; then
    memory=`du -sh $genomedir | cut -f1` #STAR genome index size
    j=`cat $outdir/$project.slurmjobid.txt | cut -f4 -d' ' | tr '\n' ':' | sed 's/.$//'`
    sbatch --dependency=afterok:$j --job-name=mapping --mem=$memory --cpus-per-task=$num_threads --wrap="$Rexc $zumisdir/zUMIs-mapping.R $yaml" >> $outdir/$project.slurmjobid.txt
  else
    $Rexc $zumisdir/zUMIs-mapping.R $yaml
fi
fi

if
[[ "$whichStage" == "Filtering" ]] ||
@@ -200,18 +171,8 @@ if
then
  echo "Counting..."
  yamlnew=$outdir/$project.postmap.yaml  #note! mapping creates a temporary new yaml because of custom GTF!
  if [[ "$isslurm" == "yes" ]]; then
    if [[ $mem_limit == "null" ]]; then
      mem_limit=`du -sh $genomedir | cut -f1`
    else
      mem_limit=`expr $mem_limit \* 1000`
    fi
    j=`cat $outdir/$project.slurmjobid.txt | cut -f4 -d' ' | tr '\n' ':' | sed 's/.$//'`
    sbatch --dependency=afterok:$j --mem=$mem_limit --job-name=dge --cpus-per-task=$num_threads --wrap="$Rexc $zumisdir/zUMIs-dge2.R $yamlnew" >> $outdir/$project.slurmjobid.txt
   else
  $Rexc $zumisdir/zUMIs-dge2.R $yamlnew
fi
fi

if
[[ "$whichStage" == "Filtering" ]] ||
@@ -222,11 +183,6 @@ then
  yamlnew=$outdir/$project.postmap.yaml  #note! mapping creates a temporary new yaml because of custom GTF!
  if [[ "$isstats" == "yes" ]]; then
    echo "Descriptive statistics..."
    if [[ "$isslurm" == "yes" ]]; then
      j=`cat $outdir/$project.slurmjobid.txt | cut -f4 -d' ' | tr '\n' ':' | sed 's/.$//'`
      sbatch --dependency=afterok:$j --mem=5000 --job-name=stats --cpus-per-task=$num_threads --wrap="$Rexc $zumisdir/zUMIs-stats2.R $yamlnew" >> $outdir/$project.slurmjobid.txt
    else
      $Rexc $zumisdir/zUMIs-stats2.R $yamlnew
  fi
fi
fi
+0 −2
Original line number Diff line number Diff line
@@ -75,8 +75,6 @@ counting_opts:
#produce stats files and plots?
make_stats: yes

#use SLURM workload manger?
use_SLURM: no

#Start zUMIs from stage. Possible TEXT(Filtering, Mapping, Counting, Summarising). Default: Filtering.
which_Stage: Filtering