Commit a2f4dffe authored by Mathieu Courcelles's avatar Mathieu Courcelles

-Fixes for new Django and Grappelli

-Added workflow in the dashboard
-Added PSI-MI XML export
parent 9b97ded6
......@@ -22,6 +22,8 @@ from django.shortcuts import render_to_response
from django.template import RequestContext
# Import project libraries
from .DatasetProcessing import DatasetProcessing
import export
......@@ -510,6 +512,7 @@ class DatasetAdminMixin(object):
'make_interaction_matrix',
'make_MascotReport_csv',
'make_psi_mi_tab25',
'make_psi_mi_xml25',
'make_Xi_csv',
'make_Distance_csv',
'jsmol_view',
......@@ -682,10 +685,24 @@ class DatasetAdminMixin(object):
Action method to export cross-linked peptides to PSI-MI TAB 2.5
tabular file format.
"""
return export.psi_mi_tab25(self, request,
dataset_set_2_clpeptide_set(queryset),
'Dataset_CLPeptide')
make_psi_mi_tab25.short_description = 'Export as PSI-MI TAB 2.5'
make_psi_mi_tab25.short_description = 'Export as PSI-MI TAB 2.5'
def make_psi_mi_xml25(self, request, queryset):
"""
Action method to export cross-linked peptides to PSI-MI XML 2.5
tabular file format.
"""
return export.psi_mi_xml25(self, request,
queryset,
'Dataset_CLPeptide')
make_psi_mi_xml25.short_description = 'Export as PSI-MI XML 2.5'
def jsmol_view(self, request, queryset):
......
......@@ -12,9 +12,11 @@ import csv
# Import Django related libraries
from django.http import HttpResponse
from django.template import loader, Context
# Import project libraries
from queryset_operation import (dataset_set_2_clpeptide_set,
)
def clpep_header():
......@@ -57,7 +59,7 @@ def compareRunIds_csv(self, request, queryset, form, tableName):
Outputs results to CSV format.
"""
response = HttpResponse(mimetype='text/csv')
response = HttpResponse(content_type='text/csv')
response['Content-Disposition'] = ('attachment; filename=' + tableName +
'_' + request.META['QUERY_STRING'] + '.csv')
......@@ -182,7 +184,7 @@ def dataset_stats_csv(self, request, queryset, tableName):
Write dataset statistics about cross-linked peptides to CSV file.
"""
response = HttpResponse(mimetype='text/csv')
response = HttpResponse(content_type='text/csv')
response['Content-Disposition'] = ('attachment; filename=' + tableName +
'_' + request.META['QUERY_STRING'] + '.csv')
......@@ -314,7 +316,7 @@ def make_Xi_csv(self, request, queryset, tableName, clpep_distances=False):
response = HttpResponse(mimetype='text/csv')
response = HttpResponse(content_type='text/csv')
response['Content-Disposition'] = ('attachment; filename=' + tableName +
'_' + request.META['QUERY_STRING'] + '.csv')
......@@ -345,7 +347,7 @@ def interaction_matrix(self, request, clpeptide_set, tableName):
CSV file.
"""
response = HttpResponse(mimetype='text/csv')
response = HttpResponse(content_type='text/csv')
response['Content-Disposition'] = ('attachment; filename=' + tableName +
'_' + request.META['QUERY_STRING'] +
'_interaction_matrix.csv')
......@@ -463,7 +465,7 @@ def make_MascotReport_csv(self, request, queryset, tableName):
Thibault's lab internal format
"""
response = HttpResponse(mimetype='text/csv')
response = HttpResponse(content_type='text/csv')
response['Content-Disposition'] = ('attachment; filename=MascotReport_' + tableName +
'_' + request.META['QUERY_STRING'] + '.csv')
......@@ -589,7 +591,7 @@ def psi_mi_tab25(self, request, clpeptide_set, tableName):
'Confidence Values'
]
response = HttpResponse(mimetype='text/plain')
response = HttpResponse(content_type='text/plain')
response['Content-Disposition'] = ('attachment; filename=' + tableName +
'_' + request.META['QUERY_STRING'] + '_PSI-MI_TAB_2.5.txt')
......@@ -606,10 +608,13 @@ def psi_mi_tab25(self, request, clpeptide_set, tableName):
for clpep in clpeptide_set:
if clpep.fs_prot1_id is None or clpep.fs_prot2_id is None:
continue
key = [clpep.fs_prot1_id.pk, clpep.fs_prot2_id.pk]
key.sort()
key = tuple(key)
if key not in protein_pairs:
protein_pairs[key] = [clpep, 0, 0, []]
......@@ -622,21 +627,12 @@ def psi_mi_tab25(self, request, clpeptide_set, tableName):
for key, value in protein_pairs.items():
columns = []
fs_prot1_id = ''
fs_prot2_id = ''
if key[0] == clpep.fs_prot1_id:
fs_prot1_id = clpep.fs_prot1_id
fs_prot2_id = clpep.fs_prot2_id
else:
fs_prot1_id = clpep.fs_prot2_id
fs_prot2_id = clpep.fs_prot1_id
clpep = value[0]
columns.append('custom_id:%s|CLMSVault:%s' % (fs_prot1_id.identifier, key[0]))
columns.append('custom_id:%s|CLMSVault:%s' % (fs_prot2_id.identifier, key[1]))
columns.append('entrez gene/locuslink:%s' % (fs_prot1_id.gene_name))
columns.append('entrez gene/locuslink:%s' % (fs_prot2_id.gene_name))
columns.append('custom_id:%s|CLMSVault:%s' % (clpep.fs_prot1_id.identifier, key[0]))
columns.append('custom_id:%s|CLMSVault:%s' % (clpep.fs_prot2_id.identifier, key[1]))
columns.append('entrez gene/locuslink:%s' % (clpep.fs_prot1_id.gene_name))
columns.append('entrez gene/locuslink:%s' % (clpep.fs_prot2_id.gene_name))
columns.append('-')
columns.append('-')
columns.append('psi-mi:"MI:0031"(protein cross-linking with a bifunctional reagent)')
......@@ -655,5 +651,57 @@ def psi_mi_tab25(self, request, clpeptide_set, tableName):
def psi_mi_xml25(self, request, queryset, tableName):
"""
Export selected objects to PSI-MI XML 2.5
tabular file.
"""
expShortDescription = 'CLMSVault Datasets' + str([x.pk for x in queryset])
expFullDescription = 'CLMSVault Datasets' + str([(str(x.pk) + '-' + str(x.name)) for x in queryset])
# Filter inter-protein cross-linked peptides
clpeptide_set = dataset_set_2_clpeptide_set(queryset)
clpeptide_set = clpeptide_set.filter(link_type='Inter-protein',
not_decoy=True)
# Merge interaction in one entry and compute sum of scores
proteins = dict()
protein_pairs = dict()
for clpep in clpeptide_set:
if clpep.fs_prot1_id is None or clpep.fs_prot2_id is None:
continue
key = [clpep.fs_prot1_id.pk, clpep.fs_prot2_id.pk]
key.sort()
key = tuple(key)
proteins[clpep.fs_prot1_id.pk] = clpep.fs_prot1_id
proteins[clpep.fs_prot2_id.pk] = clpep.fs_prot2_id
if key not in protein_pairs:
protein_pairs[key] = [clpep, 0, 0, []]
protein_pairs[key][1] += clpep.match_score
protein_pairs[key][2] += 1
protein_pairs[key][3].append(clpep.pk)
t = loader.get_template('psi-mi_25.xml')
c = Context({'expShortDescription': expShortDescription,
'expFullDescription': expFullDescription,
'proteins': proteins,
'protein_pairs': protein_pairs,
'pCounter': 0})
response = HttpResponse(t.render(c), content_type='text/xml')
response['Content-Disposition'] = ('attachment; filename=' + tableName +
'_' + request.META['QUERY_STRING'] + '_PSI-MI_XML_2.5.xml')
return response
\ No newline at end of file
This diff is collapsed.
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Dataset.cross_linker'
db.alter_column(u'CLMSpipeline_app_dataset', 'cross_linker_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['CLMSpipeline_app.CrossLinker'], null=True))
# Changing field 'Dataset.fasta_db'
db.alter_column(u'CLMSpipeline_app_dataset', 'fasta_db_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['CLMSpipeline_app.FastaDB'], null=True))
# Changing field 'Dataset.instrument_name'
db.alter_column(u'CLMSpipeline_app_dataset', 'instrument_name_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['CLMSpipeline_app.Instrument'], null=True))
# Changing field 'Dataset.search_algorithm'
db.alter_column(u'CLMSpipeline_app_dataset', 'search_algorithm_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['CLMSpipeline_app.searchAlgorithm'], null=True))
def backwards(self, orm):
# Changing field 'Dataset.cross_linker'
db.alter_column(u'CLMSpipeline_app_dataset', 'cross_linker_id', self.gf('django.db.models.fields.related.ForeignKey')(default='', to=orm['CLMSpipeline_app.CrossLinker']))
# Changing field 'Dataset.fasta_db'
db.alter_column(u'CLMSpipeline_app_dataset', 'fasta_db_id', self.gf('django.db.models.fields.related.ForeignKey')(default='', to=orm['CLMSpipeline_app.FastaDB']))
# Changing field 'Dataset.instrument_name'
db.alter_column(u'CLMSpipeline_app_dataset', 'instrument_name_id', self.gf('django.db.models.fields.related.ForeignKey')(default='', to=orm['CLMSpipeline_app.Instrument']))
# Changing field 'Dataset.search_algorithm'
db.alter_column(u'CLMSpipeline_app_dataset', 'search_algorithm_id', self.gf('django.db.models.fields.related.ForeignKey')(default='', to=orm['CLMSpipeline_app.searchAlgorithm']))
models = {
u'CLMSpipeline_app.clpeptide': {
'Meta': {'ordering': "['-match_score']", 'object_name': 'CLPeptide'},
'autovalidated': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'cross_link': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'dataset': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['CLMSpipeline_app.Dataset']", 'symmetrical': 'False'}),
'delta': ('django.db.models.fields.FloatField', [], {}),
'display_protein1': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'display_protein2': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'error': ('django.db.models.fields.FloatField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_type': ('django.db.models.fields.IntegerField', [], {}),
'match_score': ('django.db.models.fields.FloatField', [], {}),
'not_decoy': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'notes': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'pep1_link_pos': ('django.db.models.fields.IntegerField', [], {}),
'pep2_link_pos': ('django.db.models.fields.IntegerField', [], {}),
'peptide1': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'peptide2': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'peptide_position1': ('django.db.models.fields.IntegerField', [], {}),
'peptide_position2': ('django.db.models.fields.IntegerField', [], {}),
'peptide_wo_mod1': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'peptide_wo_mod2': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'precursor_charge': ('django.db.models.fields.CharField', [], {'max_length': '5'}),
'precursor_intensity': ('django.db.models.fields.FloatField', [], {}),
'precursor_mz': ('django.db.models.fields.FloatField', [], {}),
'rank': ('django.db.models.fields.IntegerField', [], {}),
'rejected': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'run_name': ('django.db.models.fields.CharField', [], {'max_length': '1000'}),
'scan_number': ('django.db.models.fields.IntegerField', [], {}),
'spectrum_intensity_coverage': ('django.db.models.fields.FloatField', [], {}),
'total_fragment_matches': ('django.db.models.fields.IntegerField', [], {}),
'validated': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'CLMSpipeline_app.clpeptidefilter': {
'Meta': {'object_name': 'CLPeptideFilter'},
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'CLMSpipeline_app.clpeptidefilterparam': {
'Meta': {'object_name': 'CLPeptideFilterParam'},
'clpeptidefilter': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.CLPeptideFilter']"}),
'field': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'field_lookup': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'method': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
'value': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'CLMSpipeline_app.crosslinker': {
'Meta': {'ordering': "['name']", 'object_name': 'CrossLinker'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
},
u'CLMSpipeline_app.dataset': {
'Meta': {'ordering': "['-creation_date']", 'object_name': 'Dataset'},
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'cross_linker': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.CrossLinker']", 'null': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'fasta_db': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.FastaDB']", 'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instrument_name': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.Instrument']", 'null': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'prefix': ('django.db.models.fields.CharField', [], {'max_length': '25'}),
'search_algorithm': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.searchAlgorithm']", 'null': 'True'})
},
u'CLMSpipeline_app.fastadb': {
'Meta': {'ordering': "['name']", 'object_name': 'FastaDB'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'})
},
u'CLMSpipeline_app.instrument': {
'Meta': {'ordering': "['name']", 'object_name': 'Instrument'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
},
u'CLMSpipeline_app.processeddataset': {
'Meta': {'ordering': "['-creation_date']", 'object_name': 'ProcessedDataset', '_ormbases': [u'CLMSpipeline_app.Dataset']},
'clpeptidefilter': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.CLPeptideFilter']"}),
u'dataset_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['CLMSpipeline_app.Dataset']", 'unique': 'True', 'primary_key': 'True'}),
'datasets': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'processed_datasets'", 'symmetrical': 'False', 'to': u"orm['CLMSpipeline_app.Dataset']"})
},
u'CLMSpipeline_app.rawdataset': {
'Meta': {'ordering': "['-creation_date']", 'object_name': 'RawDataset', '_ormbases': [u'CLMSpipeline_app.Dataset']},
u'dataset_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['CLMSpipeline_app.Dataset']", 'unique': 'True', 'primary_key': 'True'}),
'extra_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
'parsing_log': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}),
'parsing_status': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
},
u'CLMSpipeline_app.searchalgorithm': {
'Meta': {'ordering': "['name']", 'object_name': 'searchAlgorithm'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
}
}
complete_apps = ['CLMSpipeline_app']
\ No newline at end of file
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'ProcessedDataset.clpeptidefilter'
db.alter_column(u'CLMSpipeline_app_processeddataset', 'clpeptidefilter_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['CLMSpipeline_app.CLPeptideFilter'], null=True))
def backwards(self, orm):
# Changing field 'ProcessedDataset.clpeptidefilter'
db.alter_column(u'CLMSpipeline_app_processeddataset', 'clpeptidefilter_id', self.gf('django.db.models.fields.related.ForeignKey')(default='', to=orm['CLMSpipeline_app.CLPeptideFilter']))
models = {
u'CLMSpipeline_app.clpeptide': {
'Meta': {'ordering': "['-match_score']", 'object_name': 'CLPeptide'},
'autovalidated': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'cross_link': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'dataset': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['CLMSpipeline_app.Dataset']", 'symmetrical': 'False'}),
'delta': ('django.db.models.fields.FloatField', [], {}),
'display_protein1': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'display_protein2': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'error': ('django.db.models.fields.FloatField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_type': ('django.db.models.fields.IntegerField', [], {}),
'match_score': ('django.db.models.fields.FloatField', [], {}),
'not_decoy': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'notes': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'pep1_link_pos': ('django.db.models.fields.IntegerField', [], {}),
'pep2_link_pos': ('django.db.models.fields.IntegerField', [], {}),
'peptide1': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'peptide2': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'peptide_position1': ('django.db.models.fields.IntegerField', [], {}),
'peptide_position2': ('django.db.models.fields.IntegerField', [], {}),
'peptide_wo_mod1': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'peptide_wo_mod2': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'precursor_charge': ('django.db.models.fields.CharField', [], {'max_length': '5'}),
'precursor_intensity': ('django.db.models.fields.FloatField', [], {}),
'precursor_mz': ('django.db.models.fields.FloatField', [], {}),
'rank': ('django.db.models.fields.IntegerField', [], {}),
'rejected': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'run_name': ('django.db.models.fields.CharField', [], {'max_length': '1000'}),
'scan_number': ('django.db.models.fields.IntegerField', [], {}),
'spectrum_intensity_coverage': ('django.db.models.fields.FloatField', [], {}),
'total_fragment_matches': ('django.db.models.fields.IntegerField', [], {}),
'validated': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'CLMSpipeline_app.clpeptidefilter': {
'Meta': {'object_name': 'CLPeptideFilter'},
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'CLMSpipeline_app.clpeptidefilterparam': {
'Meta': {'object_name': 'CLPeptideFilterParam'},
'clpeptidefilter': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.CLPeptideFilter']"}),
'field': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'field_lookup': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'method': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
'value': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'CLMSpipeline_app.crosslinker': {
'Meta': {'ordering': "['name']", 'object_name': 'CrossLinker'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
},
u'CLMSpipeline_app.dataset': {
'Meta': {'ordering': "['-creation_date']", 'object_name': 'Dataset'},
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'cross_linker': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.CrossLinker']", 'null': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'fasta_db': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.FastaDB']", 'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instrument_name': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.Instrument']", 'null': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'prefix': ('django.db.models.fields.CharField', [], {'max_length': '25'}),
'search_algorithm': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.searchAlgorithm']", 'null': 'True'})
},
u'CLMSpipeline_app.fastadb': {
'Meta': {'ordering': "['name']", 'object_name': 'FastaDB'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'})
},
u'CLMSpipeline_app.instrument': {
'Meta': {'ordering': "['name']", 'object_name': 'Instrument'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
},
u'CLMSpipeline_app.processeddataset': {
'Meta': {'ordering': "['-creation_date']", 'object_name': 'ProcessedDataset', '_ormbases': [u'CLMSpipeline_app.Dataset']},
'clpeptidefilter': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.CLPeptideFilter']", 'null': 'True', 'blank': 'True'}),
u'dataset_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['CLMSpipeline_app.Dataset']", 'unique': 'True', 'primary_key': 'True'}),
'datasets': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'processed_datasets'", 'symmetrical': 'False', 'to': u"orm['CLMSpipeline_app.Dataset']"})
},
u'CLMSpipeline_app.rawdataset': {
'Meta': {'ordering': "['-creation_date']", 'object_name': 'RawDataset', '_ormbases': [u'CLMSpipeline_app.Dataset']},
u'dataset_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['CLMSpipeline_app.Dataset']", 'unique': 'True', 'primary_key': 'True'}),
'extra_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
'parsing_log': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}),
'parsing_status': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
},
u'CLMSpipeline_app.searchalgorithm': {
'Meta': {'ordering': "['name']", 'object_name': 'searchAlgorithm'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
}
}
complete_apps = ['CLMSpipeline_app']
\ No newline at end of file
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'CLPeptide.link_type'
db.alter_column(u'CLMSpipeline_app_clpeptide', 'link_type', self.gf('django.db.models.fields.CharField')(max_length=50))
def backwards(self, orm):
# Changing field 'CLPeptide.link_type'
db.alter_column(u'CLMSpipeline_app_clpeptide', 'link_type', self.gf('django.db.models.fields.IntegerField')())
models = {
u'CLMSpipeline_app.clpeptide': {
'Meta': {'ordering': "['-match_score']", 'object_name': 'CLPeptide'},
'autovalidated': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'cross_link': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'dataset': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['CLMSpipeline_app.Dataset']", 'symmetrical': 'False'}),
'delta': ('django.db.models.fields.FloatField', [], {}),
'display_protein1': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'display_protein2': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'error': ('django.db.models.fields.FloatField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_type': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'match_score': ('django.db.models.fields.FloatField', [], {}),
'not_decoy': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'notes': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'pep1_link_pos': ('django.db.models.fields.IntegerField', [], {}),
'pep2_link_pos': ('django.db.models.fields.IntegerField', [], {}),
'peptide1': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'peptide2': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'peptide_position1': ('django.db.models.fields.IntegerField', [], {}),
'peptide_position2': ('django.db.models.fields.IntegerField', [], {}),
'peptide_wo_mod1': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'peptide_wo_mod2': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'precursor_charge': ('django.db.models.fields.CharField', [], {'max_length': '5'}),
'precursor_intensity': ('django.db.models.fields.FloatField', [], {}),
'precursor_mz': ('django.db.models.fields.FloatField', [], {}),
'rank': ('django.db.models.fields.IntegerField', [], {}),
'rejected': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'run_name': ('django.db.models.fields.CharField', [], {'max_length': '1000'}),
'scan_number': ('django.db.models.fields.IntegerField', [], {}),
'spectrum_intensity_coverage': ('django.db.models.fields.FloatField', [], {}),
'total_fragment_matches': ('django.db.models.fields.IntegerField', [], {}),
'validated': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'CLMSpipeline_app.clpeptidefilter': {
'Meta': {'object_name': 'CLPeptideFilter'},
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'CLMSpipeline_app.clpeptidefilterparam': {
'Meta': {'object_name': 'CLPeptideFilterParam'},
'clpeptidefilter': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.CLPeptideFilter']"}),
'field': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'field_lookup': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'method': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
'value': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'CLMSpipeline_app.crosslinker': {
'Meta': {'ordering': "['name']", 'object_name': 'CrossLinker'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
},
u'CLMSpipeline_app.dataset': {
'Meta': {'ordering': "['-creation_date']", 'object_name': 'Dataset'},
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'cross_linker': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.CrossLinker']", 'null': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'fasta_db': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.FastaDB']", 'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instrument_name': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.Instrument']", 'null': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'prefix': ('django.db.models.fields.CharField', [], {'max_length': '25'}),
'search_algorithm': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.searchAlgorithm']", 'null': 'True'})
},
u'CLMSpipeline_app.fastadb': {
'Meta': {'ordering': "['name']", 'object_name': 'FastaDB'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'})
},
u'CLMSpipeline_app.instrument': {
'Meta': {'ordering': "['name']", 'object_name': 'Instrument'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
},
u'CLMSpipeline_app.processeddataset': {
'Meta': {'ordering': "['-creation_date']", 'object_name': 'ProcessedDataset', '_ormbases': [u'CLMSpipeline_app.Dataset']},
'clpeptidefilter': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['CLMSpipeline_app.CLPeptideFilter']", 'null': 'True', 'blank': 'True'}),
u'dataset_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['CLMSpipeline_app.Dataset']", 'unique': 'True', 'primary_key': 'True'}),
'datasets': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'processed_datasets'", 'symmetrical': 'False', 'to': u"orm['CLMSpipeline_app.Dataset']"})
},
u'CLMSpipeline_app.rawdataset': {
'Meta': {'ordering': "['-creation_date']", 'object_name': 'RawDataset', '_ormbases': [u'CLMSpipeline_app.Dataset']},
u'dataset_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['CLMSpipeline_app.Dataset']", 'unique': 'True', 'primary_key': 'True'}),
'extra_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
'parsing_log': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}),
'parsing_status': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
},
u'CLMSpipeline_app.searchalgorithm': {
'Meta': {'ordering': "['name']", 'object_name': 'searchAlgorithm'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
}
}
complete_apps = ['CLMSpipeline_app']
\ No newline at end of file
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'CLPeptideFilter.fp_cutoff'
db.add_column(u'CLMSpipeline_app_clpeptidefilter', 'fp_cutoff',
self.gf('django.db.models.fields.FloatField')(default=1),
keep_default=False)
def backwards(self, orm):
# Deleting field 'CLPeptideFilter.fp_cutoff'
db.delete_column(u'CLMSpipeline_app_clpeptidefilter', 'fp_cutoff')
models = {
u'CLMSpipeline_app.clpeptide': {
'Meta': {'ordering': "['-match_score']", 'object_name': 'CLPeptide'},
'autovalidated': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'cross_link': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'dataset': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['CLMSpipeline_app.Dataset']", 'symmetrical': 'False'}),
'delta': ('django.db.models.fields.FloatField', [], {}),
'display_protein1': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'display_protein2': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'error': ('django.db.models.fields.FloatField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_type': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'match_score': ('django.db.models.fields.FloatField', [], {}),
'not_decoy': ('django.db.models.fields.BooleanField', [], {'default'