本文整理汇总了Python中quick.util.GenomeInfo.GenomeInfo.timeOfInstallation方法的典型用法代码示例。如果您正苦于以下问题:Python GenomeInfo.timeOfInstallation方法的具体用法?Python GenomeInfo.timeOfInstallation怎么用?Python GenomeInfo.timeOfInstallation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类quick.util.GenomeInfo.GenomeInfo
的用法示例。
在下文中一共展示了GenomeInfo.timeOfInstallation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: execute
# 需要导入模块: from quick.util.GenomeInfo import GenomeInfo [as 别名]
# 或者: from quick.util.GenomeInfo.GenomeInfo import timeOfInstallation [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 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.
'''
print 'Executing...'
tempinfofile=ExternalTrackManager.extractFnFromGalaxyTN(choices[0].split(":"))
abbrv=GenomeImporter.getGenomeAbbrv(tempinfofile)
gi = GenomeInfo(abbrv)
chrNamesInFasta=gi.sourceChrNames
chromNamesDict={}
chrDict = InstallGenomeTool._getRenamedChrDictWithSelection(choices)
for i, key in enumerate(chrDict.keys()):
if chrDict[key]:
chromNamesDict[chrNamesInFasta[i]]=key
print 'All chromosomes chosen: ' + str(chromNamesDict)
stdChrDict = InstallGenomeTool._getRenamedChrDictWithSelection(choices, stdChrs=True)
stdChrs = [x for x in stdChrDict if stdChrDict[x]]
print 'Standard chromosomes chosen: ' + ", ".join(stdChrs)
GenomeImporter.createGenome(abbrv, gi.fullName, chromNamesDict, stdChrs, username=username)
gi.installedBy = username
gi.timeOfInstallation = datetime.now()
gi.store()
示例2: GenomeInfo
# 需要导入模块: from quick.util.GenomeInfo import GenomeInfo [as 别名]
# 或者: from quick.util.GenomeInfo.GenomeInfo import timeOfInstallation [as 别名]
from datetime import datetime
gi = GenomeInfo('TestGenome')
gi.fullName = 'TestGenome'
gi.sourceUrls = ['http://hgdownload.cse.ucsc.edu/goldenPath/hg18/chromosomes/chr21.fa.gz', \
'http://hgdownload.cse.ucsc.edu/goldenPath/hg18/chromosomes/chrM.fa.gz']
gi.sourceChrNames = ['chr21', 'chrM']
gi.installedBy = 'Setup.py'
gi.genomeBuildSource = 'NCBI'
gi.genomeBuildName = 'hg18'
gi.species = 'Homo Sapiens'
gi.speciesTaxonomyUrl = 'http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=9606'
gi.assemblyDetails = 'Chromosome 21 and M from the hg18 genome, used for testing purposes.'
gi.isPrivate = False
gi.privateAccessList = []
gi.isExperimental = False
gi.timeOfInstallation = datetime.now()
gi.store()
def setupHB(galaxyPath='', ignoreVersionChecking=False, installationSetupFn=''):
hbPath = os.path.dirname(os.path.realpath(sys.argv[0]))
os.chdir(hbPath)
checkDependencies()
setupAllInstallationSpecificSetupFiles(hbPath, installationSetupFn)
galaxyPath = getWorkingGalaxyPath(galaxyPath)
if not ignoreVersionChecking:
checkGalaxyVersion(hbPath, galaxyPath)
addPathsToLocalOSConfigIfNecessary(hbPath, galaxyPath)