本文整理汇总了Python中quick.application.ExternalTrackManager.ExternalTrackManager.getStdTrackNameFromGalaxyTN方法的典型用法代码示例。如果您正苦于以下问题:Python ExternalTrackManager.getStdTrackNameFromGalaxyTN方法的具体用法?Python ExternalTrackManager.getStdTrackNameFromGalaxyTN怎么用?Python ExternalTrackManager.getStdTrackNameFromGalaxyTN使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类quick.application.ExternalTrackManager.ExternalTrackManager
的用法示例。
在下文中一共展示了ExternalTrackManager.getStdTrackNameFromGalaxyTN方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: execute
# 需要导入模块: from quick.application.ExternalTrackManager import ExternalTrackManager [as 别名]
# 或者: from quick.application.ExternalTrackManager.ExternalTrackManager import getStdTrackNameFromGalaxyTN [as 别名]
def execute(choices, galaxyFn=None, username=''):
'''Is called when execute-button is pushed by web-user.
Should print output as HTML to standard out, which will be directed to a results page in Galaxy history.
If getOutputFormat is anything else than HTML, the output should be written to the file with path galaxyFn.
If needed, StaticFile can be used to get a path where additional files can be put (e.g. generated image files).
choices is a list of selections made by web-user in each options box.
'''
genome = choices[0]
trackName = choices[1].split(':')
galaxyOutTrackName = 'galaxy:hbfunction:%s:Create function track of distance to nearest segment' % galaxyFn
outTrackName = ExternalTrackManager.getStdTrackNameFromGalaxyTN(galaxyOutTrackName.split(':'))
if choices[2] == 'No transformation':
valTransformation = 'None'
elif choices[2] =='Logarithmic (log10(x))':
valTransformation = 'log10'
elif choices[2] == 'Fifth square root (x**0.2)':
valTransformation = 'power0.2'
analysisDef ='[dataStat=MakeDistanceToNearestSegmentStat] [valTransformation=%s][outTrackName=' % valTransformation \
+ '^'.join(outTrackName) + '] -> CreateFunctionTrackStat'
#userBinSource, fullRunArgs = GalaxyInterface._prepareRun(trackName, None, analysisDef, '*', '*', genome)
#
#for el in userBinSource:
# print el.chr, el.start, el.end
from quick.application.GalaxyInterface import GalaxyInterface
print GalaxyInterface.getHbFunctionOutputBegin(galaxyFn, withDebug=False)
GalaxyInterface.runManual([trackName], analysisDef, '*', '*', genome, username=username, printResults=False, printHtmlWarningMsgs=False)
#job = AnalysisDefJob(analysisDef, trackName, None, userBinSource).run()
print GalaxyInterface.getHbFunctionOutputEnd('A custom track has been created by finding the bp-distance to the nearest segment', withDebug=False)