annotate anndata_operations.xml @ 27:7ebc22f77d86 draft

planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
author ebi-gxa
date Fri, 14 Apr 2023 13:12:01 +0000
parents 825dfd66e3fb
children a0274bc43b7e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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"?>
27
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
2 <tool id="anndata_ops" name="AnnData Operations" version="@TOOL_VERSION@+galaxy91" 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
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
11 #if $copy_r.default:
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
12 ln -s '${copy_r.r_source}' r_source.h5 &&
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
13 #end if
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
14
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
15 #if $copy_x.default:
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
16 #for $i, $xs in enumerate($copy_x.xlayers):
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
17 ln -s '${xs.x_source}' x_source_${i}.h5 &&
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
18 #end for
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
19 #end if
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
20
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
21 #if $copy_l.default:
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
22 #for $i, $ls in enumerate($copy_l.layer_sources):
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
23 ln -s '${ls}' layer_source_${i}.h5 &&
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
24 #end for
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
25 #end if
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
26
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 #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
28 #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
29 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
30 #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
31 #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
32
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
33 #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
34 #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
35 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
36 #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
37 #end if
10
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
38
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
39 #if $copy_u.default:
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
40 #for $i, $us in enumerate($copy_u.uns_sources):
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
41 ln -s '${us}' uns_source_${i}.h5 &&
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
42 #end for
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
43 #end if
27
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
44
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
45 #if $add_cell_metadata.default:
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
46 ln -s ${add_cell_metadata.file} cell_metadata.tsv &&
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
47 #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
48 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
49 ]]></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
50 <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
51 <configfile name="operations">
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
52 import gc
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
53 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
54 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
55 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
56 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
57
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
58 def make_column_values_unique(df, field, new_field=None, suffix = '-duplicate-'):
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
59 if new_field is None:
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
60 new_field = f"{field}_u"
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
61 appendents = (suffix + df.groupby(field).cumcount().astype(str).replace('0','')).replace(suffix, '')
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
62 df[new_field] = df[field].astype(str) + appendents.astype(str)
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
63 return df
27
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
64
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
65 adata = sc.read('input.h5')
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
66
27
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
67 #if $add_cell_metadata.default:
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
68 import pandas as pd
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
69
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
70 def add_cell_metadata(ad, metadata_file="cell_metadata.tsv", drop_duplicates=True):
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
71 metadata_df = pd.read_csv(metadata_file, sep="\t", index_col=0)
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
72 # we avoid renames in the original object or outright drop the column in the metadata
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
73 for col in ad.obs.columns:
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
74 if col in metadata_df.columns:
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
75 print(f"Renaming {col} to {col}_x")
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
76 if drop_duplicates:
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
77 metadata_df = metadata_df.drop(col, axis=1)
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
78 else:
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
79 metadata_df.rename(columns={col: col + "_x"}, inplace=True)
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
80 # merge metadata into ad.obs column by column, changing columns to category dtype if they become object dtype on merge
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
81 merged_obs = ad.obs.merge(
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
82 metadata_df, left_index=True, right_index=True, how="left"
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
83 )
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
84 for o_col in metadata_df.columns:
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
85 col = o_col
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
86 # lets consider cases where columns where renamed during merge
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
87 if o_col + "_x" in merged_obs.columns:
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
88 col = o_col + "_x"
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
89 if o_col + "_y" in merged_obs.columns:
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
90 col = o_col + "_y"
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
91 if col in merged_obs.columns:
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
92 if merged_obs[col].dtype == object:
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
93 prev_dtype = metadata_df[o_col].dtype
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
94 if prev_dtype == str or prev_dtype == object:
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
95 prev_dtype = "category"
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
96 print(f"Changing {col} from {merged_obs[col].dtype} to {prev_dtype}")
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
97 merged_obs[col] = merged_obs[col].astype(prev_dtype)
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
98 return merged_obs
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
99
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
100 adata.obs = add_cell_metadata(adata)
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
101 #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
102
11
f0a29f4b9be9 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit e2ec0706fd62528e5198e3c050d91ab0ee6cd4da"
ebi-gxa
parents: 10
diff changeset
103 #if $copy_adata_to_raw:
f0a29f4b9be9 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit e2ec0706fd62528e5198e3c050d91ab0ee6cd4da"
ebi-gxa
parents: 10
diff changeset
104 adata.raw = adata
f0a29f4b9be9 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit e2ec0706fd62528e5198e3c050d91ab0ee6cd4da"
ebi-gxa
parents: 10
diff changeset
105 #end if
f0a29f4b9be9 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit e2ec0706fd62528e5198e3c050d91ab0ee6cd4da"
ebi-gxa
parents: 10
diff changeset
106
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
107 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
108 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
109
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 #for $i, $s in enumerate($modifications)
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
111 #if $s.make_unique:
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
112 adata.obs = make_column_values_unique(adata.obs, field='${s.from_obs}', new_field='${s.to_obs}', suffix = "_d")
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
113 #else
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
114 adata.obs['${s.to_obs}'] = adata.obs['${s.from_obs}']
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
115 #end if
10
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
116 #if not $s.keep_original:
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
117 del adata.obs['${s.from_obs}']
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
118 #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
119 #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
120
22
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
121 #for $i, $s in enumerate($var_modifications)
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
122 #if $s.make_unique:
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
123 adata.var = make_column_values_unique(adata.var, field='${s.from_var}', new_field='${s.to_var}', suffix = "_d")
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
124 #else
22
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
125 adata.var['${s.to_var}'] = adata.var['${s.from_var}']
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
126 #end if
22
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
127 #if not $s.keep_original:
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
128 del adata.var['${s.from_var}']
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
129 #end if
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
130 #end for
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
131
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
132 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
133
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
134 #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
135 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
136 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
137 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
138 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
139 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
140 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
141 #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
142
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
143 #if $field_unique:
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
144 field_unique = '${field_unique}'
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
145 made_unique = 0
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
146 if field_unique in adata.var_keys():
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
147 adata.var = make_column_values_unique(adata.var, field_unique, suffix = "_d")
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
148 made_unique += 1
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
149 if field_unique in adata.obs_keys():
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
150 adata.obs = make_column_values_unique(adata.obs, field_unique, suffix = "_d")
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
151 made_unique += 1
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
152
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
153 if made_unique == 0:
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
154 logging.error("Specified field to be made unique is not in var or obs.")
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
155 sys.exit(1)
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
156 #end if
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
157
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
158 #if $copy_r.default and $copy_r.r_source:
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
159 ad_s = sc.read('r_source.h5')
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
160 if not all(adata.obs.index.isin(ad_s.obs.index)):
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
161 logging.error("Specified object for .raw must contain all .obs from main object.")
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
162 sys.exit(1)
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
163 else:
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
164 adata.raw = ad_s[adata.obs.index]
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
165 del ad_s
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
166 gc.collect()
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
167 #end if
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
168
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
169 #if $copy_x.default and len($copy_x.xlayers) > 0:
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
170 #for $i, $x_s in enumerate($copy_x.xlayers):
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
171 ad_s = sc.read('x_source_${i}.h5')
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
172 if adata.n_obs == ad_s.n_obs and all(adata.obs_names == ad_s.obs_names):
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
173 #set xs=$copy_x.xlayers[$i]
22
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
174 if "${xs.dest}" == '':
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
175 logging.error("%sth destination layer for %sth X source not specified" % ("${i}", "${i}"))
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
176 sys.exit(1)
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
177 adata.layers["${xs.dest}"] = ad_s.X
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
178 else:
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
179 logging.error("X source ${i} AnnData file is not compatible to be merged to main AnnData file, different cell names.")
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
180 sys.exit(1)
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
181 del ad_s
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
182 gc.collect()
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
183 #end for
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
184 #end if
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
185
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
186 #if $copy_l.default and len($copy_l.layers) > 0:
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
187 #for $i, $layer_s in enumerate($copy_l.layer_sources):
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
188 ad_s = sc.read('layer_source_${i}.h5')
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
189 if adata.n_obs == ad_s.n_obs and all(adata.obs_names == ad_s.obs_names):
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
190 #for $j, $l_key in enumerate($copy_l.layers):
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
191 layers_to_copy = (k for k in ad_s.layers.keys() if "${l_key.contains}" in k)
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
192 for l_to_copy in layers_to_copy:
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
193 suffix=''
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
194 if l_to_copy in adata.layers:
22
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
195 suffix = "_${i}"
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
196 adata.layers[l_to_copy+suffix] = ad_s.layers[l_to_copy]
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
197 #end for
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
198 else:
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
199 logging.error("Layer source ${i} AnnData file is not compatible to be merged to main AnnData file, different cell names.")
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
200 sys.exit(1)
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
201 del ad_s
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
202 gc.collect()
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
203 #end for
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
204 #end if
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
205
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
206 #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
207 #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
208 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
209 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
210 #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
211 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
212 for k_to_copy in keys_to_copy:
15
c09d61ede252 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 044580b6bfcd36a5c1cb9e70b40045eb8f71b7e2-dirty"
ebi-gxa
parents: 14
diff changeset
213 suffix=''
c09d61ede252 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 044580b6bfcd36a5c1cb9e70b40045eb8f71b7e2-dirty"
ebi-gxa
parents: 14
diff changeset
214 if k_to_copy in adata.obs:
22
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
215 suffix = "_${i}"
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
216
15
c09d61ede252 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 044580b6bfcd36a5c1cb9e70b40045eb8f71b7e2-dirty"
ebi-gxa
parents: 14
diff changeset
217 adata.obs[[k_to_copy+suffix]] = ad_s.obs[[k_to_copy]]
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
218 if k_to_copy in ad_s.uns.keys():
15
c09d61ede252 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 044580b6bfcd36a5c1cb9e70b40045eb8f71b7e2-dirty"
ebi-gxa
parents: 14
diff changeset
219 adata.uns[k_to_copy+suffix] = ad_s.uns[k_to_copy]
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
220 #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
221 else:
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
222 logging.error("Observation source ${i} AnnData file is not compatible to be merged to main AnnData file, different cell names.")
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
223 sys.exit(1)
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
224 del ad_s
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
225 gc.collect()
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
226 #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
227 #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
228
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
229
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
230 #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
231 #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
232 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
233 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
234 #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
235 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
236 for k_to_copy in keys_to_copy:
15
c09d61ede252 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 044580b6bfcd36a5c1cb9e70b40045eb8f71b7e2-dirty"
ebi-gxa
parents: 14
diff changeset
237 suffix = ''
c09d61ede252 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 044580b6bfcd36a5c1cb9e70b40045eb8f71b7e2-dirty"
ebi-gxa
parents: 14
diff changeset
238 if k_to_copy in adata.obsm:
c09d61ede252 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 044580b6bfcd36a5c1cb9e70b40045eb8f71b7e2-dirty"
ebi-gxa
parents: 14
diff changeset
239 suffix = "_${i}"
c09d61ede252 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 044580b6bfcd36a5c1cb9e70b40045eb8f71b7e2-dirty"
ebi-gxa
parents: 14
diff changeset
240 adata.obsm[k_to_copy+suffix] = ad_s.obsm[k_to_copy]
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
241 #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
242 else:
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
243 logging.error("Embedding source ${i} AnnData file is not compatible to be merged to main AnnData file, different cell names.")
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
244 sys.exit(1)
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
245 del ad_s
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
246 gc.collect()
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
247 #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
248 #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
249
10
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
250 #if $copy_u.default and len($copy_u.uns_keys) > 0:
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
251 #for $i, $uns_s in enumerate($copy_u.uns_sources):
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
252 ad_s = sc.read('uns_source_${i}.h5')
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
253 if adata.n_obs == ad_s.n_obs and all(adata.obs_names == ad_s.obs_names):
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
254 #for $j, $u_key in enumerate($copy_u.uns_keys):
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
255 keys_to_copy = (k for k in ad_s.uns.keys() if "${u_key.contains}" in k)
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
256 for k_to_copy in keys_to_copy:
15
c09d61ede252 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 044580b6bfcd36a5c1cb9e70b40045eb8f71b7e2-dirty"
ebi-gxa
parents: 14
diff changeset
257 suffix=''
c09d61ede252 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 044580b6bfcd36a5c1cb9e70b40045eb8f71b7e2-dirty"
ebi-gxa
parents: 14
diff changeset
258 if k_to_copy in adata.uns:
c09d61ede252 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 044580b6bfcd36a5c1cb9e70b40045eb8f71b7e2-dirty"
ebi-gxa
parents: 14
diff changeset
259 suffix="_${i}"
c09d61ede252 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 044580b6bfcd36a5c1cb9e70b40045eb8f71b7e2-dirty"
ebi-gxa
parents: 14
diff changeset
260 adata.uns[k_to_copy+suffix] = ad_s.uns[k_to_copy]
10
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
261 #end for
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
262 else:
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
263 logging.error("Uns source ${i} AnnData file is not compatible to be merged to main AnnData file, different cell names.")
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
264 sys.exit(1)
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
265 del ad_s
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
266 gc.collect()
10
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
267 #end for
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
268 #end if
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
269
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
270 #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
271 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
272 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
273 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
274 #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
275
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
276 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
277 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
278 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
279
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
280 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
281 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
282 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
283 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
284 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
285 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
286 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
287 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
288
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
289 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
290 </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
291 </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
292
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
293 <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
294 <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
295 <expand macro="output_object_params_no_loom"/>
27
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
296 <conditional name="add_cell_metadata">
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
297 <param name="default" type="boolean" checked="false" label="Merge additional cell metadata"/>
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
298 <when value="true">
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
299 <param name="file" type="data" label="Cell metadata with headers" help="A tabular file with headers, where the first column contains cell barcodes. Will be merged via a left join, so not all cells in the obs need to be in the metadata. Currently duplicated column headers will be ignored and the originals in the AnnData will be kept." format="tsv,tabular"/>
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
300 </when>
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
301 <when value="false"/>
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
302 </conditional>
11
f0a29f4b9be9 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit e2ec0706fd62528e5198e3c050d91ab0ee6cd4da"
ebi-gxa
parents: 10
diff changeset
303 <param name="copy_adata_to_raw" type="boolean" label="Copy AnnData to .raw" help="If activated, it will do 'adata.raw = adata'" checked="false"/>
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
304 <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
305 <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
306 <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
307 <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
308 </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
309 </param>
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
310 <param name="to_obs" type="text" label="New name" help="New name in observations that you want to change to"/>
10
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
311 <param name="keep_original" type="boolean" label="Keep original" help="If activated, it will also keep the original column" checked="false"/>
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
312 <param name="make_unique" type="boolean" label="Make values in the field unique" help="If activated, it will make the values in the column unique by appending '_dnum' on each repeated value." checked="false"/>
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
313 </repeat>
22
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
314 <repeat name="var_modifications" title="Change field names in AnnData var" min="0">
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
315 <param name="from_var" type="text" label="Original name" help="Name in var that you want to change">
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
316 <sanitizer>
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
317 <valid initial="string.printable"/>
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
318 </sanitizer>
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
319 </param>
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
320 <param name="to_var" type="text" label="New name" help="New name in var that you want to change"/>
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
321 <param name="keep_original" type="boolean" label="Keep original" help="If activated, it will also keep the original column" checked="false"/>
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
322 <param name="make_unique" type="boolean" label="Make values in the field unique" help="If activated, it will make the values in the column unique by appending '_dnum' on each repeated value." checked="false"/>
22
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
323 </repeat>
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
324 <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
325 <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
326 <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
327 <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
328 </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
329 <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"/>
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
330 <param name="field_unique" type="text" optional="true" label="Field in var or obs to make unique" help="Field inside var or obs to be made unique by appending a suffix (useful for gene symbols in var). A new field will be added with the '_u' suffix. It happens after all the above operations."/>
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
331 <conditional name="copy_r">
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
332 <param name="default" type="boolean" checked="false" label="Copy adata.X to adata.raw"/>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
333 <when value="true">
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
334 <param name="r_source" type="data" label="AnnData object .X with to copy to .raw" help="Copies adata (subset to matching obs) from this AnnData object into the main input as .raw. Make sure to use an AnnData object containing all .obs in the main input." format="h5,h5ad" />
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
335 </when>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
336 <when value="false"/>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
337 </conditional>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
338 <conditional name="copy_x">
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
339 <param name="default" type="boolean" checked="false" label="Copy .X to layers"/>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
340 <when value="true">
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
341 <repeat name="xlayers" title="Source objects for .X and paired destination layers in the main AnnData object" help="make sure to use AnnData objects that are compatible in terms of genes, cells and expression data." min="1">
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
342 <param name="x_source" type="data" label="AnnData objects with .X to copy" help="Extracts .X from these AnnData objects and merges them into the main input as layers. Make sure to use AnnData objects that are compatible in terms of genes, cells and expression data." format="h5,h5ad" />
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
343 <param name="dest" type="text" label="Destination layer" />
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
344 </repeat>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
345 </when>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
346 <when value="false"/>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
347 </conditional>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
348 <conditional name="copy_l">
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
349 <param name="default" type="boolean" checked="false" label="Copy layers"/>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
350 <when value="true">
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
351 <repeat name="layers" title="Layers from which matrices will be copied" help="will copy all layers 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." min="1">
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
352 <param name="contains" type="text" label="Key contains" help="Keys to be copied need to contain the text set here."/>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
353 </repeat>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
354 <param name="layer_sources" type="data" label="AnnData objects with layers to copy" help="Extracts layers 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"/>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
355 </when>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
356 <when value="false"/>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
357 </conditional>
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
358 <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
359 <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
360 <when value="true">
10
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
361 <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. Uns elements with the same name will be also transferred." min="1">
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
362 <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
363 </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
364 <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
365 <!-- <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
366 </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
367 <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
368 </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
369 <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
370 <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
371 <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
372 <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
373 <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
374 </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
375 <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
376 <!-- <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
377 </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
378 <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
379 </conditional>
10
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
380 <conditional name="copy_u">
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
381 <param name="default" type="boolean" checked="false" label="Copy uns"/>
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
382 <when value="true">
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
383 <repeat name="uns_keys" title="Keys from uns to copy" help="will copy all uns 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 rank_genes_groups for instance." min="1">
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
384 <param name="contains" type="text" label="Key contains" help="Keys to be copied need to contain the text set here."/>
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
385 </repeat>
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
386 <param name="uns_sources" type="data" label="AnnData objects with uns to copy" help="Extracts uns (such as ranked_genes_groups) 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"/>
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
387 </when>
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
388 </conditional>
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
389 <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
390 </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
391
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
392 <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
393 <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
394 </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
395
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
396 <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
397 <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
398 <param name="input_obj_file" value="find_cluster.h5"/>
12
f1a1cf7c0153 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 62f47287c7e8449c59a1f1f454852ddc669b1b1e-dirty"
ebi-gxa
parents: 11
diff changeset
399 <output name="output_h5ad" file="anndata_ops.h5" ftype="h5ad" 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
400 </test>
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
401 <test>
22
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
402 <param name="input_obj_file" value="anndata_ops.h5"/>
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
403 <param name="from_var" value = "gene_symbols" />
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
404 <param name="to_var" value = "hello_all" />
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
405 <output name="output_h5ad" ftype="h5ad">
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
406 <assert_contents>
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
407 <has_h5_keys keys="var/hello_all" />
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
408 </assert_contents>
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
409 </output>
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
410 </test>
fe75d2414dc0 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 8853a954bd9c343b3458479582f1f21c3981fef0-dirty"
ebi-gxa
parents: 19
diff changeset
411 <test>
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
412 <param name="input_obj_file" value="anndata_ops.h5"/>
27
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
413 <conditional name="add_cell_metadata">
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
414 <param name="default" value="true"/>
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
415 <param name="file" value="test_incomplete_metadata.tsv"/>
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
416 </conditional>
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
417 <output name="output_h5ad" ftype="h5ad">
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
418 <assert_contents>
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
419 <has_h5_keys keys="obs/cell_type"/>
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
420 </assert_contents>
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
421 </output>
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
422 </test>
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
423 <test>
7ebc22f77d86 planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db372e91d658f2c139ff282ffb493ea56f581f8-dirty
ebi-gxa
parents: 26
diff changeset
424 <param name="input_obj_file" value="anndata_ops.h5"/>
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
425 <repeat name="var_modifications" >
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
426 <param name="from_var" value = "gene_symbols" />
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
427 <param name="to_var" value = "gene_symbols_unique" />
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
428 <param name="make_unique" value = "True" />
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
429 </repeat>
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
430 <output name="output_h5ad" ftype="h5ad">
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
431 <assert_contents>
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
432 <has_h5_keys keys="var/gene_symbols_unique" />
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
433 </assert_contents>
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
434 </output>
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
435 </test>
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
436 <test>
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
437 <param name="input_obj_file" value="anndata_ops.h5"/>
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
438 <param name="field_unique" value = "gene_symbols" />
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
439 <output name="output_h5ad" ftype="h5ad">
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
440 <assert_contents>
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
441 <has_h5_keys keys="var/gene_symbols_u" />
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
442 </assert_contents>
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
443 </output>
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
444 </test>
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
445 <test>
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
446 <param name="input_obj_file" value="find_cluster.h5"/>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
447 <conditional name="copy_r">
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
448 <param name="default" value="true"/>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
449 <param name="r_source" value="read_10x.h5"/>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
450 </conditional>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
451 <output name="output_h5ad" file="anndata_ops_raw.h5" ftype="h5ad" compare="sim_size">
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
452 <assert_contents>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
453 <has_h5_keys keys="raw/X" />
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
454 </assert_contents>
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
455 </output>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
456 </test>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
457 <test>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
458 <param name="input_obj_file" value="normalise_data.h5"/>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
459 <conditional name="copy_x">
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
460 <param name="default" value="true"/>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
461 <repeat name="xlayers">
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
462 <param name="x_source" value='filter_genes.h5'/>
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
463 <param name="dest" value='filtered'/>
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
464 </repeat>
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
465 </conditional>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
466 <output name="output_h5ad" file="anndata_ops_xlayer.h5" ftype="h5ad" compare="sim_size">
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
467 <assert_contents>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
468 <has_h5_keys keys="layers/filtered" />
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
469 </assert_contents>
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
470 </output>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
471 </test>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
472 <test>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
473 <param name="input_obj_file" value="find_cluster.h5"/>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
474 <conditional name="copy_l">
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
475 <param name="default" value="true"/>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
476 <repeat name="layers">
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
477 <param name="contains" value='filtered'/>
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
478 </repeat>
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
479 <param name="layer_sources" value='anndata_ops_xlayer.h5'/>
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
480 </conditional>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
481 <output name="output_h5ad" file="anndata_ops_layer.h5" ftype="h5ad" compare="sim_size">
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
482 <assert_contents>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
483 <has_h5_keys keys="layers/filtered" />
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
484 </assert_contents>
19
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
485 </output>
53a251c6d991 "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit ebe77c8718ec65277f4dc0d71fa5f4c5677df62d-dirty"
ebi-gxa
parents: 18
diff changeset
486 </test>
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
487 </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
488
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
489 <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
490 =============================
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
491 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
492 =============================
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
493
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
494 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
495
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
496 * Change observation/var fields, mostly for downstreaming processes convenience. Multiple fields can be changed at once.
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
497 * 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
498 * 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
499 * 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
500 * For top <N> genes specified, calculate qc metrics (pct_counts_in_top_<N>_genes).
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
501 * Make a specified column of var or obs unique (normally useful for gene symbols).
10
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
502 * Copy from a set of compatible AnnData objects (same cells and genes):
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
503 * Observations, such as clustering results.
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
504 * Embeddings, such as tSNE or UMAPs.
54f1212d26ac "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6806d147bfbb52c61d2a15281b69144fad87250a"
ebi-gxa
parents: 9
diff changeset
505 * Unstructure annotations, like gene markers.
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
506
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
507 This functionality will probably be added in the future to a larger package.
14
a4ad76e3dc4a "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db9e8cecb8d373874318e53ec2d4d7a64dd1b24-dirty"
ebi-gxa
parents: 12
diff changeset
508
a4ad76e3dc4a "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db9e8cecb8d373874318e53ec2d4d7a64dd1b24-dirty"
ebi-gxa
parents: 12
diff changeset
509 History
a4ad76e3dc4a "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db9e8cecb8d373874318e53ec2d4d7a64dd1b24-dirty"
ebi-gxa
parents: 12
diff changeset
510 -------
26
825dfd66e3fb planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 6c9d530aa653101e9e21804393ec11f38cddf027-dirty
ebi-gxa
parents: 23
diff changeset
511 1.8.1+galaxy10: Adds field to be made unique in obs or var.
14
a4ad76e3dc4a "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db9e8cecb8d373874318e53ec2d4d7a64dd1b24-dirty"
ebi-gxa
parents: 12
diff changeset
512
a4ad76e3dc4a "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db9e8cecb8d373874318e53ec2d4d7a64dd1b24-dirty"
ebi-gxa
parents: 12
diff changeset
513 1.6.0+galaxy0: Moves to Scanpy Scripts 0.3.0 (Scanpy 1.6.0), versioning switched to track Scanpy as other tools.
a4ad76e3dc4a "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db9e8cecb8d373874318e53ec2d4d7a64dd1b24-dirty"
ebi-gxa
parents: 12
diff changeset
514
a4ad76e3dc4a "planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 2db9e8cecb8d373874318e53ec2d4d7a64dd1b24-dirty"
ebi-gxa
parents: 12
diff changeset
515 0.0.3+galaxy0: Adds ability to merge AnnData objects (Scanpy 1.4.3).
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
516 ]]></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
517 <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
518 </tool>