Commit 80a92bce authored by Beatrice Tan's avatar Beatrice Tan
Browse files

Fixed merge conflicts.

parents 4a39be4b 42ec6850
#Directories to be specified #Directories to be specified
#workdir: /home/bftan/CNA_results #directory to write output workdir: /home/bftan/CNA_results #directory to write output
#gisticdir: /home/bftan/Tools/GISTIC2 #directory to install GISTIC2 gisticdir: /home/bftan/Tools/GISTIC2 #directory to install GISTIC2
#workdir: /home/bftan/CNA_results #directory to write output #workdir: /home/beatrice/CNA_analysis
#gisticdir: /home/bftan/Tools/GISTIC2 #directory to install GISTIC2 #gisticdir: /home/beatrice/CNA_analysis/run_gistic2
workdir: /home/beatrice/CNA_analysis
gisticdir: /home/beatrice/CNA_analysis/run_gistic2
#Input details to download from firehose #Input details to download from firehose
cancer_type: SKCM cancer_type: SKCM
......
...@@ -10,8 +10,8 @@ rule gistic_settings: ...@@ -10,8 +10,8 @@ rule gistic_settings:
seg="Input/Segments_tumor.txt", seg="Input/Segments_tumor.txt",
lambda wildcards: config["comparison_settings"][wildcards.setting] lambda wildcards: config["comparison_settings"][wildcards.setting]
output: output:
"Settings/GISTIC_wildcards.setting/all_lesions.conf_" + config["gistic_precision"] + ".txt", expand("Settings/GISTIC_{setting_nr}/all_lesions.conf_" + config["gistic_precision"] + ".txt", setting_nr=range(len(config["comparison_settings"]))),
"Settings/GISTIC_wildcards.setting/regions_track.conf_" + config["gistic_precision"] + ".bed" "Settings/GISTIC_{setting_nr}/regions_track.conf_" + config["gistic_precision"] + ".bed"
params: params:
cnv="", cnv="",
ref=config["reference"], ref=config["reference"],
......
...@@ -3,7 +3,8 @@ rule do_GO_analysis: ...@@ -3,7 +3,8 @@ rule do_GO_analysis:
input: input:
gene_list="Reports/Genes_{tool}.txt" gene_list="Reports/Genes_{tool}.txt"
output: output:
go="GO/{tool}.txt" table="GO/Enriched_GOs_{tool}.txt",
plot="GO/Enriched_GOs_{tool}.jpg"
params: params:
organism="hsapiens", #default is human organism="hsapiens", #default is human
ontology="BP", #MF, BP, CC or all ontology="BP", #MF, BP, CC or all
...@@ -16,7 +17,7 @@ rule do_GO_analysis: ...@@ -16,7 +17,7 @@ rule do_GO_analysis:
rule compare_enriched_GOs: rule compare_enriched_GOs:
"""Compare the top 50 GO terms detected by RUBIC and GISTIC2.0""" """Compare the top 50 GO terms detected by RUBIC and GISTIC2.0"""
input: input:
go=expand("GO/{tool}.txt", tool=["GISTIC2", "RUBIC"]) go=expand("GO/Enriched_GOs_{tool}.txt", tool=["GISTIC2", "RUBIC"])
output: output:
"GO/comparison.txt" "GO/comparison.txt"
run: run:
......
...@@ -106,12 +106,13 @@ def venn3_overlap(gene_lists, known_genes, out_venn): ...@@ -106,12 +106,13 @@ def venn3_overlap(gene_lists, known_genes, out_venn):
def plot_histogram_sizes(parsed_results, plot_file): def plot_histogram_sizes(parsed_results, plot_file):
"""Make boxplot with swarmplot on top showing sizes of recurrent regions detected by GISTIC2.0 and RUBIC.""" """Make boxplot with swarmplot on top showing sizes of recurrent regions detected by GISTIC2.0 and RUBIC."""
size_list, size_list_known = parse_sizes_for_plot(parsed_results) size_list, size_list_known = parse_sizes_for_plot(parsed_results)
print(size_list_known)
sns.set_style("white") sns.set_style("white")
f, ax = plt.subplots(figsize=(7, 7)) f, ax = plt.subplots(figsize=(7, 7))
ax.set(yscale="log") ax.set(yscale="log")
g = sns.boxplot(x="Tool", y="Size", hue="CNV type", data=size_list, whis=np.inf, palette={"Amplification": "#71AEC0", "Deletion": "#B55D60"}) g = sns.boxplot(x="Tool", y="Size", hue="CNV type", data=size_list, whis=np.inf, palette={"Amplification": "#71AEC0", "Deletion": "#B55D60"})
g = sns.swarmplot(x="Tool", y="Size", dodge=True, hue="CNV type", data=size_list, size=5, palette={"Amplification": "#527F8C", "Deletion": "#844446"}) g = sns.swarmplot(x="Tool", y="Size", dodge=True, hue="CNV type", data=size_list, size=5, palette={"Amplification": "#527F8C", "Deletion": "#844446"})
g = sns.swarmplot(x="Tool", y="Size", dodge=True, hue="CNV type", data=size_list_known, size=5, palette={"Amplification": "black", "Deletion": "black"}) #g = sns.swarmplot(x="Tool", y="Size", dodge=True, hue="CNV type", data=size_list_known, size=5, palette={"Amplification": "black", "Deletion": "black"})
sns.despine() sns.despine()
g.set_xlabel("Tool",fontsize=16) g.set_xlabel("Tool",fontsize=16)
g.set_ylabel("Log size of recurrent regions",fontsize=16) g.set_ylabel("Log size of recurrent regions",fontsize=16)
......
...@@ -48,5 +48,7 @@ print(allRes) ...@@ -48,5 +48,7 @@ print(allRes)
write.table(allRes, file=snakemake@output[[1]], quote=FALSE, sep="\t", eol = "\n") write.table(allRes, file=snakemake@output[[1]], quote=FALSE, sep="\t", eol = "\n")
#Visualize GO term relationships #Visualize GO term relationships
jpeg(snakemake@output[[1]])
showSigOfNodes(GOdata, score(resultFisher), firstSigNodes = 5, useInfo ='all') showSigOfNodes(GOdata, score(resultFisher), firstSigNodes = 5, useInfo ='all')
printGraph(GOdata, resultFisher, firstSigNodes = 5, fn.prefix = "tGO", useInfo = "all", pdfSW = TRUE) printGraph(GOdata, resultFisher, firstSigNodes = 5, fn.prefix = "tGO", useInfo = "all", pdfSW = TRUE)
dev.off()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment