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

Fixed merge conflicts.

parents 4a39be4b 42ec6850
#Directories to be specified
#workdir: /home/bftan/CNA_results #directory to write output
#gisticdir: /home/bftan/Tools/GISTIC2 #directory to install GISTIC2
workdir: /home/bftan/CNA_results #directory to write output
gisticdir: /home/bftan/Tools/GISTIC2 #directory to install GISTIC2
#workdir: /home/bftan/CNA_results #directory to write output
#gisticdir: /home/bftan/Tools/GISTIC2 #directory to install GISTIC2
workdir: /home/beatrice/CNA_analysis
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
cancer_type: SKCM
......
......@@ -10,8 +10,8 @@ rule gistic_settings:
seg="Input/Segments_tumor.txt",
lambda wildcards: config["comparison_settings"][wildcards.setting]
output:
"Settings/GISTIC_wildcards.setting/all_lesions.conf_" + config["gistic_precision"] + ".txt",
"Settings/GISTIC_wildcards.setting/regions_track.conf_" + config["gistic_precision"] + ".bed"
expand("Settings/GISTIC_{setting_nr}/all_lesions.conf_" + config["gistic_precision"] + ".txt", setting_nr=range(len(config["comparison_settings"]))),
"Settings/GISTIC_{setting_nr}/regions_track.conf_" + config["gistic_precision"] + ".bed"
params:
cnv="",
ref=config["reference"],
......
......@@ -3,7 +3,8 @@ rule do_GO_analysis:
input:
gene_list="Reports/Genes_{tool}.txt"
output:
go="GO/{tool}.txt"
table="GO/Enriched_GOs_{tool}.txt",
plot="GO/Enriched_GOs_{tool}.jpg"
params:
organism="hsapiens", #default is human
ontology="BP", #MF, BP, CC or all
......@@ -16,7 +17,7 @@ rule do_GO_analysis:
rule compare_enriched_GOs:
"""Compare the top 50 GO terms detected by RUBIC and GISTIC2.0"""
input:
go=expand("GO/{tool}.txt", tool=["GISTIC2", "RUBIC"])
go=expand("GO/Enriched_GOs_{tool}.txt", tool=["GISTIC2", "RUBIC"])
output:
"GO/comparison.txt"
run:
......
......@@ -106,12 +106,13 @@ def venn3_overlap(gene_lists, known_genes, out_venn):
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."""
size_list, size_list_known = parse_sizes_for_plot(parsed_results)
print(size_list_known)
sns.set_style("white")
f, ax = plt.subplots(figsize=(7, 7))
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.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()
g.set_xlabel("Tool",fontsize=16)
g.set_ylabel("Log size of recurrent regions",fontsize=16)
......
......@@ -48,5 +48,7 @@ print(allRes)
write.table(allRes, file=snakemake@output[[1]], quote=FALSE, sep="\t", eol = "\n")
#Visualize GO term relationships
jpeg(snakemake@output[[1]])
showSigOfNodes(GOdata, score(resultFisher), firstSigNodes = 5, useInfo ='all')
printGraph(GOdata, resultFisher, firstSigNodes = 5, fn.prefix = "tGO", useInfo = "all", pdfSW = TRUE)
dev.off()
Markdown is supported
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