Beispiel #1
0
    def job_insert(self):
        if (c.userid == "false"):
             redirect(url('/users/login?m=1'))

        #extra_questions = get_questions(request)
        #form = UserCreationForm(request.POST or None, extra=extra_questions)

        if request.method == 'POST':
            appname  = request.POST['appname']
            if (appname =='tophatfusion'):
               c.form = tophatfusionForm(request.POST,request.POST )
            elif (appname =='bfast') :
               c.form = bfastForm(request.POST,request.POST )
            elif (appname =='chipseq') :
               c.form = chipseqForm(request.POST,request.POST )

            if c.form.is_valid():
                #add using job queue
                jobid =add_job(c.userid)

                for key in c.form.cleaned_data:
                    print("key", key)
                    print("value", c.form.cleaned_data[key])
                    newjobinfo = model.jobinfo()
                    newjobinfo.key = key
                    newjobinfo.value = c.form.cleaned_data[key]
                    newjobinfo.submitted_time = time.asctime()
                    newjobinfo.jobid = jobid
                    add_jobinfo(newjobinfo)

                update_job_status(jobid, str(JOBSTATES.NEW))
                redirect(url('/ngs/job_table_view?m=1&id=' + str(jobid) ))
            else:
                return render('/forms/chipseq_form.mako')
Beispiel #2
0
    def job_insert(self):
        if (c.userid == "false"):
             redirect(url('/users/login?m=1'))

        #extra_questions = get_questions(request)
        #form = UserCreationForm(request.POST or None, extra=extra_questions)

        if request.method == 'POST':
            appname  = request.POST['appname']
            if (appname =='tophatfusion'):
               c.form = tophatfusionForm(request.POST,request.POST )
            elif (appname =='bfast') :
               c.form = bfastForm(request.POST,request.POST )
            elif (appname =='chipseq') :
               c.form = chipseqForm(request.POST,request.POST )

            if c.form.is_valid():
                #add using job queue
                jobid =add_job(c.userid)

                for key in c.form.cleaned_data:
                    print "key", key
                    print "value", c.form.cleaned_data[key]
                    newjobinfo = model.jobinfo()
                    newjobinfo.key = key
                    newjobinfo.value = c.form.cleaned_data[key]
                    newjobinfo.submitted_time = time.asctime()
                    newjobinfo.jobid = jobid
                    add_jobinfo(newjobinfo)

                update_job_status(jobid, str(JOBSTATES.NEW))
                redirect(url('/ngs/job_table_view?m=1&id=' + str(jobid) ))
            else:
                return render('/forms/chipseq_form.mako')
Beispiel #3
0
 def bfast_form(self):
     if (c.userid == "false"):
          redirect(url('/users/login?m=1'))
     c.form = bfastForm()
     return render('/forms/bfast_form.mako')
Beispiel #4
0
 def bfast_form(self):
     if (c.userid == "false"):
          redirect(url('/users/login?m=1'))
     c.form = bfastForm()
     return render('/forms/bfast_form.mako')