Beispiel #1
0
def test():
    pathDir = '/home/jaggu/marcotte_project/boulgakov/microscope/2015-Oct/2015-10-27_forHopper'
    outputDirname = "output_2015-11-02"                                                                         	
                                                                                                            	
    outputDir = os.path.join(pathDir,outputDirname)                                                             	
    destDir = '/home/jaggu/marcotte_project/current/project2/jaggu/dataAnalysis/microscope1/2015-Oct/2015-10-27'	
	
    trackPhotometryFile = 'track_photometries_nx8t5v.csv'
    trackFile = os.path.join(outputDir,trackPhotometryFile)
    #category_trackDetails_ch1 = makeIntensityCategory(trackFile,ch=1)
    #category_trackDetails_ch2 = makeIntensityCategory(trackFile,ch=2)
    #print "Categories Dictionaries pickled"

    category_dict_ch1 = loadPkl('category_trackDetails.ch1.dict.pkl',pathDir)
    category_dict_ch2 = loadPkl('category_trackDetails.ch2.dict.pkl',pathDir)
    print "Categories Dictionaries loaded "
    
    desired_category = getDesiredCategory('staggered')
    desired_categoryList_ch1 = getIntensityList_category(category_dict_ch1,desired_category)
    desired_categoryList_ch2 = getIntensityList_category(category_dict_ch2,desired_category)

    writeCountsFile([desired_categoryList_ch1,desired_categoryList_ch2])
    print "Peptide track counts and intensity file created"

    edmanframe_ch1 = 3
    edmanframe_ch2 = 4
    allCounts_ch1 = [item[1] for item in desired_categoryList_ch1]
    allCounts_ch2 = [item[1] for item in desired_categoryList_ch2]
    
    eff1_ch1,eff2_ch1 = calculateEdmanEfficiency(allCounts_ch1,edmanframe_ch1)
    eff1_ch2,eff2_ch2 = calculateEdmanEfficiency(allCounts_ch2,edmanframe_ch2)
    print "Overall Edman efficiency - \n Ch1 : ",eff1_ch1,eff2_ch1," \n Ch2 : ",eff1_ch2,eff2_ch2
Beispiel #2
0
 def countTracks(self, pickle_exists=False,nbrframes=7,nbrchannels=2):
     trackFile = self.trackFile
     if pickle_exists:
         category_dict_ch1 = loadPkl('category_trackDetails.ch1.dict.pkl',self.pathDir)
         category_dict_ch2 = loadPkl('category_trackDetails.ch2.dict.pkl',self.pathDir)
         print "Categories Dictionaries loaded "
     else:
         category_dict_ch1,category_peakDetails_ch1 = peptracks.makeIntensityCategory(trackFile,ch=1)
         category_dict_ch2,category_peakDetails_ch2 = peptracks.makeIntensityCategory(trackFile,ch=2)
         self.pickle_categoryDict(category_dict_ch1,'category_trackDetails.ch',1)
         self.pickle_categoryDict(category_dict_ch2,'category_trackDetails.ch',2)
         self.pickle_categoryDict(category_peakDetails_ch1,'category_peakDetails.ch',1)
         self.pickle_categoryDict(category_peakDetails_ch2,'category_peakDetails.ch',2)
         print "Categories Dictionaries pickled"
     return category_dict_ch1, category_dict_ch2