# HG changeset patch # User ebi-gxa # Date 1729869144 0 # Node ID 70a5c6f2408d8e33d37ca2fae9da4d9c2924c04c # Parent f6040492b499ecf4397ef14a35ca03b17f69fea1 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit f6c6b8e014c99101232dc75aa972a12fc640a4de diff -r f6040492b499 -r 70a5c6f2408d decoupler_pseudobulk.py --- a/decoupler_pseudobulk.py Wed Oct 02 08:26:56 2024 +0000 +++ b/decoupler_pseudobulk.py Fri Oct 25 15:12:24 2024 +0000 @@ -503,6 +503,14 @@ for condition in conditions: # remove any starting or trailing whitespaces from condition condition = condition.strip() + if condition not in adata.obs[obs_field].unique(): + raise ValueError( + f"Condition '{condition}' from contrast {contrast}" + f" is not present in the " + f"obs_field '{obs_field}' from the AnnData object." + f"Possible values are: " + f"{', '.join(adata.obs[obs_field].unique())}." + ) # check the percentage of cells that express each gene # Filter the AnnData object based on the obs_field value adata_filtered = adata[adata.obs[obs_field] == condition] diff -r f6040492b499 -r 70a5c6f2408d decoupler_pseudobulk.xml --- a/decoupler_pseudobulk.xml Wed Oct 02 08:26:56 2024 +0000 +++ b/decoupler_pseudobulk.xml Fri Oct 25 15:12:24 2024 +0000 @@ -1,4 +1,4 @@ - + aggregates single cell RNA-seq data for running bulk RNA-seq methods decoupler @@ -103,10 +103,10 @@ produce_plots - + factor_fields - + filter_per_contrast['filter'] == 'yes'