add stanfords experiment tracker component
[htsworkflow.git] / gaworkflow / frontend / exp_track / models.py
diff --git a/gaworkflow/frontend/exp_track/models.py b/gaworkflow/frontend/exp_track/models.py
new file mode 100644 (file)
index 0000000..7bdaff7
--- /dev/null
@@ -0,0 +1,29 @@
+from django.db import models
+from gaworkflow.frontend.fctracker.models import FlowCell 
+
+class DataRun(models.Model):
+  #ConfTemplate = "READ_LENGTH 25\nGENOME_DIR /Volumes/Genomes/hg18\nELAND_GENOME /Volumes/Genomes/hg18\nANALYSIS eland\nGENOME_FILE all_chr.fa\nELAND_MULTIPLE_INSTANCES 8"
+  ConfTemplate = "CONFIG PARAMS WILL BE GENERATED BY THE PIPELINE SCRIPT.\nYOU'LL BE ABLE TO EDIT AFTER IF NEEDED."
+  ##-----
+  run_folder = models.CharField(max_length=50,unique=True, db_index=True)
+  fcid = models.ForeignKey(FlowCell,verbose_name="Flowcell Id") #, null=True)
+  config_params = models.TextField(default=ConfTemplate)
+  run_start_time = models.DateTimeField(core=True)
+  RUN_STATUS_CHOICES = (
+      (0, 'Solexa Pipeline Not Yet Started'),
+      (1, 'Solexa Pipeline Started'),
+      (2, 'Solexa Pipeline Interrupted'),
+      (3, 'Solexa Pipeline Finished'),
+      (4, 'CollectReads Started'),
+      (5, 'CollectReads Finished'),
+    )
+  run_status = models.IntegerField(choices=RUN_STATUS_CHOICES, default=0)
+  run_note = models.CharField(max_length=500,blank=True)
+  
+  #def __unicode__(self):
+  #  return ...
+
+  class Admin:
+    list_display = ('run_folder','fcid','run_start_time','run_status','run_note')
+    list_filter = ('run_status','run_start_time')
+