From: Diane Trout Date: Wed, 21 Jan 2009 02:50:22 +0000 (+0000) Subject: Merge in Rami's changes from last friday. X-Git-Tag: 0.2.0.1~35 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=e07f9c1a2346fdda876a639f1a2f196c6577190c Merge in Rami's changes from last friday. Most of the admin pages work. Though there's a wsgi error with the reports. I'll try to figure out tomorrow. the biggest difference between caltech trunk and stanford schemas right now is caltech is using made_for as a foreign key, and stanford is using it as a text field. --- diff --git a/docs/Conv_StanfordDB_2009Jan20.txt b/docs/Conv_StanfordDB_2009Jan20.txt new file mode 100644 index 0000000..aed4bfa --- /dev/null +++ b/docs/Conv_StanfordDB_2009Jan20.txt @@ -0,0 +1,21 @@ +# mostly I just renamed tables +# + +alter table analys_track_projects rename to analysis_projects; +alter table analys_track_project rename to analysis_project; +alter table analys_track_project_tasks rename to analysis_project_tasks; +alter table analys_track_task rename to analysis_task; +alter table exp_track_datarun rename to experiments_datarun; +alter table exp_track_flowcell rename to experiments_flowcell; +alter table fctracker_affiliation rename to samples_affiliation; +alter table fctracker_antibody rename to samples_antibody; +alter table fctracker_cellline rename to samples_cellline; +alter table fctracker_condition rename to samples_condition; +alter table fctracker_flowcell rename to samples_flowcell; +alter table fctracker_library rename to samples_library; +alter table fctracker_library_affiliations rename to samples_library_affiliations; +alter table fctracker_library_tags rename to samples_library_tags; +alter table fctracker_primary rename to samples_primer; +alter table fctracker_species rename to samples_species; +alter table fctracker_tag rename to samples_tag; +alter table htsw_reports_progressreport rename to reports_progressreport; diff --git a/htsworkflow/frontend/analysis/main.py b/htsworkflow/frontend/analysis/main.py index 511390b..b5217dc 100644 --- a/htsworkflow/frontend/analysis/main.py +++ b/htsworkflow/frontend/analysis/main.py @@ -66,17 +66,44 @@ def getProjects(request): outputfile += '\n' if (t.apply_calc == 'QuEST' or t.apply_calc == 'WingPeaks' or t.apply_calc == 'MACS'): outputfile += '\n' - outputfile += '\n' - outputfile += '\n' + if t.subject1: + outputfile += '\n' + if t.subject2: + outputfile += '\n' + else: + outputfile += '\nBackground Library Missing' + else: + outputfile += '\nSignal Library Missing' + outputfile += '\n'+t.task_params.__str__()+'' outputfile += '\n' + + if (t.apply_calc == 'Methylseq'): + outputfile += '\n' + if t.subject1: + outputfile += '\n' + if t.subject2: + outputfile += '\n' + else: + outputfile += '\nMsp1 Library Missing' + else: + outputfile += '\nHpa2 Library Missing' + outputfile += '\n'+t.task_params.__str__()+'' + outputfile += '\n' if (t.apply_calc == 'ProfileReads' or t.apply_calc == 'qPCR'): outputfile += '\n<'+t.apply_calc+' TaskId="'+t.id.__str__()+'" Name="'+t.task_name+'" Genome="'+t.subject1.library_species.use_genome_build+'" Library="'+t.subject1.library_id+'"/>' if (t.apply_calc == 'CompareLibs'): outputfile += '\n' - outputfile += '\n' - outputfile += '\n' + if t.subject1: + outputfile += '\n' + else: + outputfile += '\nLibrary Missing' + if t.subject2: + outputfile += '\n' + else: + outputfile += '\nLibrary Missing' + outputfile += '\n'+t.task_params.__str__()+'' outputfile += '\n' #if (t.apply_calc == 'ComparePeakCalls'): diff --git a/htsworkflow/frontend/analysis/models.py b/htsworkflow/frontend/analysis/models.py index b98cfac..e2ddff4 100644 --- a/htsworkflow/frontend/analysis/models.py +++ b/htsworkflow/frontend/analysis/models.py @@ -1,12 +1,13 @@ from django.db import models from datetime import datetime +from htsworkflow.frontend import settings from htsworkflow.frontend.samples.models import Library from string import * class Task(models.Model): task_name = models.CharField(max_length=50,unique=True, db_index=True) - subject1 = models.ForeignKey(Library,related_name='sbj1_library',verbose_name="Subject") - subject2 = models.ForeignKey(Library,related_name='sbj2_library',verbose_name="Subject 2 / Control",blank=True,null=True) + subject1 = models.ForeignKey(Library,related_name='sbj1_library',verbose_name="Subject1 (Signal/Hpa2)") + subject2 = models.ForeignKey(Library,related_name='sbj2_library',verbose_name="Subject2 (Control/Msp1)",blank=True,null=True) CALCS = ( ('QuEST', 'QuEST Peak Calling'), ('WingPeaks', 'Wing Peak Calling'), @@ -14,7 +15,8 @@ class Task(models.Model): ('qPCR', 'In Silico qPCR'), ('CompareLibs', 'Compare Libaraies'), ('ComparePeakCalls','Compare Peak Calls'), - ('ProfileReads','Profile Reads') + ('ProfileReads','Profile Reads'), + ('Methylseq','Methylseq'), ) apply_calc = models.CharField(max_length=50,choices=CALCS,verbose_name='Applied Calculation') ## userid = # logged in user @@ -36,10 +38,9 @@ class Task(models.Model): pstr += '%s, ' % (p.project_name) return pstr - class Project(models.Model): project_name = models.CharField(max_length=50,unique=True, db_index=True) - tasks = models.ManyToManyField(Task,related_name='project_tasks',null=True) + tasks = models.ManyToManyField(Task,related_name='project_tasks',null=True) project_notes = models.CharField(max_length=500,blank=True,null=True) def __str__(self): @@ -47,7 +48,7 @@ class Project(models.Model): def ProjectTasks(self): ptasks = self.tasks.all().order_by('id') - surl = settings.ANALYSIS_SERVER+'/projects/' + surl = settings.TASKS_PROJS_SERVER+'/projects/' tstr = '