Skip to content

Commit

Permalink
Merge pull request #25 from jgu13/master
Browse files Browse the repository at this point in the history
Fix on line 297 of celltype.py
  • Loading branch information
kieranrcampbell authored Aug 29, 2022
2 parents b9984ff + 47d5a76 commit a2f6bf8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion astir/data/data_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ def from_csv_yaml(
create_design_mat: bool = True,
random_seed: int = 1234,
dtype: torch.dtype = torch.float64,
sep: str = ',',
usecols: list = None
) -> Any:
"""Create an Astir object from an expression CSV and marker YAML
Expand All @@ -36,7 +38,7 @@ def from_csv_yaml(
defaults to 1234
:param dtype: datatype of the model parameters, defaults to torch.float64
"""
df_gex = pd.read_csv(csv_input, index_col=0)
df_gex = pd.read_csv(csv_input, sep=sep, usecols=usecols, index_col=0)

design = None
if design_csv is not None and create_design_mat == True:
Expand Down
2 changes: 1 addition & 1 deletion astir/models/celltype.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def predict(self, new_dset: pd.DataFrame) -> np.array:
:param new_dset: the dataset to be predicted
:return: the resulting cell type assignment
"""
_, exprs_X, _ = new_dset[:]
exprs_X = torch.tensor(new_dset[:].values)
g = pd.DataFrame(self._recog.forward(exprs_X)[0].detach().cpu().numpy())
return g

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ nbsphinx-link
tables
typeguard
mypy

scanpy

0 comments on commit a2f6bf8

Please sign in to comment.