def viewSingleRecord(cls, record, research_mode): view_aspects = defineViewSchema() view_checker = ViewDataChecker(view_aspects) view_checker.regValue(0, record) rep_out = StringIO() is_ok = view_checker.finishUp(rep_out) if not is_ok: logging.error("Single record annotation failed:\n" + rep_out.getvalue()) assert is_ok aspects = AspectSetH.load(view_aspects.dump()) return aspects.getViewRepr(record, research_mode)
def __init__(self, data_vault, dataset_info, dataset_path): self.mDataVault = data_vault self.mDataInfo = dataset_info self.mLock = Lock() self.mName = dataset_info["name"] self.mDSKind = dataset_info["kind"] self.mTotal = dataset_info["total"] self.mMongoName = dataset_info["mongo"] self.mAspects = AspectSetH.load(dataset_info["view_schema"]) self.mFltSchema = dataset_info["flt_schema"] self.mPath = dataset_path self.mVData = IndexBZ2(self.mPath + "/vdata.ixbz2") self.mFamilyInfo = FamilyInfo.load(dataset_info.get("family"))
def __init__(self, data_vault, dataset_info, dataset_path): self.mDataVault = data_vault self.mDataInfo = dataset_info self.mLock = Lock() self.mName = dataset_info["name"] self.mDSKind = dataset_info["kind"] self.mTotal = dataset_info["total"] self.mMongoAgent = (data_vault.getApp().getMongoConnector().getDSAgent( dataset_info["mongo"], dataset_info["kind"])) self.mAspects = AspectSetH.load(dataset_info["view_schema"]) self.mFltSchema = dataset_info["flt_schema"] self.mPath = dataset_path self.mVData = IndexBZ2(self.mPath + "/vdata.ixbz2") self.mFamilyInfo = FamilyInfo(dataset_info["meta"]["samples"], dataset_info["meta"].get("proband")) tuneAspects(self, self.mAspects)
def __init__(self, data_vault, dataset_info, dataset_path, sol_pack_name=None): SolutionBroker.__init__( self, dataset_info["meta"].get("data_schema", "CASE"), dataset_info.get("modes")) self.addModes(data_vault.getApp().getRunModes()) self.mDataVault = data_vault self.mDataInfo = dataset_info self.mName = dataset_info["name"] self.mDSKind = dataset_info["kind"] self.mTotal = dataset_info["total"] self.mMongoAgent = (data_vault.getApp().getMongoConnector().getDSAgent( dataset_info["mongo"], dataset_info["kind"])) self.mAspects = AspectSetH.load(dataset_info["view_schema"]) self.mFltSchema = dataset_info["flt_schema"] self.mPath = dataset_path self.mFInfo = self.mDataVault.checkFileStat(self.mPath + "/dsinfo.json") if self.getDataSchema() == "FAVOR" and self.mDSKind == "xl": self.mRecStorage = FavorStorage( self.getApp().getOption("favor-url")) else: self.mRecStorage = DataDiskStorage(self, self.mPath) self.mFamilyInfo = FamilyInfo(dataset_info["meta"]) if (self.mDataInfo.get("zygosity_var") and 1 < len(self.mFamilyInfo) <= 10): self.addModes({"ZYG"}) self.mZygSupport = None self.mViewContext = dict() if self.mFamilyInfo.getCohortList(): self.mViewContext["cohorts"] = self.mFamilyInfo.getCohortMap() view_aspect = AnfisaConfig.configOption("view.cohorts.aspect") self.mAspects[view_aspect]._setViewColMode("cohorts") completeDsModes(self) tuneAspects(self, self.mAspects)