Skip to content

Commit

Permalink
update snakemake
Browse files Browse the repository at this point in the history
  • Loading branch information
nargesr committed Sep 4, 2024
1 parent 0213923 commit cabff57
Show file tree
Hide file tree
Showing 5 changed files with 149 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Topyfic/utilsMakeModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def subset_data(data, keep, loc='var'):

def calculate_leiden_clustering(trains,
data,
n_top_genes=50,
n_top_genes=None,
resolution=1,
max_iter_harmony=10,
min_cell_participation=None,
Expand Down
2 changes: 1 addition & 1 deletion workflow/snakemake/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ train:
90, 91, 92, 93, 94, 95, 96, 97, 98, 99]

top_model:
n_top_genes: 50
n_top_genes: None
resolution: 1
max_iter_harmony: 10
min_cell_participation: None
Expand Down
167 changes: 145 additions & 22 deletions workflow/snakemake/resources/analysing.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion workflow/snakemake/workflow/rules/topModel.smk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ rule run_top_model:

make_topmodel.make_top_model(trains=[train],
adata_paths=config['count_adata'][params.name],
n_top_genes=int(config['top_model']['n_top_genes']),
n_top_genes=None if config['top_model']['n_top_genes'] == "None" else int(config['top_model']['n_top_genes']),
resolution=float(config['top_model']['resolution']),
max_iter_harmony=int(config['top_model']['max_iter_harmony']),
min_cell_participation=None if config['top_model']['min_cell_participation'] == "None" else float(
Expand Down
2 changes: 1 addition & 1 deletion workflow/snakemake/workflow/rules/train.smk
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ rule run_train_model:
make_train.make_train_model(name=params.name,
adata_path=config['count_adata'][params.name],
k=int(params.n_topic),
n_runs=config['train']['n_runs'],
n_runs=int(config['train']['n_runs']),
random_state=config['train']['random_states'],
train_output=f"{config['workdir']}/{params.name}/{params.n_topic}/train/")

0 comments on commit cabff57

Please sign in to comment.