def calc_shared(self, label):
"""
Get the subset of scores that are shared across all Selections in each
Condition.
"""
if self.check_store("/main/{}/scores_shared".format(label)):
return
idx = pd.IndexSlice
logging.info("Identifying subset shared across all Selections ({})"
"".format(label), extra={'oname': self.name})
data = self.store.select("/main/{}/scores_shared_full".format(label))
# identify variants found in all selections in at least one condition
complete = np.full(len(data.index), False, dtype=bool)
for cnd in data.columns.levels[0]:
complete = np.logical_or(complete,
data.loc[:, idx[cnd, :, :]].notnull().all(
axis='columns'))
data = data.loc[complete]
self.store.put("/main/{}/scores_shared".format(label), data,
format="table")
评论列表
文章目录