else :
if UpdatedStatus == '1':
rec.run_note = "Started ("+mytimestamp+")"
+ rec.run_start_time = datetime.now()
rec.save()
output = "Hello "+settings.ALLOWED_IPS[ClIP]+". Updated to:'"+DataRun.RUN_STATUS_CHOICES[int(UpdatedStatus)][1].__str__()+"'"
return HttpResponse(output)
def generateConfile(request,fcid):
- #granted = False
- #ClIP = request.META['REMOTE_ADDR']
- #if (settings.ALLOWED_IPS.has_key(ClIP)): granted = True
-
- #if not granted: return HttpResponse("access denied.")
-
- cnfgfile = 'READ_LENGTH 25\n'
- cnfgfile += 'ANALYSIS eland_extended\n'
- cnfgfile += 'GENOME_FILE all_chr.fa\n'
- cnfgfile += 'ELAND_MULTIPLE_INSTANCES 8\n'
- genome_dir = 'GENOME_DIR /Volumes/Genomes/'
- eland_genome = 'ELAND_GENOME /Volumes/Genomes/'
-
try:
rec = FlowCell.objects.get(flowcell_id=fcid)
-
+ cnfgfile = 'READ_LENGTH 36\n' # 25
+ if rec.is_paired_end:
+ cnfgfile += 'ANALYSIS eland_pair\n'
+ else:
+ cnfgfile += 'ANALYSIS eland_extended\n'
+ cnfgfile += 'GENOME_FILE all_chr.fa\n'
+ cnfgfile += 'ELAND_MULTIPLE_INSTANCES 8\n'
+ genome_dir = 'GENOME_DIR /mnt/encodedisk6/genomes/' # /Volumes/Genomes/
+ eland_genome = 'ELAND_GENOME /mnt/encodedisk6/genomes/' # /Volumes/Genomes/
+
cnfgfile += '1:'+genome_dir+rec.lane_1_library.library_species.use_genome_build+'\n'
cnfgfile += '1:'+eland_genome+rec.lane_1_library.library_species.use_genome_build+'\n'
return cnfgfile
-def getConfile(request):
+def OLD_getConfile(request):
granted = False
ClIP = request.META['REMOTE_ADDR']
if (settings.ALLOWED_IPS.has_key(ClIP)): granted = True
try:
rec = DataRun.objects.get(run_folder=runfolder) #,flowcell_id=fcid)
cnfgfile = rec.config_params
- #match_str = re.compile(r"READ_LENGTH.+$")
match_str = re.compile('^READ_LENGTH.+')
if not match_str.search(cnfgfile):
cnfgfile = generateConfile(request,fcid)
return HttpResponse(cnfgfile)
+
+def getConfParams(request):
+ granted = False
+ ClIP = request.META['REMOTE_ADDR']
+ if (settings.ALLOWED_IPS.has_key(ClIP)): granted = True
+ if not granted: return HttpResponse("access denied. IP: "+ClIP)
+ fcid = 'none'
+ paramstext = ''
+
+ if request.has_key('fcid'):
+ fcid = request['fcid']
+ try:
+ rec = FlowCell.objects.get(flowcell_id=fcid)
+ paramstext = 'Lane:'+ rec.lane_1_library.library_id +':'+rec.lane_1_library.library_species.use_genome_build
+ paramstext += '\nLane:'+rec.lane_2_library.library_id +':'+rec.lane_2_library.library_species.use_genome_build
+ paramstext += '\nLane:'+rec.lane_3_library.library_id +':'+rec.lane_3_library.library_species.use_genome_build
+ paramstext += '\nLane:'+rec.lane_4_library.library_id +':'+rec.lane_4_library.library_species.use_genome_build
+ paramstext += '\nLane:'+rec.lane_5_library.library_id +':'+rec.lane_5_library.library_species.use_genome_build
+ paramstext += '\nLane:'+rec.lane_6_library.library_id +':'+rec.lane_6_library.library_species.use_genome_build
+ paramstext += '\nLane:'+rec.lane_7_library.library_id +':'+rec.lane_7_library.library_species.use_genome_build
+ paramstext += '\nLane:'+rec.lane_8_library.library_id +':'+rec.lane_8_library.library_species.use_genome_build
+ if rec.is_paired_end: paramstext += '\nIsPairedEnd::1'
+ else: paramstext += '\nIsPairedEnd::0'
+
+ except ObjectDoesNotExist:
+ paramstext = 'Flowcell entry not found for: '+fcid
+ else:
+ paramstext = 'missing input - flowcell id'
+
+ return HttpResponse(paramstext)
+
+
def getLaneLibs(request):
granted = False
ClIP = request.META['REMOTE_ADDR']