# HG changeset patch # User iuc # Date 1716477598 0 # Node ID 8f8bef61fd0b02e008b9fc98619f4c47c8a0c521 # Parent af821711b356a23f98f72d1b6536a06b234df301 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/snapatac2 commit 1e34deee1e39c0c65e1e29a9d28becc7aaf23a4f diff -r af821711b356 -r 8f8bef61fd0b dimension_reduction_clustering.xml --- a/dimension_reduction_clustering.xml Thu May 16 13:15:57 2024 +0000 +++ b/dimension_reduction_clustering.xml Thu May 23 15:19:58 2024 +0000 @@ -18,127 +18,130 @@ @CMD_read_inputs@ #if $method.method == 'tl.spectral' - #if $method.features + #if $method.features with open('$method.features') as f: - features_mask = [x.lower().capitalize() == "True" for x in f.read().splitlines()] - #end if + features_mask = [x.lower().capitalize() == "True" for x in f.read().splitlines()] + #end if sa.tl.spectral( - adata, - n_comps = $method.n_comps, - #if $method.features - features = features_mask, - #end if - random_state = $method.random_state, - #if $method.sample_size - sample_size = $method.sample_size, - #end if - chunk_size = $method.chunk_size, - distance_metric = '$method.distance_metric', - weighted_by_sd = $method.weighted_by_sd, - inplace = True + adata, + n_comps = $method.n_comps, + #if $method.features + features = features_mask, + #end if + random_state = $method.random_state, + #if $method.sample_size + sample_size = $method.sample_size, + #end if + chunk_size = $method.chunk_size, + distance_metric = '$method.distance_metric', + weighted_by_sd = $method.weighted_by_sd, + inplace = True ) #else if $method.method == 'tl.umap' sa.tl.umap( - adata, - n_comps = $method.n_comps, - #if $method.use_dims != '' - #set $dims = ([x.strip() for x in str($method.use_dims).split(',')]) - use_dims=$dims, - #end if - use_rep = '$method.use_rep', - key_added = '$method.key_added', - random_state = $method.random_state, - inplace = True + adata, + n_comps = $method.n_comps, + #if $method.use_dims != '' + #set $dims = ([x.strip() for x in str($method.use_dims).split(',')]) + use_dims=$dims, + #end if + use_rep = '$method.use_rep', + key_added = '$method.key_added', + random_state = $method.random_state, + inplace = True ) #else if $method.method == 'pp.knn' sa.pp.knn( - adata, - n_neighbors = $method.n_neighbors, - #if $method.use_dims != '' - #set $dims = ([x.strip() for x in str($method.use_dims).split(',')]) - use_dims=$dims, - #end if - use_rep = '$method.use_rep', - method = '$method.algorithm', - inplace = True, - random_state = $method.random_state + adata, + n_neighbors = $method.n_neighbors, + #if $method.use_dims != '' + #set $dims = ([x.strip() for x in str($method.use_dims).split(',')]) + use_dims=$dims, + #end if + use_rep = '$method.use_rep', + method = '$method.algorithm', + inplace = True, + random_state = $method.random_state ) #else if $method.method == 'tl.dbscan' sa.tl.dbscan( - adata, - eps = $method.eps, - min_samples = $method.min_samples, - leaf_size = $method.leaf_size, - use_rep = '$method.use_rep', - key_added = '$method.key_added' + adata, + eps = $method.eps, + min_samples = $method.min_samples, + leaf_size = $method.leaf_size, + use_rep = '$method.use_rep', + key_added = '$method.key_added' ) #else if $method.method == 'tl.hdbscan' sa.tl.hdbscan( - adata, - min_cluster_size = $method.min_cluster_size, - #if $method.min_samples - min_samples = $method.min_samples, - #end if - cluster_selection_epsilon = $method.cluster_selection_epsilon, - alpha = $method.alpha, - cluster_selection_method = '$method.cluster_selection_method', - random_state = $method.random_state, - use_rep = '$method.use_rep', - key_added = '$method.key_added' + adata, + min_cluster_size = $method.min_cluster_size, + #if $method.min_samples + min_samples = $method.min_samples, + #end if + cluster_selection_epsilon = $method.cluster_selection_epsilon, + alpha = $method.alpha, + cluster_selection_method = '$method.cluster_selection_method', + random_state = $method.random_state, + use_rep = '$method.use_rep', + key_added = '$method.key_added' ) #else if $method.method == 'tl.leiden' sa.tl.leiden( - adata, - resolution = $method.resolution, - objective_function = '$method.objective_function', - min_cluster_size = $method.min_cluster_size, - n_iterations = $method.n_iterations, - random_state = $method.random_state, - key_added = '$method.key_added', - weighted = $method.weighted, - inplace = True + adata, + resolution = $method.resolution, + objective_function = '$method.objective_function', + #if $method.objective_function == 'RBConfiguration' + use_leidenalg = True, + #end if + min_cluster_size = $method.min_cluster_size, + n_iterations = $method.n_iterations, + random_state = $method.random_state, + key_added = '$method.key_added', + weighted = $method.weighted, + inplace = True ) #else if $method.method == 'tl.kmeans' sa.tl.kmeans( - adata, - n_clusters = $method.n_clusters, - n_iterations = $method.n_iterations, - random_state = $method.random_state, - use_rep = '$method.use_rep', - key_added = '$method.key_added' + adata, + n_clusters = $method.n_clusters, + n_iterations = $method.n_iterations, + random_state = $method.random_state, + use_rep = '$method.use_rep', + key_added = '$method.key_added' ) #else if $method.method == 'tl.aggregate_X' sa.tl.aggregate_X( - adata, - #if $method.groupby != '' - groupby = '$method.groupby', - #end if - normalize = '$method.normalize' + adata, + #if $method.groupby != '' + groupby = '$method.groupby', + #end if + normalize = '$method.normalize' ) #else if $method.method == 'tl.aggregate_cells' sa.tl.aggregate_cells( - adata, - use_rep = '$method.use_rep', - #if $method.target_num_cells - target_num_cells = $method.target_num_cells, - #end if - min_cluster_size = $method.min_cluster_size, - random_state = $method.random_state, - key_added = '$method.key_added', - inplace = True + adata, + use_rep = '$method.use_rep', + #if $method.target_num_cells + target_num_cells = $method.target_num_cells, + #end if + min_cluster_size = $method.min_cluster_size, + random_state = $method.random_state, + key_added = '$method.key_added', + inplace = True ) #end if @CMD_anndata_write_outputs@ - ]]> + ]]> @@ -162,7 +165,7 @@ - + @@ -195,7 +198,7 @@ - + @@ -267,7 +270,7 @@ - + @@ -287,13 +290,13 @@ - + - + @@ -311,13 +314,13 @@ - + - + @@ -337,13 +340,13 @@ - + - + @@ -367,13 +370,43 @@ - + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +
- + @@ -391,13 +424,13 @@
- + - + @@ -417,13 +450,13 @@ - + - + @@ -445,13 +478,13 @@ - + - +
@@ -463,13 +496,13 @@ - + - + @@ -489,7 +522,7 @@ - + - 2.5.3 - 0 + 2.5.3 + 1 23.0 snapatac2 @@ -12,6 +12,9 @@ hdbscan harmonypy scanorama + macs3 + multiprocess + leidenalg @@ -23,8 +26,8 @@ '$hidden_output' && python '$script_file' >> '$hidden_output' && - touch 'anndata_info.txt' && - cat 'anndata_info.txt' @CMD_prettify_stdout@ + touch 'anndata_info.txt' && + cat 'anndata_info.txt' @CMD_prettify_stdout@ ]]> @@ -56,7 +59,7 @@ - + @@ -66,11 +69,11 @@ - + - + - - + + - + + + + + - - - - - - - - - - + + + + + + - - + + -s + @@ -126,12 +129,12 @@ - - + + - + @@ -147,11 +150,11 @@ - + - +