本文整理匯總了Python中quick.application.ExternalTrackManager.ExternalTrackManager.isGalaxyTrack方法的典型用法代碼示例。如果您正苦於以下問題:Python ExternalTrackManager.isGalaxyTrack方法的具體用法?Python ExternalTrackManager.isGalaxyTrack怎麽用?Python ExternalTrackManager.isGalaxyTrack使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類quick.application.ExternalTrackManager.ExternalTrackManager
的用法示例。
在下文中一共展示了ExternalTrackManager.isGalaxyTrack方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _collectTracks
# 需要導入模塊: from quick.application.ExternalTrackManager import ExternalTrackManager [as 別名]
# 或者: from quick.application.ExternalTrackManager.ExternalTrackManager import isGalaxyTrack [as 別名]
def _collectTracks(self):
tracks = [self._track, self._track2]
if 'trackNameIntensity' in self._kwArgs:
assert not 'extraTracks' in self._kwArgs
self._kwArgs['extraTracks'] = self._kwArgs['trackNameIntensity']
if 'extraTracks' in self._kwArgs:
from gold.track.Track import PlainTrack
import re
from config.Config import MULTIPLE_EXTRA_TRACKS_SEPARATOR
extraTracks = self._kwArgs['extraTracks']
if type(extraTracks) == str:
extraTracks = extraTracks.split(MULTIPLE_EXTRA_TRACKS_SEPARATOR)
for extraT in extraTracks:
if type(extraT) == str:
#extraT = extraT.split('|')
#extraT = re.split('\^|\|',extraT)
extraT = convertTNstrToTNListFormat(extraT)
if type(extraT) == list:
#print 'TEMP1: ', extraT
from urllib import unquote
extraT = [unquote(part) for part in extraT]
from quick.application.ExternalTrackManager import ExternalTrackManager
if ExternalTrackManager.isGalaxyTrack(extraT):
extraT = ExternalTrackManager.getPreProcessedTrackFromGalaxyTN(self.getGenome(), extraT)
extraT = PlainTrack(extraT)
tracks.append(extraT)
return tracks
示例2: runJob
# 需要導入模塊: from quick.application.ExternalTrackManager import ExternalTrackManager [as 別名]
# 或者: from quick.application.ExternalTrackManager.ExternalTrackManager import isGalaxyTrack [as 別名]
def runJob(batchLine, genome, fullAccess):
if batchLine[0] == '#' or batchLine.strip()=='':
return
from urllib import unquote
#Split and check number of columns
cols = [x for x in batchLine.strip().split(BATCH_COL_SEPARATOR)]
if len(cols) != 6:
results = Results(['N/A'],['N/A'],'N/A')
#results.addResultComponent( 'Invalid',InvalidRunResultComponent('Error in batch specification. 6 columns are required, while '\
# + str(len(cols)) + ' are given.'))
results.addError(InvalidRunSpecException('Error in batch specification. 6 columns are required, while '\
+ str(len(cols)) + ' are given: ' + batchLine))
return results
#print 'COL2: ',cols[2]
cols[2] = unquote(cols[2])
#print 'COL2: ',cols[2]
from quick.application.ExternalTrackManager import ExternalTrackManager
if ExternalTrackManager.isGalaxyTrack(cols[2].split(':')):
cols[2] = ExternalTrackManager.extractFnFromGalaxyTN(cols[2].split(':'))
#print 'COL2: ',cols[2]
try:
from quick.application.GalaxyInterface import GalaxyInterface
trackName1 = [unquote(x) for x in cols[3].split(':')]
trackName2 = [unquote(x) for x in cols[4].split(':')]
cleanedTrackName1, cleanedTrackName2 = GalaxyInterface._cleanUpTracks([trackName1, trackName2], genome, realPreProc=True)
cleanedTrackName1 = BatchRunner._inferTrackName(':'.join(cleanedTrackName1), genome, fullAccess)
cleanedTrackName2 = BatchRunner._inferTrackName(':'.join(cleanedTrackName2), genome, fullAccess)
except (InvalidRunSpecException,IdenticalTrackNamesError), e:
if DebugConfig.PASS_ON_BATCH_EXCEPTIONS:
raise
results = Results(['N/A'],['N/A'],'N/A')
results.addError(e)
return results