+++ /dev/null
-from django.conf.urls.defaults import *
-
-urlpatterns = patterns('',
- (r'^updStatus$', 'htswfrontend.analys_track.main.updStatus'),
- (r'^getProjects/$', 'htswfrontend.analys_track.main.getProjects'),
-)
from datetime import datetime
from string import *
import re
-from htswfrontend import settings
-from htswfrontend.analys_track.models import Task, Project
+from htsworkflow.frontend import settings
+from htsworkflow.frontend.analysis.models import Task, Project
from django.core.exceptions import ObjectDoesNotExist
def updStatus(request):
from django.db import models
from datetime import datetime
-from htswfrontend.fctracker.models import Library
+from htsworkflow.frontend.samples.models import Library
from string import *
class Task(models.Model):
## userid = # logged in user
task_status = models.CharField(max_length=500,blank=True,null=True,default='defined')
results_location = models.CharField(max_length=2000,blank=True,null=True)
- submitted_on = models.DateTimeField(core=True,default=datetime.now())
+ submitted_on = models.DateTimeField(default=datetime.now())
run_note = models.CharField(max_length=500,blank=True,null=True)
def __str__(self):
--- /dev/null
+from django.conf.urls.defaults import *
+
+urlpatterns = patterns('',
+ (r'^updStatus$', 'htsworkflow.frontend.analysis.main.updStatus'),
+ (r'^getProjects/$', 'htsworkflow.frontend.analysis.main.getProjects'),
+)
from htsworkflow.frontend.eland_config import forms
from htsworkflow.frontend import settings
-from htsworkflow.frontend.fctracker import models
+from htsworkflow.frontend.samples import models
import os
import glob
+++ /dev/null
-from django.conf.urls.defaults import *
-
-urlpatterns = patterns('',
-
- (r'^$', 'htswfrontend.exp_track.views.index'),
- (r'^liblist$', 'htswfrontend.exp_track.views.test_Libs'),
- #(r'^(?P<run_folder>.+)/$', 'gaworkflow.frontend.exp_track.views.detail'),
- (r'^(?P<fcid>.+)/$', 'htswfrontend.exp_track.views.makeFCSheet'),
- (r'^updStatus$', 'htswfrontend.exp_track.exptrack.updStatus'),
- (r'^getConfile$', 'htswfrontend.exp_track.exptrack.getConfile'),
- (r'^getLanesNames$', 'htswfrontend.exp_track.exptrack.getLaneLibs')
-)
--- /dev/null
+# some core functions of the exp tracker module
+from django.http import HttpResponse
+from datetime import datetime
+from string import *
+import re
+from htsworkflow.frontend import settings
+from htsworkflow.frontend.experiments.models import FlowCell, DataRun
+from htsworkflow.frontend.samples.models import Library
+from django.core.exceptions import ObjectDoesNotExist
+from django.core.mail import send_mail, mail_admins
+
+def updStatus(request):
+ output=''
+ user = 'none'
+ pswd = ''
+ UpdatedStatus = 'unknown'
+ fcid = 'none'
+ runfolder = 'unknown'
+ ClIP = request.META['REMOTE_ADDR']
+ granted = False
+
+ if request.has_key('user'):
+ user = request['user']
+
+ #Check access permission
+ if (user == 'rami' and settings.ALLOWED_IPS.has_key(ClIP)): granted = True
+ if not granted: return HttpResponse("access denied.")
+
+
+ # ~~~~~~Parameters for the job ~~~~
+ if request.has_key('fcid'):
+ fcid = request['fcid']
+ else:
+ return HttpResponse('missing fcid')
+
+ if request.has_key('runf'):
+ runfolder = request['runf']
+ else:
+ return HttpResponse('missing runf')
+
+
+ if request.has_key('updst'):
+ UpdatedStatus = request['updst']
+ else:
+ return HttpResponse('missing status')
+
+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ # Update Data Run status in DB
+ # Try get rec. If not found return 'entry not found + <fcid><runfolder>', if found try update and return updated
+ try:
+ rec = DataRun.objects.get(run_folder=runfolder)
+ rec.run_status = UpdatedStatus
+
+ #if there's a message update that too
+ mytimestamp = datetime.now().__str__()
+ mytimestamp = re.sub(pattern=":[^:]*$",repl="",string=mytimestamp)
+ if request.has_key('msg'):
+ rec.run_note += ", "+request['msg']+" ("+mytimestamp+")"
+ else :
+ if UpdatedStatus == '1':
+ rec.run_note = "Started ("+mytimestamp+")"
+
+ rec.save()
+ output = "Hello "+settings.ALLOWED_IPS[ClIP]+". Updated to:'"+DataRun.RUN_STATUS_CHOICES[int(UpdatedStatus)][1].__str__()+"'"
+ except ObjectDoesNotExist:
+ output = "entry not found: "+fcid+", "+runfolder
+
+
+ #Notify researcher by email
+ # Doesn't work
+ #send_mail('Exp Tracker', 'Data Run Status '+output, 'rrauch@stanford.edu', ['rrrami@gmail.com'], fail_silently=False)
+ #mail_admins("test subject", "testing , testing", fail_silently=False)
+ # gives error: (49, "Can't assign requested address")
+ 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\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 += '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'
+
+ cnfgfile += '2:'+genome_dir+rec.lane_2_library.library_species.use_genome_build+'\n'
+ cnfgfile += '2:'+eland_genome+rec.lane_2_library.library_species.use_genome_build+'\n'
+
+ cnfgfile += '3:'+genome_dir+rec.lane_3_library.library_species.use_genome_build+'\n'
+ cnfgfile += '3:'+eland_genome+rec.lane_3_library.library_species.use_genome_build+'\n'
+
+ cnfgfile += '4:'+genome_dir+rec.lane_4_library.library_species.use_genome_build+'\n'
+ cnfgfile += '4:'+eland_genome+rec.lane_4_library.library_species.use_genome_build+'\n'
+
+ cnfgfile += '5:'+genome_dir+rec.lane_5_library.library_species.use_genome_build+'\n'
+ cnfgfile += '5:'+eland_genome+rec.lane_5_library.library_species.use_genome_build+'\n'
+
+ cnfgfile += '6:'+genome_dir+rec.lane_6_library.library_species.use_genome_build+'\n'
+ cnfgfile += '6:'+eland_genome+rec.lane_6_library.library_species.use_genome_build+'\n'
+
+ cnfgfile += '7:'+genome_dir+rec.lane_7_library.library_species.use_genome_build+'\n'
+ cnfgfile += '7:'+eland_genome+rec.lane_7_library.library_species.use_genome_build+'\n'
+
+ cnfgfile += '8:'+genome_dir+rec.lane_8_library.library_species.use_genome_build+'\n'
+ cnfgfile += '8:'+eland_genome+rec.lane_8_library.library_species.use_genome_build
+
+ except ObjectDoesNotExist:
+ cnfgfile = 'Entry not found for fcid = '+fcid
+
+ return cnfgfile
+
+def getConfile(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'
+ cnfgfile = ''
+ runfolder = 'unknown'
+ if request.has_key('fcid'):
+ fcid = request['fcid']
+ if request.has_key('runf'):
+ runfolder = request['runf']
+ 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)
+ if match_str.search(cnfgfile):
+ rec = DataRun.objects.get(run_folder=runfolder) #,flowcell_id=fcid)
+ rec.config_params = cnfgfile
+ rec.save()
+ else:
+ cnfgfile = 'Failed generating config params for RunFolder = '+runfolder +', Flowcell id = '+ fcid+ ' Config Text:\n'+cnfgfile
+
+ except ObjectDoesNotExist:
+ cnfgfile = 'Entry not found for RunFolder = '+runfolder
+
+ return HttpResponse(cnfgfile)
+
+def getLaneLibs(request):
+ granted = False
+ ClIP = request.META['REMOTE_ADDR']
+ if (settings.ALLOWED_IPS.has_key(ClIP)): granted = True
+
+ if not granted: return HttpResponse("access denied.")
+
+ fcid = 'none'
+ outputfile = ''
+ if request.has_key('fcid'):
+ fcid = request['fcid']
+ try:
+ rec = FlowCell.objects.get(flowcell_id=fcid)
+ #Ex: 071211
+ year = datetime.today().year.__str__()
+ year = replace(year,'20','')
+ month = datetime.today().month
+ if month < 10: month = "0"+month.__str__()
+ else: month = month.__str__()
+ day = datetime.today().day
+ if day < 10: day = "0"+day.__str__()
+ else: day = day.__str__()
+ mydate = year+month+day
+ outputfile = '<?xml version="1.0" ?>'
+ outputfile += '\n<SolexaResult Date="'+mydate+'" Flowcell="'+fcid+'" Client="'+settings.ALLOWED_IPS[ClIP]+'">'
+ outputfile += '\n<Lane Index="1" Name="'+rec.lane_1_library.library_name+'" Library="'+rec.lane_1_library.library_id+'" Genome="'+rec.lane_1_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
+ outputfile += '\n<Lane Index="2" Name="'+rec.lane_2_library.library_name+'" Library="'+rec.lane_2_library.library_id+'" Genome="'+rec.lane_2_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
+ outputfile += '\n<Lane Index="3" Name="'+rec.lane_3_library.library_name+'" Library="'+rec.lane_3_library.library_id+'" Genome="'+rec.lane_3_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
+ outputfile += '\n<Lane Index="4" Name="'+rec.lane_4_library.library_name+'" Library="'+rec.lane_4_library.library_id+'" Genome="'+rec.lane_4_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
+ outputfile += '\n<Lane Index="5" Name="'+rec.lane_5_library.library_name+'" Library="'+rec.lane_5_library.library_id+'" Genome="'+rec.lane_5_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
+ outputfile += '\n<Lane Index="6" Name="'+rec.lane_6_library.library_name+'" Library="'+rec.lane_6_library.library_id+'" Genome="'+rec.lane_6_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
+ outputfile += '\n<Lane Index="7" Name="'+rec.lane_7_library.library_name+'" Library="'+rec.lane_7_library.library_id+'" Genome="'+rec.lane_7_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
+ outputfile += '\n<Lane Index="8" Name="'+rec.lane_8_library.library_name+'" Library="'+rec.lane_8_library.library_id+'" Genome="'+rec.lane_8_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
+ outputfile += '\n</SolexaResult>'
+ except ObjectDoesNotExist:
+ outputfile = 'Flowcell entry not found for: '+fcid
+ else: outputfile = 'Missing input: flowcell id'
+
+ return HttpResponse(outputfile)
+++ /dev/null
-# some core functions of the exp tracker module
-from django.http import HttpResponse
-from datetime import datetime
-from string import *
-import re
-from htswfrontend import settings
-from htswfrontend.exp_track.models import FlowCell, DataRun
-from htswfrontend.fctracker.models import Library
-from django.core.exceptions import ObjectDoesNotExist
-from django.core.mail import send_mail, mail_admins
-
-def updStatus(request):
- output=''
- user = 'none'
- pswd = ''
- UpdatedStatus = 'unknown'
- fcid = 'none'
- runfolder = 'unknown'
- ClIP = request.META['REMOTE_ADDR']
- granted = False
-
- if request.has_key('user'):
- user = request['user']
-
- #Check access permission
- if (user == 'rami' and settings.ALLOWED_IPS.has_key(ClIP)): granted = True
- if not granted: return HttpResponse("access denied.")
-
-
- # ~~~~~~Parameters for the job ~~~~
- if request.has_key('fcid'):
- fcid = request['fcid']
- else:
- return HttpResponse('missing fcid')
-
- if request.has_key('runf'):
- runfolder = request['runf']
- else:
- return HttpResponse('missing runf')
-
-
- if request.has_key('updst'):
- UpdatedStatus = request['updst']
- else:
- return HttpResponse('missing status')
-
- # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- # Update Data Run status in DB
- # Try get rec. If not found return 'entry not found + <fcid><runfolder>', if found try update and return updated
- try:
- rec = DataRun.objects.get(run_folder=runfolder)
- rec.run_status = UpdatedStatus
-
- #if there's a message update that too
- mytimestamp = datetime.now().__str__()
- mytimestamp = re.sub(pattern=":[^:]*$",repl="",string=mytimestamp)
- if request.has_key('msg'):
- rec.run_note += ", "+request['msg']+" ("+mytimestamp+")"
- else :
- if UpdatedStatus == '1':
- rec.run_note = "Started ("+mytimestamp+")"
-
- rec.save()
- output = "Hello "+settings.ALLOWED_IPS[ClIP]+". Updated to:'"+DataRun.RUN_STATUS_CHOICES[int(UpdatedStatus)][1].__str__()+"'"
- except ObjectDoesNotExist:
- output = "entry not found: "+fcid+", "+runfolder
-
-
- #Notify researcher by email
- # Doesn't work
- #send_mail('Exp Tracker', 'Data Run Status '+output, 'rrauch@stanford.edu', ['rrrami@gmail.com'], fail_silently=False)
- #mail_admins("test subject", "testing , testing", fail_silently=False)
- # gives error: (49, "Can't assign requested address")
- 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\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 += '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'
-
- cnfgfile += '2:'+genome_dir+rec.lane_2_library.library_species.use_genome_build+'\n'
- cnfgfile += '2:'+eland_genome+rec.lane_2_library.library_species.use_genome_build+'\n'
-
- cnfgfile += '3:'+genome_dir+rec.lane_3_library.library_species.use_genome_build+'\n'
- cnfgfile += '3:'+eland_genome+rec.lane_3_library.library_species.use_genome_build+'\n'
-
- cnfgfile += '4:'+genome_dir+rec.lane_4_library.library_species.use_genome_build+'\n'
- cnfgfile += '4:'+eland_genome+rec.lane_4_library.library_species.use_genome_build+'\n'
-
- cnfgfile += '5:'+genome_dir+rec.lane_5_library.library_species.use_genome_build+'\n'
- cnfgfile += '5:'+eland_genome+rec.lane_5_library.library_species.use_genome_build+'\n'
-
- cnfgfile += '6:'+genome_dir+rec.lane_6_library.library_species.use_genome_build+'\n'
- cnfgfile += '6:'+eland_genome+rec.lane_6_library.library_species.use_genome_build+'\n'
-
- cnfgfile += '7:'+genome_dir+rec.lane_7_library.library_species.use_genome_build+'\n'
- cnfgfile += '7:'+eland_genome+rec.lane_7_library.library_species.use_genome_build+'\n'
-
- cnfgfile += '8:'+genome_dir+rec.lane_8_library.library_species.use_genome_build+'\n'
- cnfgfile += '8:'+eland_genome+rec.lane_8_library.library_species.use_genome_build
-
- except ObjectDoesNotExist:
- cnfgfile = 'Entry not found for fcid = '+fcid
-
- return cnfgfile
-
-def getConfile(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'
- cnfgfile = ''
- runfolder = 'unknown'
- if request.has_key('fcid'):
- fcid = request['fcid']
- if request.has_key('runf'):
- runfolder = request['runf']
- 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)
- if match_str.search(cnfgfile):
- rec = DataRun.objects.get(run_folder=runfolder) #,flowcell_id=fcid)
- rec.config_params = cnfgfile
- rec.save()
- else:
- cnfgfile = 'Failed generating config params for RunFolder = '+runfolder +', Flowcell id = '+ fcid+ ' Config Text:\n'+cnfgfile
-
- except ObjectDoesNotExist:
- cnfgfile = 'Entry not found for RunFolder = '+runfolder
-
- return HttpResponse(cnfgfile)
-
-def getLaneLibs(request):
- granted = False
- ClIP = request.META['REMOTE_ADDR']
- if (settings.ALLOWED_IPS.has_key(ClIP)): granted = True
-
- if not granted: return HttpResponse("access denied.")
-
- fcid = 'none'
- outputfile = ''
- if request.has_key('fcid'):
- fcid = request['fcid']
- try:
- rec = FlowCell.objects.get(flowcell_id=fcid)
- #Ex: 071211
- year = datetime.today().year.__str__()
- year = replace(year,'20','')
- month = datetime.today().month
- if month < 10: month = "0"+month.__str__()
- else: month = month.__str__()
- day = datetime.today().day
- if day < 10: day = "0"+day.__str__()
- else: day = day.__str__()
- mydate = year+month+day
- outputfile = '<?xml version="1.0" ?>'
- outputfile += '\n<SolexaResult Date="'+mydate+'" Flowcell="'+fcid+'" Client="'+settings.ALLOWED_IPS[ClIP]+'">'
- outputfile += '\n<Lane Index="1" Name="'+rec.lane_1_library.library_name+'" Library="'+rec.lane_1_library.library_id+'" Genome="'+rec.lane_1_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
- outputfile += '\n<Lane Index="2" Name="'+rec.lane_2_library.library_name+'" Library="'+rec.lane_2_library.library_id+'" Genome="'+rec.lane_2_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
- outputfile += '\n<Lane Index="3" Name="'+rec.lane_3_library.library_name+'" Library="'+rec.lane_3_library.library_id+'" Genome="'+rec.lane_3_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
- outputfile += '\n<Lane Index="4" Name="'+rec.lane_4_library.library_name+'" Library="'+rec.lane_4_library.library_id+'" Genome="'+rec.lane_4_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
- outputfile += '\n<Lane Index="5" Name="'+rec.lane_5_library.library_name+'" Library="'+rec.lane_5_library.library_id+'" Genome="'+rec.lane_5_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
- outputfile += '\n<Lane Index="6" Name="'+rec.lane_6_library.library_name+'" Library="'+rec.lane_6_library.library_id+'" Genome="'+rec.lane_6_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
- outputfile += '\n<Lane Index="7" Name="'+rec.lane_7_library.library_name+'" Library="'+rec.lane_7_library.library_id+'" Genome="'+rec.lane_7_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
- outputfile += '\n<Lane Index="8" Name="'+rec.lane_8_library.library_name+'" Library="'+rec.lane_8_library.library_id+'" Genome="'+rec.lane_8_library.library_species.use_genome_build+'" PrimerName="" PrimerSeq=""/>'
- outputfile += '\n</SolexaResult>'
- except ObjectDoesNotExist:
- outputfile = 'Flowcell entry not found for: '+fcid
- else: outputfile = 'Missing input: flowcell id'
-
- return HttpResponse(outputfile)
from django.db import models
-from htswfrontend.fctracker.models import *
+from htsworkflow.frontend.samples.models import *
class FlowCell(models.Model):
- flowcell_id = models.CharField(max_length=20, unique=True, db_index=True, core=True)
+ flowcell_id = models.CharField(max_length=20, unique=True, db_index=True)
run_date = models.DateTimeField(core=True)
advanced_run = models.BooleanField(default=False)
read_length = models.IntegerField(default=32) #Stanford is currenlty 25
--- /dev/null
+from django.conf.urls.defaults import *
+
+urlpatterns = patterns('',
+
+ (r'^$', 'htsworkflow.frontend.experiments.views.index'),
+ (r'^liblist$', 'htsworkflow.frontend.experiments.views.test_Libs'),
+ #(r'^(?P<run_folder>.+)/$', 'gaworkflow.frontend.experiments.views.detail'),
+ (r'^(?P<fcid>.+)/$', 'htsworkflow.frontend.experiments.views.makeFCSheet'),
+ (r'^updStatus$', 'htsworkflow.frontend.experiments.experiments.updStatus'),
+ (r'^getConfile$', 'htsworkflow.frontend.experiments.experiments.getConfile'),
+ (r'^getLanesNames$', 'htsworkflow.frontend.experiments.experiments.getLaneLibs')
+)
#shortcut to the above modules
from django.shortcuts import render_to_response, get_object_or_404
#from htswfrontend.fctracker.models import *
-from htswfrontend.exp_track.models import *
+from htsworkflow.frontend.experiments.models import *
from django.http import HttpResponse
from django.core.exceptions import ObjectDoesNotExist
+++ /dev/null
-from django.conf.urls.defaults import *
-
-urlpatterns = patterns('',
- (r'^updLibInfo$', 'htswfrontend.htsw_reports.libinfopar.refreshLibInfoFile'),
-)
from django.db.models import Q
from django.core.exceptions import ObjectDoesNotExist
from datetime import datetime
-from htswfrontend.fctracker.models import *
-from htswfrontend.analys_track.models import *
-from htswfrontend.exp_track.models import *
+from htsworkflow.frontend.samples.models import *
+from htsworkflow.frontend.analysis.models import *
+from htsworkflow.frontend.experiments.models import *
from string import *
-from htswfrontend.htsw_reports.utils import *
+from htsworkflow.frontend.reports.utils import *
import re
##from p1 import LibInfo
from libinfopar import *
return 'coming up ..'
QPCR = models.CharField(max_length=500,blank=True,null=True)
- submitted_to_DCC = models.DateTimeField(core=True,blank=True,null=True)
- submitted_to_NCBI = models.DateTimeField(core=True,blank=True,null=True)
+ submitted_to_DCC = models.DateTimeField(blank=True,null=True)
+ submitted_to_NCBI = models.DateTimeField(blank=True,null=True)
note_about_DCC = models.TextField(blank=True)
note_about_NCBI = models.TextField(blank=True)
--- /dev/null
+from django.conf.urls.defaults import *
+
+urlpatterns = patterns('',
+ (r'^updLibInfo$', 'htsworkflow.reports.libinfopar.refreshLibInfoFile'),
+)
from django.db import models
from django.contrib.auth.models import User
from htsworkflow.frontend import settings
-from htsworkflow.reports.libinfopar import *
+#from htsworkflow.reports.libinfopar import *
# Create your models here.
class Species(models.Model):
- scientific_name = models.CharField(max_length=256, unique=False, db_index=True, core=True)
+ scientific_name = models.CharField(max_length=256, unique=False, db_index=True)
common_name = models.CharField(max_length=256, blank=True)
use_genome_build = models.CharField(max_length=100, blank=False, null=False)
)
class Affiliation(models.Model):
- name = models.CharField(max_length=256, db_index=True, core=True,verbose_name='Group Name')
+ name = models.CharField(max_length=256, db_index=True, verbose_name='Group Name')
contact = models.CharField(max_length=256, null=True, blank=True,verbose_name='Contact Name')
email = models.EmailField(null=True,blank=True)
class Library(models.Model):
- library_id = models.CharField(max_length=30, primary_key=True, db_index=True, core=True)
- library_name = models.CharField(max_length=100, unique=True, core=True)
- library_species = models.ForeignKey(Species, core=True)
- cell_line = models.ForeignKey(Cellline,core=True)
- condition = models.ForeignKey(Condition,core=True)
- antibody = models.ForeignKey(Antibody,blank=True,null=True,core=True)
+ library_id = models.CharField(max_length=30, primary_key=True, db_index=True)
+ library_name = models.CharField(max_length=100, unique=True)
+ library_species = models.ForeignKey(Species)
+ cell_line = models.ForeignKey(Cellline)
+ condition = models.ForeignKey(Condition)
+ antibody = models.ForeignKey(Antibody,blank=True,null=True)
# New field Aug/25/08. SQL: alter table fctracker_library add column "lib_affiliation" varchar(256) NULL;
affiliations = models.ManyToManyField(Affiliation,related_name='library_affiliations',null=True,filter_interface=models.HORIZONTAL)
# New field Aug/19/08
default='RNA-seq')
creation_date = models.DateField(blank=True, null=True)
- made_for = models.ForeignKey(User)
+ made_for = models.ForeignKey(User, edit_inline=models.TABULAR)
made_by = models.CharField(max_length=50, blank=True, default="Lorian")
PROTOCOL_END_POINTS = (
save_on_top = True
##search_fields = ['library_id','library_name','affiliations__name','affiliations__contact','made_by','made_for','antibody__antigene','antibody__catalog','antibody__antibodies','antibody__source','cell_line__cellline_name','library_species__scientific_name','library_species__common_name','library_species__use_genome_build']
search_fields = ['library_id','library_name','cell_line__cellline_name','library_species__scientific_name','library_species__common_name','library_species__use_genome_build']
- list_display = ('affiliation','library_id','aligned_reads','library_name','experiment_type','org','replicate','antibody_name','cell_line','made_by','creation_date')
- list_display_links = ('library_id', 'library_name')
+ #list_display = ('affiliation','library_id','aligned_reads','library_name','experiment_type','org','replicate','antibody_name','cell_line','made_by','creation_date')
+ list_display = ('library_id','library_name','experiment_type','replicate','antibody_name','made_by','creation_date')
+ #list_display_links = ('library_id', 'library_name')
- list_filter = ('experiment_type','affiliations','library_species','made_for', 'made_by','replicate')
+ list_filter = ('experiment_type','affiliations','library_species', 'made_by','replicate')
fields = (
(None, {
- 'fields': (('replicate','library_id','library_name'),('library_species'),('experiment_type'),('cell_line','condition','antibody'),)
+ 'fields': (('replicate','library_id','library_name'),('library_species'),('experiment_type'),('cell_line','condition','antibody'),)
}),
('Creation Information:', {
'fields' : (('made_for', 'made_by', 'creation_date'), ('stopping_point', 'amplified_from_sample'), ('undiluted_concentration', 'library_size'), 'notes',)
'django.contrib.sessions',
'django.contrib.sites',
'htsworkflow.frontend.eland_config',
- 'htsworkflow.frontend.fctracker',
+ 'htsworkflow.frontend.samples',
# modules from htsworkflow branch
- #'htswfrontend.exp_track',
- #'htswfrontend.analys_track',
- #'htswfrontend.htsw_reports',
+ 'htsworkflow.frontend.experiments',
+ 'htsworkflow.frontend.analysis',
+ 'htsworkflow.frontend.reports',
'django.contrib.databrowse',
)
# Databrowser:
from django.contrib import databrowse
-from fctracker.models import Library, FlowCell
+from htsworkflow.frontend.samples.models import Library
databrowse.site.register(Library)
-databrowse.site.register(FlowCell)
+#databrowse.site.register(FlowCell)
urlpatterns = patterns('',
# Base:
# Admin:
(r'^admin/', include('django.contrib.admin.urls')),
# ExpTrack:
- (r'^experiments/', include('htswfrontend.experiments.et_urls')),
+ (r'^experiments/', include('htsworkflow.frontend.experiments.urls')),
# AnalysTrack:
- (r'^analysis/', include('htswfrontend.analysis.an_urls')),
+ (r'^analysis/', include('htsworkflow.frontend.analysis.urls')),
# Report Views:
# (r'^reports/', include('gaworkflow.frontend....urls')),
+
+ # databrowser
+ (r'^databrowse/(.*)', databrowse.site.root)
)