Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert changes to the mnnpy component since it requires python:3.8 #466

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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