Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"sampleName": "IGVF_b01_LeftCortex",
"celltype": "brain",
"organism": "mouse",
"technology": "10x",
"cNMF_gene_selection": ["top2000VariableGenes", "all_genes"],
"Perturb-seq": "False",
"num_Genes_per_MAST_runGroup": 20,
Expand Down
9 changes: 5 additions & 4 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ include: "rules/program_prioritization.smk"
if config["Perturb-seq"] == "True":
include: "rules/cNMF_Perturb-seq_analysis.smk"

# Need to add back for the overall pipeline (250113)
if not os.path.isfile(config["fimo_formatted"]):
include: "rules/match_motifs.smk"

Expand All @@ -47,7 +48,7 @@ def get_output_files(wildcards):
Var_k_summary_txt = expand(os.path.join(config["analysisDir"],"{folder}/{sample}/K{k}/threshold_{threshold}/summary.varianceExplained.df.txt"), folder = config["cNMF_gene_selection"], sample=config["sampleName"], k=config["k"], threshold=[n.replace(".","_") for n in config["thresholds"]]),

## motif enrichment preparation
fimo_result = expand(os.path.join(config["analysisDir"], "{folder}/{sample}/fimo/fimo_out/fimo.txt"), folder = config["cNMF_gene_selection"], sample=config["sampleName"]),
fimo_result = expand(os.path.join(config["analysisDir"], "{folder}/{sample}/fimo/fimo_out/fimo.tsv"), folder = config["cNMF_gene_selection"], sample=config["sampleName"]),

## main results
cNMF_Results = expand(os.path.join(config["analysisDir"], "{folder}/{sample}/K{k}/threshold_{threshold}/cNMF_results.k_{k}.dt_{threshold}.RData"), folder = config["cNMF_gene_selection"], sample=config["sampleName"], k=config["k"], threshold=[n.replace(".","_") for n in config["thresholds"]]),
Expand All @@ -66,7 +67,7 @@ def get_output_files(wildcards):
gsea_clusterProfiler_plot = expand(os.path.join(config["figDir"], "{folder}/{sample}/K{k}/{sample}_K{k}_dt_{threshold}_top10EnrichedPathways_GeneRankingType{ranking_type}_EnrichmentType{GSEA_type}.pdf"), folder = config["cNMF_gene_selection"], sample=config["sampleName"], k=config["k"], threshold=[n.replace(".","_") for n in config["thresholds"]], ranking_type = ["zscore", "raw", "median_spectra", "median_spectra_zscore"], GSEA_type = ["GOEnrichment", "PosGenesGOEnrichment", "ByWeightGSEA", "GSEA"]),

## Program Summary Table
ProgramSummary = expand(os.path.join(config["analysisDir"], "{folder}/{sample}/K{k}/threshold_{threshold}/{sample}_ProgramSummary_k_{k}.dt_{threshold}.txt"), folder = config["cNMF_gene_selection"], sample=config["sampleName"], k=config["k"], threshold=[n.replace(".","_") for n in config["thresholds"]]),
ProgramSummary = expand(os.path.join(config["analysisDir"], "{folder}/{sample}/K{k}/threshold_{threshold}/{sample}_ProgramSummary_k_{k}.dt_{threshold}.xlsx"), folder = config["cNMF_gene_selection"], sample=config["sampleName"], k=config["k"], threshold=[n.replace(".","_") for n in config["thresholds"]]),
ComprehensiveProgramSummary = expand(os.path.join(config["analysisDir"], "{folder}/{sample}/K{k}/threshold_{threshold}/{sample}_k_{k}.dt_{threshold}_ComprehensiveProgramSummary.xlsx"), folder = config["cNMF_gene_selection"], sample=config["sampleName"], k=config["k"], threshold=[n.replace(".","_") for n in config["thresholds"]]),

## PoPS
Expand Down Expand Up @@ -109,8 +110,8 @@ def get_output_files(wildcards):
output_files.extend(list(clusterProfiler_result)) ## rule: clusterProfiler_GSEA, across K plots
output_files.extend(list(GSEA_plots))
output_files.extend(list(TFMotifEnrichment_plots))
output_files.extend(list(model_yaml))
output_files.extend(list(cellxgene_h5ad))
# output_files.extend(list(model_yaml))
# output_files.extend(list(cellxgene_h5ad))
output_files.extend(list(ProgramSummary))
output_files.extend(list(ComprehensiveProgramSummary))
# output_files.extend(list(clusterProfiler_top300Gene_GO_result))
Expand Down
Loading