def _getBasicTrackFormat(choices, tnChoiceIndex=1, genomeChoiceIndex=0): genome = GeneralGuiTool._getGenomeChoice(choices, genomeChoiceIndex)[0] tn = GeneralGuiTool._getTrackChoice(choices, tnChoiceIndex)[0] from quick.application.GalaxyInterface import GalaxyInterface from gold.description.TrackInfo import TrackInfo from quick.application.ExternalTrackManager import ExternalTrackManager from gold.track.TrackFormat import TrackFormat if ExternalTrackManager.isGalaxyTrack(tn): geSource = ExternalTrackManager.getGESourceFromGalaxyOrVirtualTN( tn, genome) try: tf = GeneralGuiTool._convertToBasicTrackFormat( TrackFormat.createInstanceFromGeSource( geSource).getFormatName()) except Warning: return genome, tn, '' else: if GalaxyInterface.isNmerTrackName(genome, tn): tfName = 'Points' else: tfName = TrackInfo(genome, tn).trackFormatName tf = GeneralGuiTool._convertToBasicTrackFormat(tfName) return genome, tn, tf
def _isValidTrack(prevChoices, tnChoiceIndex=1): from quick.application.GalaxyInterface import GalaxyInterface from quick.application.ProcTrackOptions import ProcTrackOptions genome = prevChoices[0] tn = prevChoices[tnChoiceIndex].split(':') return ProcTrackOptions.isValidTrack(genome, tn, True) or \ GalaxyInterface.isNmerTrackName(genome, tn)
def _isValidTrack(choices, tnChoiceIndex=1, genomeChoiceIndex=0): from quick.application.GalaxyInterface import GalaxyInterface from quick.application.ProcTrackOptions import ProcTrackOptions genome, errorStr = GeneralGuiTool._getGenomeChoice( choices, genomeChoiceIndex) if errorStr or genome is None: return False trackName, errorStr = GeneralGuiTool._getTrackChoice( choices, tnChoiceIndex) if errorStr: return False return ProcTrackOptions.isValidTrack(genome, trackName, True) or \ GalaxyInterface.isNmerTrackName(genome, trackName)
def _getValueTypeName(choices, tnChoiceIndex=1, genomeChoiceIndex=0): genome = GeneralGuiTool._getGenomeChoice(choices, genomeChoiceIndex)[0] tn = GeneralGuiTool._getTrackChoice(choices, tnChoiceIndex)[0] from quick.application.GalaxyInterface import GalaxyInterface from gold.description.TrackInfo import TrackInfo from quick.application.ExternalTrackManager import ExternalTrackManager from gold.track.TrackFormat import TrackFormat if ExternalTrackManager.isGalaxyTrack(tn): geSource = ExternalTrackManager.getGESourceFromGalaxyOrVirtualTN( tn, genome) valTypeName = TrackFormat.createInstanceFromGeSource( geSource).getValTypeName() else: if GalaxyInterface.isNmerTrackName(genome, tn): valTypeName = '' else: valTypeName = TrackInfo(genome, tn).markType return valTypeName.lower()
def _getBasicTrackFormat(choices, tnChoiceIndex=1): from quick.application.GalaxyInterface import GalaxyInterface from gold.description.TrackInfo import TrackInfo genome = choices[0] tn = choices[tnChoiceIndex].split(':') if GalaxyInterface.isNmerTrackName(genome, tn): tfName = 'Points' else: tfName = TrackInfo(genome, tn).trackFormatName tfName = tfName.lower() if tfName.startswith('linked '): tfName = tfName[7:] tfName = tfName.replace('unmarked ','') tfName = tfName.replace('marked','valued') return genome, tn, tfName