Previous changeset 14:a4ad76e3dc4a (2020-09-11) Next changeset 16:004cd2ccf7fc (2020-11-13) |
Commit message:
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 044580b6bfcd36a5c1cb9e70b40045eb8f71b7e2-dirty" |
modified:
anndata_operations.xml |
b |
diff -r a4ad76e3dc4a -r c09d61ede252 anndata_operations.xml --- a/anndata_operations.xml Fri Sep 11 11:04:39 2020 +0000 +++ b/anndata_operations.xml Wed Sep 30 15:34:21 2020 +0000 |
[ |
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<tool id="anndata_ops" name="AnnData Operations" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@"> +<tool id="anndata_ops" name="AnnData Operations" version="@TOOL_VERSION@+galaxy1" profile="@PROFILE@"> <description>modifies metadata and flags genes</description> <macros> <import>scanpy_macros2.xml</import> @@ -68,9 +68,13 @@ #for $j, $o_key in enumerate($copy_o.obs_keys): keys_to_copy = (k for k in ad_s.obs.keys() if "${o_key.contains}" in k) for k_to_copy in keys_to_copy: - adata.obs[[k_to_copy+"_${i}"]] = ad_s.obs[[k_to_copy]] + suffix='' + if k_to_copy in adata.obs: + suffix = "_${i}" + + adata.obs[[k_to_copy+suffix]] = ad_s.obs[[k_to_copy]] if k_to_copy in ad_s.uns.keys(): - adata.uns[k_to_copy+"_${i}"] = ad_s.uns[k_to_copy] + adata.uns[k_to_copy+suffix] = ad_s.uns[k_to_copy] #end for else: logging.warning("Observation source ${i} AnnData file is not compatible to be merged to main AnnData file, different cell names.") @@ -85,7 +89,10 @@ #for $j, $e_key in enumerate($copy_e.embedding_keys): keys_to_copy = (k for k in ad_s.obsm.keys() if "${e_key.contains}" in k) for k_to_copy in keys_to_copy: - adata.obsm[k_to_copy+"_${i}"] = ad_s.obsm[k_to_copy] + suffix = '' + if k_to_copy in adata.obsm: + suffix = "_${i}" + adata.obsm[k_to_copy+suffix] = ad_s.obsm[k_to_copy] #end for else: logging.warning("Embedding source ${i} AnnData file is not compatible to be merged to main AnnData file, different cell names.") @@ -99,7 +106,10 @@ #for $j, $u_key in enumerate($copy_u.uns_keys): keys_to_copy = (k for k in ad_s.uns.keys() if "${u_key.contains}" in k) for k_to_copy in keys_to_copy: - adata.uns[k_to_copy+"_${i}"] = ad_s.uns[k_to_copy] + suffix='' + if k_to_copy in adata.uns: + suffix="_${i}" + adata.uns[k_to_copy+suffix] = ad_s.uns[k_to_copy] #end for else: logging.warning("Uns source ${i} AnnData file is not compatible to be merged to main AnnData file, different cell names.") |