diff --git a/rules/clustering.smk b/rules/clustering.smk index 469c0c8489d7376b50d04e43c19487f4094f6cc3..bb36875ba974650f5f86948148223706f7449c25 100644 --- a/rules/clustering.smk +++ b/rules/clustering.smk @@ -19,7 +19,6 @@ rule clustering_louvain: genes = config["clustering"]["genes_to_vis"], subclustering = config["clustering"]["subclustering"], clustering_resolution = config["clustering"]["clustering_resolution"], - #subclustering_resolution = config["clustering"]["subclustering_resolution"] script: "../scripts/clustering.py" @@ -41,7 +40,8 @@ rule specter: rule clustering_specter: input: - expand("file_dir/post_vis_data_{downsampling}.h5ad", downsampling=config["downsampling"]["downsampling_method"]) + expand("file_dir/post_vis_data_{downsampling}.h5ad", downsampling=config["downsampling"]["downsampling_method"]), + "file_dir/specter_clustering.csv" output: "file_dir/post_clustering_specter.h5ad", "file_dir/annotation_list_specter.npy", @@ -60,7 +60,6 @@ rule clustering_specter: genes = config["clustering"]["genes_to_vis"], subclustering = config["clustering"]["subclustering"], clustering_resolution = config["clustering"]["clustering_resolution"], - #subclustering_resolution = config["clustering"]["subclustering_resolution"] script: "../scripts/clustering_specter.py" diff --git a/scripts/differential_testing.R b/scripts/differential_testing.R index 593bdb8fa89b5d2a4fb9e7a605286fb164127c72..b047fa3f6df774d06e22237cdf905defb51c8335 100644 --- a/scripts/differential_testing.R +++ b/scripts/differential_testing.R @@ -63,17 +63,9 @@ result_ent[,FDR:=p.adjust(`Pr(>Chisq)`, 'fdr')] ent_de = result_ent[result_ent$FDR<as.numeric(snakemake@config[["differential_testing"]][["DE_threshold"]]),, drop=F] ent_de = ent_de[order(ent_de$FDR),] -print("hier kommt DE_threshold") -print(as.numeric(snakemake@config[["differential_testing"]][["DE_threshold"]])) -#ent_all = result_ent[order(result_ent$FDR),] - name_of_csv = paste("results/",name,"_diff_testing.csv", sep="") write.csv(ent_de, name_of_csv, row.names=FALSE) -#name_of_csv2 = paste("results/",name,"_diff_testing.csv", sep="") -#write.csv(ent_all,name_of_csv2, row.names=FALSE) - -print("done mit einem Durchlauf") } diff --git a/scripts/enrichment_vis.R b/scripts/enrichment_vis.R index 87d87b33f2449e9817e113cd40faef198c4618de..a643f2b17d888076a135d2f742656e2dae836756 100644 --- a/scripts/enrichment_vis.R +++ b/scripts/enrichment_vis.R @@ -1,8 +1,6 @@ library("dplyr") library("ggplot2") -print(snakemake@wildcards[["cluster"]]) - name <- snakemake@wildcards[["cluster"]] data <- read.csv(file = snakemake@input[[1]]) diff --git a/scripts/gene_set_analysis.py b/scripts/gene_set_analysis.py index 82d5f2bd9bf50080d5ea5bcb44d2c9c254244955..e1236c9f61b733e63a3b8540e3478ac18385f86e 100644 --- a/scripts/gene_set_analysis.py +++ b/scripts/gene_set_analysis.py @@ -1,11 +1,6 @@ import pandas as pd from gprofiler import GProfiler import gprofiler -#import matplotlib.pyplot as plt -#import os -print("EN_threshold") -print(float(snakemake.params.EN_threshold)) -print(snakemake.wildcards.cluster) file = pd.read_csv("results/"+ snakemake.wildcards.cluster +"_diff_testing.csv") @@ -19,16 +14,3 @@ enrich_results = enrichment.set_index('native').sort_values('p_value').iloc[:,[2 enrich_results.to_csv("results/"+snakemake.wildcards.cluster+"_enrich_results.csv", sep=",") -#from gprofiler_plotting import plot_enrich - - -#plt.figure(1) -#heatmap = sb.heatmap(cell_annotation_norm, cbar=False, annot=True) -#heatmap.autoscale() -#heatmap = heatmap.get_figure() -#heatmap.savefig("figures/marker_genes_32_4.png") - -#plt.figure(1) -#temp = plot_enrich(paneth_enrich_results) -#temp = temp.get_figure() -#temp.savefig("figures/paneth_enrich_graph.jpg")