def extract(self, experiment, type, indiv): filepath = GetAltFile.getAltTraceFile(experiment, type, indiv) if filepath != False: return TraceDistance.calcDistance(filepath) else: print "WARN: couldn't find alt trace file for experiment {}, indiv {}".format(experiment[0], indiv[0]) return ["NA"] * 4
def extract(self, experiment, type, indiv): noResultVal = ["NA", "NA", "NA"] filepath = GetAltFile.getAltPopFile(experiment, type, indiv) if filepath != False: vd = VoxelData(filepath) relCounts = vd.getRelCounts() if not relCounts: return noResultVal return [relCounts["fat"], relCounts["muscle"], relCounts["bone"]] else: return noResultVal
def extract(self, experiment, type, indiv): noResultVal = ['NA'] * 4 filepath = GetAltFile.getAltPopFile(experiment, type, indiv) if filepath != False: vd = VoxelData(filepath) absCounts = vd.getAbsCounts() if not absCounts: return noResultVal return [absCounts["fat"], absCounts["muscle"], absCounts["bone"], sum(absCounts.values())] else: return noResultVal