diff --git a/nextseq_app/views.py b/nextseq_app/views.py index 0aa9adff..e2ca131a 100644 --- a/nextseq_app/views.py +++ b/nextseq_app/views.py @@ -681,8 +681,14 @@ def DemultiplexingView(request, run_pk): RunInfo.objects.filter(pk=run_pk).update(jobstatus='JobSubmitted') # runBcl2fastq - cmd1 = './utility/runBcl2fastq.sh ' + runinfo.Flowcell_ID + \ - ' ' + basedirname + ' ' + request.user.email + if runinfo.experiment_type == 'S2': + cmd1 = './utility/runDemuxSnATAC.sh ' + runinfo.Flowcell_ID + \ + ' ' + basedirname + ' ' + request.user.email + else: + cmd1 = './utility/runBcl2fastq.sh ' + runinfo.Flowcell_ID + \ + ' ' + basedirname + ' ' + request.user.email + print(cmd1) + p = subprocess.Popen( cmd1, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) # thisjobid=p.pid @@ -715,8 +721,8 @@ def DemultiplexingView2(request, run_pk): break # print(data) if 'is_direxists' in data: - shutil.rmtree(os.path.join(basedirname, 'Data/Fastqs')) - os.mkdir(os.path.join(basedirname, 'Data/Fastqs')) + #shutil.rmtree(os.path.join(basedirname, 'Data/Fastqs')) + #os.mkdir(os.path.join(basedirname, 'Data/Fastqs'), exist_ok=True) samples_list = runinfo.librariesinrun_set.all() @@ -817,8 +823,14 @@ def DemultiplexingView2(request, run_pk): RunInfo.objects.filter(pk=run_pk).update(jobstatus='JobSubmitted') # runBcl2fastq - cmd1 = './utility/runBcl2fastq.sh ' + runinfo.Flowcell_ID + \ - ' ' + basedirname + ' ' + request.user.email + if runinfo.experiment_type == 'S2': + cmd1 = './utility/runDemuxSnATAC.sh ' + runinfo.Flowcell_ID + \ + ' ' + basedirname + ' ' + request.user.email + + else: + cmd1 = './utility/runBcl2fastq.sh ' + runinfo.Flowcell_ID + \ + ' ' + basedirname + ' ' + request.user.email + print(cmd1) p = subprocess.Popen( cmd1, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) # thisjobid=p.pid diff --git a/utility/runDemuxSnATAC.sh b/utility/runDemuxSnATAC.sh old mode 100644 new mode 100755 index 9fc4b882..6228bc3a --- a/utility/runDemuxSnATAC.sh +++ b/utility/runDemuxSnATAC.sh @@ -1,11 +1,7 @@ #!/bin/bash -## cmd1: qsub bcl2fastq job +## cmd1: qsub job from tscc flowcell=$1; rundir=$2; useremail=$3 -cmd1="qsub -M $useremail -v flowcell_id=$flowcell,run_dir=$rundir \$(which runBcl2fastq.pbs)" +cmd1="qsub -k oe -M $useremail -v flowcell_id=$flowcell,run_dir=$rundir \$(which runDemuxSnATAC.pbs)" ssh zhc268@tscc-login.sdsc.edu $cmd1 - -## cmd2: - - diff --git a/utility/runSetQC.sh b/utility/runSetQC.sh index 34a9ca79..a6be2697 100755 --- a/utility/runSetQC.sh +++ b/utility/runSetQC.sh @@ -24,7 +24,7 @@ awk -v FS='\t' '(NR>1&&$4=="No"){print $1,$2}' $STATUS_FILE > $RUN_LOG_PIP n_libs=$(wc -l $RUN_LOG_PIP | awk '{print $1}') if [ $n_libs -gt 0 ] then - cmd1="qsub -v samples=${RUN_LOG_PIP} -t 0-$[n_libs-1] -M $USER_EMAIL -q home-epigen -l walltime=16:00:00 \$(which runPipeline_fastq.pbs)" + cmd1="qsub -v samples=${RUN_LOG_PIP} -t 0-$[n_libs-1] -M $USER_EMAIL -q home-epigen -l walltime=16:00:00,pmem=8gb \$(which runPipeline_fastq.pbs)" job1=$(ssh zhc268@tscc-login.sdsc.edu $cmd1) python updateLibrariesSetQC.py -s '1' -id $SET_ID # process libs cmd2="qsub -W depend=afterokarray:$job1 -M $USER_EMAIL -v set_id=$SET_ID,type=$TYPE \$(which runSetQC.pbs)"