示例#1
0
 def loadEnvData(self):
     def _hdrPreProc(row):
         ind = row.index("Latitude, Longitute (DD)")
         assert ind == 3
         return [ re.sub(r"[^a-zA-Z0-9_]+","_",name).strip("_") for name in (["id_samp"]+row[1:ind]+["Latitude (DD)", "Longitute (DD)"]+row[ind+1:]) ]
     def _preProc(row,*l,**kw):
         ind = 3
         return (row[:ind]+row[ind].split(",")+row[ind+1:],)
     PostPredAn.loadEnvData(csvInp=self.envInpCsv,dbOut=self.dbMergeFile,preProc=_preProc,hdrPreProc=_hdrPreProc)
示例#2
0
 def merge(self):
     samples = [ (sampSubDir.split("_")[0],pjoin(self.topPredDir,sampSubDir,"results/pred-taxa.sqlite")) for \
             sampSubDir in self.sampSubDirs ]
     PostPredAn.mergeStats(samples=samples,dbOut=self.dbMergeFile)
示例#3
0
 def exportPivots(self):
     makedir(self.topPivotDir)
     PostPredAn.exportAsPivots(dbInp=self.dbMergeFile,csvOutBase=self.csvPivotBase,minWeight=100)
示例#4
0
 def exportEnvData(self):
     makedir(self.topEnvDir)
     PostPredAn.exportEnvData(dbInp=self.dbMergeFile,csvOutBase=self.csvEnvBase)