Skip to content

Commit

Permalink
revert changes to the mnnpy component since it requires python:3.8 (#466
Browse files Browse the repository at this point in the history
)
  • Loading branch information
rcannood authored Sep 4, 2024
1 parent 9493835 commit 1c9483c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
4 changes: 1 addition & 3 deletions src/tasks/batch_integration/methods/mnnpy/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ functionality:
resources:
- type: python_script
path: script.py
- type: python_script
path: /src/common/helper_functions/read_anndata_partial.py
platforms:
# Due to a [ gcc-8 ] dependency in the mnnpy package, we need to use a python:3.8 image
- type: docker
Expand All @@ -51,4 +49,4 @@ platforms:
- chriscainx/mnnpy
- type: nextflow
directives:
label: [midtime, lowcpu, lowmem]
label: [ midtime, lowcpu, lowmem ]
16 changes: 4 additions & 12 deletions src/tasks/batch_integration/methods/mnnpy/script.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
import anndata as ad
import mnnpy

Expand All @@ -14,18 +13,11 @@
}
## VIASH END

sys.path.append(meta["resources_dir"])
from read_anndata_partial import read_anndata


print('Read input', flush=True)
adata = read_anndata(
par['input'],
X='layers/normalized',
obs='obs',
var='var',
uns='uns'
)
adata = ad.read_h5ad(par['input'])
adata.X = adata.layers['normalized']
del adata.layers['normalized']
del adata.layers['counts']

if par['n_hvg']:
print(f"Select top {par['n_hvg']} high variable genes", flush=True)
Expand Down

0 comments on commit 1c9483c

Please sign in to comment.