Turn the library_id back into the primary key for samples_library (SCHEMA CHANGE!)
[htsworkflow.git] / htsworkflow / frontend / analysis / main.py
index b5217dc3b41a7e6f2b1778ecf53cf61fbff29b52..b57ad2050dcbca68c1b476d48570a3b2204fe715 100644 (file)
@@ -67,9 +67,9 @@ def getProjects(request):
           if (t.apply_calc == 'QuEST' or t.apply_calc == 'WingPeaks' or t.apply_calc == 'MACS'):
             outputfile += '\n<PeakCalling TaskId="'+t.id.__str__()+'" Name="'+t.task_name+'" Caller="'+t.apply_calc+'" Genome="'+t.subject1.library_species.use_genome_build+'">'
             if t.subject1:
-              outputfile += '\n<Signal Library="'+t.subject1.library_id+'"/>'
+              outputfile += '\n<Signal Library="'+t.subject1.id+'"/>'
               if t.subject2:
-                outputfile += '\n<Background Library="'+t.subject2.library_id+'"/>'
+                outputfile += '\n<Background Library="'+t.subject2.id+'"/>'
               else:
                 outputfile += '\n<Err>Background Library Missing</Err>'
             else:
@@ -80,9 +80,9 @@ def getProjects(request):
           if (t.apply_calc == 'Methylseq'):
             outputfile += '\n<Methylseq TaskId="'+t.id.__str__()+'" Name="'+t.task_name+'" Genome="'+t.subject1.library_species.use_genome_build+'">'
             if t.subject1:
-              outputfile += '\n<Hpa2 Library="'+t.subject1.library_id+'"/>'
+              outputfile += '\n<Hpa2 Library="'+t.subject1.id+'"/>'
               if t.subject2:
-                outputfile += '\n<Msp1 Library="'+t.subject2.library_id+'"/>'
+                outputfile += '\n<Msp1 Library="'+t.subject2.id+'"/>'
               else:
                 outputfile += '\n<Err>Msp1 Library Missing</Err>'
             else:
@@ -91,16 +91,16 @@ def getProjects(request):
             outputfile += '\n</Methylseq>' 
 
           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+'"/>'
+            outputfile += '\n<'+t.apply_calc+' TaskId="'+t.id.__str__()+'" Name="'+t.task_name+'" Genome="'+t.subject1.library_species.use_genome_build+'" Library="'+t.subject1.id+'"/>'
 
           if (t.apply_calc == 'CompareLibs'):
             outputfile += '\n<CompareLibraries TaskId="'+t.id.__str__()+'" TF="'+t.task_name+'" Genome="'+t.subject1.library_species.use_genome_build+'">'
             if t.subject1:
-              outputfile += '\n<Library Library="'+t.subject1.library_id+'"/>'
+              outputfile += '\n<Library Library="'+t.subject1.id+'"/>'
             else:
               outputfile += '\n<Err>Library Missing</Err>'
             if t.subject2:
-              outputfile += '\n<Library Library="'+t.subject2.library_id+'"/>'
+              outputfile += '\n<Library Library="'+t.subject2.id+'"/>'
             else:
               outputfile += '\n<Err>Library Missing</Err>'
             outputfile += '\n<params>'+t.task_params.__str__()+'</params>'