Skip to content

Commit

Permalink
finished snATAC demux
Browse files Browse the repository at this point in the history
  • Loading branch information
biomystery committed Jan 16, 2019
1 parent 297f037 commit 0d9de68
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
24 changes: 18 additions & 6 deletions nextseq_app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions utility/runDemuxSnATAC.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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 [email protected] $cmd1


## cmd2:


2 changes: 1 addition & 1 deletion utility/runSetQC.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] $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)"
Expand Down

0 comments on commit 0d9de68

Please sign in to comment.