root/galaxy-central/tools/rgenetics/rgLDIndep_code.py

リビジョン 2, 0.7 KB (コミッタ: hatakeyama, 14 年 前)

import galaxy-central

行番号 
1from galaxy import app
2import os, string, time
3
4def timenow():
5    """return current time as a string
6    """
7    return time.strftime('%d/%m/%Y %H:%M:%S', time.localtime(time.time()))
8
9
10
11def exec_after_process(app, inp_data, out_data, param_dict, tool, stdout, stderr):
12    name,data = out_data.items()[0]
13    basename = param_dict['title1']
14    killme = string.punctuation + string.whitespace
15    trantab = string.maketrans(killme,'_'*len(killme))
16    title = basename.encode().translate(trantab)
17    info = '%s filtered by rgLDIndep.py at %s' % (title,timenow())
18    data.file_name = data.file_name
19    data.metadata.base_name = title
20    data.name = '%s.pbed' % title
21    data.info = info
22    app.model.context.flush()
23
24
25
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。