From c1f7eadac19ce6dcb0d7b148474f6d0c02b212f0 Mon Sep 17 00:00:00 2001 From: Angad Pal Singh Date: Wed, 13 Apr 2022 08:02:37 -0400 Subject: [PATCH] Invert (and fix) the tissue_mask when creating tensor object for gene maps analysis (#46) Co-authored-by: Angad Pal Singh --- xfuse/analyze/gene_maps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xfuse/analyze/gene_maps.py b/xfuse/analyze/gene_maps.py index a87d8a4..164fcf3 100644 --- a/xfuse/analyze/gene_maps.py +++ b/xfuse/analyze/gene_maps.py @@ -156,7 +156,7 @@ def _prepare(x): def _save_tensor(gene, samples, tissue_mask): if tissue_mask is not None: - samples[:, tissue_mask] = 0.0 + samples[:, ~tissue_mask] = 0.0 torch.save(samples, f"{gene}.pt") writers: Dict[str, Callable[..., None]] = {