Mercurial > repos > ebi-gxa > anndata_ops
annotate anndata_operations.xml @ 9:b8eb50bd397c draft
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
author | ebi-gxa |
---|---|
date | Mon, 08 Jun 2020 05:08:44 -0400 |
parents | d586ebb8ff43 |
children | 54f1212d26ac |
rev | line source |
---|---|
0
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
1 <?xml version="1.0" encoding="utf-8"?> |
9
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
2 <tool id="anndata_ops" name="AnnData Operations" version="0.0.2+galaxy0" profile="@PROFILE@"> |
0
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
3 <description>modifies metadata and flags genes</description> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
4 <macros> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
5 <import>scanpy_macros2.xml</import> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
6 </macros> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
7 <expand macro="requirements"/> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
8 <command detect_errors="exit_code"><![CDATA[ |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
9 ln -s '${input_obj_file}' input.h5 && |
9
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
10 |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
11 #if $copy_o.default: |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
12 #for $i, $os in enumerate($copy_o.obs_sources): |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
13 ln -s '${os}' obs_source_${i}.h5 && |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
14 #end for |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
15 #end if |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
16 |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
17 #if $copy_e.default: |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
18 #for $i, $es in enumerate($copy_e.embedding_sources): |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
19 ln -s '${es}' embedding_source_${i}.h5 && |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
20 #end for |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
21 #end if |
0
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
22 python $operations |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
23 ]]></command> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
24 <configfiles> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
25 <configfile name="operations"> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
26 import scanpy as sc |
9
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
27 import anndata |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
28 from numpy import all |
0
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
29 import logging |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
30 |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
31 adata = sc.read('input.h5') |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
32 |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
33 gene_name = '${gene_symbols_field}' |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
34 qc_vars = list() |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
35 |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
36 #for $i, $s in enumerate($modifications) |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
37 adata.obs['${s.to_obs}'] = adata.obs['${s.from_obs}'] |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
38 #end for |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
39 |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
40 gene_names = getattr(adata.var, gene_name) |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
41 |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
42 #for $i, $flag in enumerate($gene_flags) |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
43 k_cat = gene_names.str.startswith('${flag.startswith}') |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
44 if k_cat.sum() > 0: |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
45 adata.var['${flag.flag}'] = k_cat |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
46 qc_vars.append('${flag.flag}') |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
47 else: |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
48 logging.warning('No genes starting with {} found, skip calculating expression of {} genes'.format('${flag.startswith}', '${flag.flag}')) |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
49 #end for |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
50 |
9
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
51 #if $copy_o.default and len($copy_o.obs_keys) > 0: |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
52 #for $i, $obs_s in enumerate($copy_o.obs_sources): |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
53 ad_s = sc.read('obs_source_${i}.h5') |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
54 if adata.n_obs == ad_s.n_obs and all(adata.obs_names == ad_s.obs_names): |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
55 #for $j, $o_key in enumerate($copy_o.obs_keys): |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
56 keys_to_copy = (k for k in ad_s.obs.keys() if "${o_key.contains}" in k) |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
57 for k_to_copy in keys_to_copy: |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
58 adata.obs[[k_to_copy+"_${i}"]] = ad_s.obs[[k_to_copy]] |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
59 if k_to_copy in ad_s.uns.keys(): |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
60 adata.uns[k_to_copy+"_${i}"] = ad_s.uns[k_to_copy] |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
61 #end for |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
62 else: |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
63 logging.warning("Observation source ${i} AnnData file is not compatible to be merged to main AnnData file, different cell names.") |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
64 #end for |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
65 #end if |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
66 |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
67 |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
68 #if $copy_e.default and len($copy_e.embedding_keys) > 0: |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
69 #for $i, $obs_s in enumerate($copy_e.embedding_sources): |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
70 ad_s = sc.read('embedding_source_${i}.h5') |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
71 if adata.n_obs == ad_s.n_obs and all(adata.obs_names == ad_s.obs_names): |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
72 #for $j, $e_key in enumerate($copy_e.embedding_keys): |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
73 keys_to_copy = (k for k in ad_s.obsm.keys() if "${e_key.contains}" in k) |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
74 for k_to_copy in keys_to_copy: |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
75 adata.obsm[k_to_copy+"_${i}"] = ad_s.obsm[k_to_copy] |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
76 #end for |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
77 else: |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
78 logging.warning("Embedding source ${i} AnnData file is not compatible to be merged to main AnnData file, different cell names.") |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
79 #end for |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
80 #end if |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
81 |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
82 #if $sanitize_varm: |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
83 if hasattr(adata, 'raw') and hasattr(adata.raw, 'X') and hasattr(adata.raw, 'var'): |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
84 new_ad = anndata.AnnData(X=adata.raw.X, obs=adata.obs, var=adata.raw.var) |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
85 adata.raw = new_ad |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
86 #end if |
0
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
87 |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
88 if len(qc_vars) > 0: |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
89 pct_top = [${top_genes}] |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
90 sc.pp.calculate_qc_metrics(adata, qc_vars=qc_vars, percent_top=pct_top, inplace=True) |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
91 |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
92 if 'n_genes' not in adata.obs.columns: |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
93 sc.pp.filter_cells(adata, min_genes=0) |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
94 if 'n_counts' not in adata.obs.columns: |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
95 sc.pp.filter_cells(adata, min_counts=0) |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
96 if 'n_cells' not in adata.var.columns: |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
97 sc.pp.filter_genes(adata, min_cells=0) |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
98 if 'n_counts' not in adata.var.columns: |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
99 sc.pp.filter_genes(adata, min_counts=0) |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
100 |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
101 adata.write('output.h5', compression='gzip') |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
102 </configfile> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
103 </configfiles> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
104 |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
105 <inputs> |
2
ba18139e7400
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 400799f99ee36ad12b990b1ccabf4be16a26c003
ebi-gxa
parents:
0
diff
changeset
|
106 <param name="input_obj_file" argument="input-object-file" type="data" format="h5,h5ad" label="Input object in hdf5 AnnData format"/> |
ba18139e7400
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 400799f99ee36ad12b990b1ccabf4be16a26c003
ebi-gxa
parents:
0
diff
changeset
|
107 <expand macro="output_object_params_no_loom"/> |
0
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
108 <repeat name="modifications" title="Change field names in AnnData observations" min="0"> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
109 <param name="from_obs" type="text" label="Original name" help="Name in observations that you want to change"> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
110 <sanitizer> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
111 <valid initial="string.printable"/> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
112 </sanitizer> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
113 </param> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
114 <param name="to_obs" type="text" label="New name" help="New name in observations that you want to change"/> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
115 </repeat> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
116 <param name="gene_symbols_field" value='index' type="text" label="Gene symbols field in AnnData" help="Field inside var.params where the gene symbols are, normally 'index' or 'gene_symbols'"/> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
117 <repeat name="gene_flags" title="Flag genes that start with these names"> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
118 <param name="startswith" type="text" label="Starts with" help="Text that you expect the genes to be flagged to start with, such as 'MT-' for mito genes"/> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
119 <param name="flag" type="text" label="Var name" help="Name of the column in var.names where this boolean flag is stored, for example 'mito' for mitochondrial genes."/> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
120 </repeat> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
121 <param name="top_genes" label="Number of top genes" value='50' help="to calculate percentage of the flagged genes in that number of top genes. Used by sc.pp.calculate_qc_metrics (integer)." type="integer"/> |
9
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
122 <conditional name="copy_o"> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
123 <param name="default" type="boolean" checked="false" label="Copy observations (such as clusters)"/> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
124 <when value="true"> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
125 <repeat name="obs_keys" title="Keys from obs to copy" help="will copy all obs keys in the given AnnData object to the main AnnData object. Make sure to use AnnData objects that are compatible in terms of genes, cells and expression data. You can use this to copy clusters." min="1"> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
126 <param name="contains" type="text" label="Key contains" help="Keys to be copied need to contain the text set here."/> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
127 </repeat> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
128 <param name="obs_sources" type="data" label="AnnData objects with obs to copy" help="Extracts obs (such as clusters) from these AnnData objects and merges them into the main input. Make sure to use AnnData objects that are compatible in terms of genes, cells and expression data." format="h5,h5ad" multiple="true"/> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
129 <!-- <param name="check_o" type="boolean" label="Check compatibility" help="checks if the provided AnnData objects are compatible (same genes and cells) for merging." checked="true"/> --> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
130 </when> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
131 <when value="false"/> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
132 </conditional> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
133 <conditional name="copy_e"> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
134 <param name="default" type="boolean" checked="false" label="Copy embeddings (such as UMAP, tSNE)"/> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
135 <when value="true"> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
136 <repeat name="embedding_keys" title="Keys from embeddings to copy" help="will copy all embedding keys in the given AnnData object to the main AnnData object. Make sure to use AnnData objects that are compatible in terms of genes, cells and expression data. You can use this to copy tSNE, UMAP, etc." min="1"> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
137 <param name="contains" type="text" label="Key contains" help="Keys to be copied need to contain the text set here."/> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
138 </repeat> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
139 <param name="embedding_sources" type="data" label="AnnData objects with embeddings to copy" help="Extracts embeddings (tSNE, UMAP) from these AnnData objects and merges them into the main input. Make sure to use AnnData objects that are compatible in terms of genes, cells and expression data." format="h5,h5ad" multiple="true"/> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
140 <!-- <param name="check_e" type="boolean" label="Check compatibility" help="checks if the provided AnnData objects are compatible (same genes and cells) for merging." checked="true"/> --> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
141 </when> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
142 <when value="false"/> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
143 </conditional> |
b8eb50bd397c
"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit bcab272f6785d5967b1ec68acf5390ec3ace49fd"
ebi-gxa
parents:
4
diff
changeset
|
144 <param name="sanitize_varm" type="boolean" checked="false" label="Sanitise any null raw.varm objects if any" help="This might be relevant for interfacing with newer versions of AnnData, that might complain if .raw includes a varm null object."/> |
0
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
145 </inputs> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
146 |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
147 <outputs> |
2
ba18139e7400
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 400799f99ee36ad12b990b1ccabf4be16a26c003
ebi-gxa
parents:
0
diff
changeset
|
148 <expand macro="output_data_obj_no_loom" description="metadata changes on"/> |
0
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
149 </outputs> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
150 |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
151 <tests> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
152 <test> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
153 <param name="input_obj_file" value="find_cluster.h5"/> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
154 <param name="input_format" value="anndata"/> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
155 <param name="color_by" value="louvain"/> |
2
ba18139e7400
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 400799f99ee36ad12b990b1ccabf4be16a26c003
ebi-gxa
parents:
0
diff
changeset
|
156 <output name="output_h5ad" file="output.h5" ftype="h5" compare="sim_size"/> |
0
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
157 </test> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
158 </tests> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
159 |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
160 <help><![CDATA[ |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
161 ============================= |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
162 Operations on AnnData objects |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
163 ============================= |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
164 |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
165 Performs the following operations: |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
166 |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
167 * Change observation fields, mostly for downstreaming processes convenience. Multiple fields can be changed as one. |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
168 * Flag genes that start with a certain text: useful for flagging mitochondrial, spikes or other groups of genes. |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
169 * For the flags created, calculates qc metrics (pct_<flag>_counts). |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
170 * Calculates `n_genes`, `n_counts` for cells and `n_cells`, `n_counts` for genes. |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
171 * For top <N> genes specified, calculate qc metrics (pct_counts_in_top_<N>_genes). |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
172 |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
173 This functionality will probably be added in the future to a larger package. |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
174 ]]></help> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
175 <expand macro="citations"/> |
086d850271a2
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 39b0809db1e17c2a24930fe8fb8ceaf3ea454a7d
ebi-gxa
parents:
diff
changeset
|
176 </tool> |