Пример #1
0
 def handleReferenceTrack(self, genome, tracks, track_names, clusterMethod, extra_option ):
     reftrack_names = [] #for use in creating the heatmap (as the column names)
     refTracks = []
     options = [] #for the case using refTracks, options contains feature for every refTrack, chosen by user.
     print 'params'
     keys = sorted(self.params.keys())
     for key in keys:
         print key, self.params[key]
     numreferencetracks = self.params.get('numreferencetracks')
     refTracks = [self.params['reftrack' + str(i+1)] for i in range(int(numreferencetracks))] if numreferencetracks else None
     refFeatures = [self.params.get('ref'+str(i)+'feature') for i in range(int(numreferencetracks))] if numreferencetracks else None
     yesNo = [self.params.get('yes_no'+str(i)) for i in range(int(numreferencetracks))] if numreferencetracks else None
     howMany = [self.params.get('how_many'+str(i)) if self.params.get('how_many'+str(i)) else '0' for i in range(int(numreferencetracks))] if numreferencetracks else None
     upFlank = [ [self.params.get(str(i)+'_'+str(v)+'up')for v in range(int(howMany[i]))] for i in range(int(numreferencetracks))] if numreferencetracks else None 
     downFlank =[ [self.params.get(str(i)+'_'+str(v)+'down') for v in range(int(howMany[i]))] for i in range(int(numreferencetracks))] if numreferencetracks else None 
     distanceType = self.params.get("distanceType") #from distanceType select tag 
     kmeans_alg = self.params.get("kmeans_alg")
     regSpec, binSpec = self.getRegAndBinSpec()
     
     ClusteringExecution.executeReferenceTrack(genome, tracks, track_names, clusterMethod, extra_option, distanceType, kmeans_alg, self.jobFile, regSpec, binSpec, numreferencetracks, refTracks, refFeatures, yesNo, howMany, upFlank, downFlank)
Пример #2
0
 def handleSelfFeature(self, genome, tracks, track_names, clusterMethod, extra_option):
     
     if self.params.has_key("self_feature") :
         feature = self.params.get("self_feature")
         distanceType = self.params.get("distanceType") #from distanceType select tag 
         kmeans_alg = self.params.get("kmeans_alg")
         jobFile = self.jobFile
         regSpec, binSpec = self.getRegAndBinSpec()
         
         return ClusteringExecution.executeSelfFeature(genome, tracks, track_names, clusterMethod, extra_option, feature, distanceType, kmeans_alg, jobFile, regSpec, binSpec)
     else :
         print 'A feature must be selected in order to build the feature vecotr for tracks.'