Ejemplo n.º 1
0
         # Move to Stage 3, where we get the residence time distribution
         Utilities.globalIO.setStep("Step3::GetModel")
         # no longer in any particular file, so save in 'top level'
         Utilities.globalIO.setFile("")
         params,stdev,RSQ = GetModel.GetModelMain(fileData,modelsToUse)
     else:
         # stage 3 files exist. Just need to load the files to be able 
         # to compare...
         params = []
         stdev = []
         RSQ = []
         for num in modelsToUse:
             thisModelFiles = [Utilities.getModelFile(f,num) 
                               for f in fileNamesStage3]
             paramsTmp, stdevTmp,RSQTmp = \
                                 Utilities.loadAll(stage3Folder,
                                                   thisModelFiles)
             params.append(paramsTmp)
             stdev.append(stdevTmp)
             RSQ.append(RSQTmp)
         Utilities.ReportMessage("Skipping Stage3 since [" + cacheFileS3 + 
                                 "] already exists, plotting comparison.")
     # for each trial, for now just look at a single Model
     # XXX fix this!...    
     modelToCheck = 0
     fitStdRsq = [params[modelToCheck][:],stdev[modelToCheck][:],
                  RSQ[modelToCheck]]
     stats = np.concatenate(fitStdRsq)
     trialStats[tNum,:] = stats
 # POST: all trials completed.
 Utilities.globalIO.reset()
 outputDir = Utilities.globalIO.getOutputDir([],"") 
Ejemplo n.º 2
0
    # just use a single file for this testing bit.
    filesFound = [filesFound[0]]
    fileNameExt = os.path.basename(filesFound[0])
    fileName = os.path.splitext(fileNameExt)[0]
    Utilities.globalIO.setTrial(t)
    Utilities.globalIO.setFile(fileName)
    Utilities.globalIO.setStep("Step1::GetTraces")
    outputDir = Utilities.globalIO.getOutputDir([],"")
    stage1Folder = outputDir + "Post_Stage1_Analysis/"
    if (not Utilities.dirExists(stage1Folder)):
        # get the X,Y velocity, times, and ratio on a per protein basis
        # each of these is a list. Each element in a list corresponds to data
        # for a single protein
        trackedTimes,trackedFRET,trackedDiffusion = \
                GetTraces.GetTracesMain(filesFound)
        # get the output dir for the previous path. 
    else:
        # the output directory exists; no sense in re-running the analysis.
        # just use the text output.
        Utilities.ReportMessage("Skipping Stage1 since [" + stage1Folder + 
                                "] already exists")
        trackedTimes, trackedDiffusion,trackedFRET = \
                        Utilities.loadAll(stage1Folder,fileNames)
    # POST: now have valid, trackable diffusion, times, and FRET
    # Move to stage 2. where we get the unfolding times
    Utilities.globalIO.setStep("Step2::GetPhysics")
    unfoldingTimes, diffusionCoeffs = \
                    GetPhysics.GetPhysicsMain(trackedTimes
                                              ,trackedFRET,trackedDiffusion)
    exit(1)