Commit aa6d5b12 authored by Marc Duez's avatar Marc Duez

server : remove germline field from config

parent b27679a8
......@@ -6,11 +6,15 @@ if request.env.http_origin:
response.headers['Access-Control-Max-Age'] = 86400
def index():
if not auth.user :
res = {"redirect" : "default/user/login"}
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
if not auth.user :
res = {"redirect" : "default/user/login"}
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
query = db(db.config).select()
return dict(message=T('config_list'))
return dict(message=T('config_list'),
query=query)
def add():
......@@ -21,7 +25,7 @@ def add():
def add_form():
error =""
required_fields = ['config_name', 'config_command', 'config_germline', 'config_fuse_command', 'config_program']
required_fields = ['config_name', 'config_command', 'config_fuse_command', 'config_program']
for field in required_fields:
if request.vars[field] == "" :
error += field+" needed, "
......@@ -31,7 +35,6 @@ def add_form():
db.config.insert(name=request.vars['config_name'],
info=request.vars['config_info'],
command=request.vars['config_command'],
germline=request.vars['config_germline'],
fuse_command=request.vars['config_fuse_command'],
program=request.vars['config_program']
)
......@@ -54,7 +57,7 @@ def edit_form():
error =""
required_fields = ['config_name', 'config_command', 'config_germline', 'config_fuse_command', 'config_program']
required_fields = ['config_name', 'config_command', 'config_fuse_command', 'config_program']
for field in required_fields:
if request.vars[field] == "" :
error += field+" needed, "
......@@ -64,7 +67,6 @@ def edit_form():
db.config[request.vars["id"]] = dict(name=request.vars['config_name'],
info=request.vars['config_info'],
command=request.vars['config_command'],
germline=request.vars['config_germline'],
fuse_command=request.vars['config_fuse_command'],
program=request.vars['config_program']
)
......
......@@ -137,8 +137,7 @@ db.define_table('config',
Field('program', 'string'),
Field('command', 'string'),
Field('fuse_command', 'string'),
Field('info','text'),
Field('germline', 'string'))
Field('info','text'))
db.define_table('results_file',
......@@ -191,16 +190,14 @@ if db(db.auth_user.id > 0).count() == 0:
##création des configs de base
id_config_TRG = db.config.insert(
name = 'TRG',
command = '-c clones -z 100 -R 1 -r 1 ',
info = 'default trg config',
germline = 'TRG'
command = '-c clones -z 100 -R 1 -r 1 -G germline/TRG ',
info = 'default trg config'
)
id_config_IGH = db.config.insert(
name = 'IGH',
command = '-c clones -d -z 100 -R 1 -r 1 ',
info = 'default igh config',
germline = 'IGH'
command = '-c clones -d -z 100 -R 1 -r 1 -G germline/IGH ',
info = 'default igh config'
)
## permission
......
......@@ -83,15 +83,13 @@ def run_vidjil(id_file, id_config, id_data, id_fuse, clean_before=False, clean_a
## config de vidjil
vidjil_cmd = db.config[id_config].command
vidjil_germline = db.config[id_config].germline
vidjil_cmd = vidjil_cmd.replace( 'germline/' ,germline_folder)
os.makedirs(out_folder)
vidjil_log_file = open(out_folder+'/'+output_filename+'.vidjil.log', 'w')
## commande complete
cmd = defs.DIR_VIDJIL + '/vidjil ' + ' -o ' + out_folder + " -b " + output_filename
if not vidjil_germline == 'multi':
cmd += ' -G ' + germline_folder + vidjil_germline
cmd += ' ' + vidjil_cmd + ' '+ seq_file
## execute la commande vidjil
......
......@@ -8,20 +8,6 @@
<td > <input class="string" id="config_name" name="config_name" type="text" value=""> </td>
<td > </td>
</tr>
<tr>
<td><label for="config_germline" id="config_germline__label">Germline: </label></td>
<td><select id="config_germline" name="config_germline">
<option value="TRA">TRA</option>
<option value="TRB">TRB</option>
<option value="TRG">TRG</option>
<option value="TRD">TRD</option>
<option value="IGH">IGH</option>
<option value="IGK">IGK</option>
<option value="IGL">IGL</option>
<option value="multi">multi</option>
</select></td>
<td></td>
</tr>
<tr>
<td> <label for="config_program" id="config_program__label">Program: </label> </td>
<td><select id="config_program" name="config_program">
......
......@@ -13,20 +13,6 @@ info = db.config[request.vars["id"]]
<td > <input class="string" id="config_name" name="config_name" type="text" value="{{=info.name}}"> </td>
<td > </td>
</tr>
<tr>
<td><label for="config_germline" id="config_germline__label">Germline: </label></td>
<td><select id="config_germline" name="config_germline">
<option value="TRA" {{if info.germline == "TRA":}}selected="selected"{{pass}}>TRA</option>
<option value="TRB" {{if info.germline == "TRB":}}selected="selected"{{pass}}>TRB</option>
<option value="TRG" {{if info.germline == "TRG":}}selected="selected"{{pass}}>TRG</option>
<option value="TRD" {{if info.germline == "TRD":}}selected="selected"{{pass}}>TRD</option>
<option value="IGH" {{if info.germline == "IGH":}}selected="selected"{{pass}}>IGH</option>
<option value="IGK" {{if info.germline == "IGK":}}selected="selected"{{pass}}>IGK</option>
<option value="IGL" {{if info.germline == "IGL":}}selected="selected"{{pass}}>IGL</option>
<option value="multi" {{if info.germline == "multi":}}selected="selected"{{pass}}>multi</option>
</select></td>
<td></td>
</tr>
<tr>
<td> <label for="config_program" id="config_program__label">Program: </label> </td>
<td><select id="config_program" name="config_program">
......
......@@ -11,7 +11,6 @@
<thead>
<tr><td class="column2"> name </td>
<td class="column1"> program </td>
<td class="column1"> germline </td>
<td class="column2"> command </td>
<td> info </td>
<td class="column5"> </td>
......@@ -26,7 +25,6 @@
<tr>
<td> {{=row.name }} </td>
<td> {{=row.program }} </td>
<td> {{=row.germline }} </td>
<td> {{=row.command }} </td>
<td> {{=row.info }} </td>
<td onclick="db.call('config/edit', {'id' :'{{=row.id}}'} )" > e </td>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment