7bdaff7c225a85cde13c2d61c0d5adee8b6cf305
[htsworkflow.git] / gaworkflow / frontend / exp_track / models.py
1 from django.db import models
2 from gaworkflow.frontend.fctracker.models import FlowCell 
3
4 class DataRun(models.Model):
5   #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"
6   ConfTemplate = "CONFIG PARAMS WILL BE GENERATED BY THE PIPELINE SCRIPT.\nYOU'LL BE ABLE TO EDIT AFTER IF NEEDED."
7   ##-----
8   run_folder = models.CharField(max_length=50,unique=True, db_index=True)
9   fcid = models.ForeignKey(FlowCell,verbose_name="Flowcell Id") #, null=True)
10   config_params = models.TextField(default=ConfTemplate)
11   run_start_time = models.DateTimeField(core=True)
12   RUN_STATUS_CHOICES = (
13       (0, 'Solexa Pipeline Not Yet Started'),
14       (1, 'Solexa Pipeline Started'),
15       (2, 'Solexa Pipeline Interrupted'),
16       (3, 'Solexa Pipeline Finished'),
17       (4, 'CollectReads Started'),
18       (5, 'CollectReads Finished'),
19     )
20   run_status = models.IntegerField(choices=RUN_STATUS_CHOICES, default=0)
21   run_note = models.CharField(max_length=500,blank=True)
22   
23   #def __unicode__(self):
24   #  return ...
25
26   class Admin:
27     list_display = ('run_folder','fcid','run_start_time','run_status','run_note')
28     list_filter = ('run_status','run_start_time')
29