Skip to content

Commit

Permalink
fix: fix fetching protein embeddings in the dataset.py
Browse files Browse the repository at this point in the history
  • Loading branch information
macwiatrak committed Feb 1, 2025
1 parent 55a5903 commit 306e38e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bactgraph/modeling/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __getitem__(self, idx) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
# get the expression data for the idx-th strain
strain = self.strains[idx]
# get protein embeddings
prot_emb = torch.tensor(self.protein_embeddings.loc[strain].values, dtype=torch.float32)
prot_emb = torch.tensor(np.stack(self.protein_embeddings.loc[strain].values), dtype=torch.float32)
expr_values = torch.tensor(
[self.expression_df.loc[gene, strain] for gene in self.protein_embeddings.columns], dtype=torch.float32
)
Expand Down

0 comments on commit 306e38e

Please sign in to comment.