...
 
Commits (8)
......@@ -43,11 +43,13 @@ onerror:
rule all:
"""Define desired output from pipeline."""
input:
#"Reports/Tools.txt",
"GO/comparison.txt",
#"Samplesize/Precision_recall.png"
#"Reports/Overlap_plots/NUP107.png"
#"Settings/Report.txt",
#"Samplesize/Report.txt",aomt
#"Samplesize/Report.txt"
#"Samplesize/Report.txt",
"Reports/Tools.txt",
"Reports/Circos/RecurrentRegions.png",
"GO/comparison.txt"
rule help:
"""Print list of all targets with help."""
......
......@@ -21,15 +21,8 @@ biomart_genes: input_files/biomart_human_genes.tsv
ID_to_GO: input_files/ID_to_GO.txt
#Settings GISTIC2.0
gistic_precision: "75"
settings_gistic: "-ta 0.1
-td 0.1
-qvt 0.25
-brlen 0.7
-cap 1.5
-rx 1
-genegistic 1
-conf 0.75"
gistic_precision: "99"
settings_gistic: ""
comparison_settings: ["-ta 0.1 -td 0.1 -qvt 0.25 -brlen 0.7 -cap 1.5 -rx 1 -genegistic 1 -conf 0.99",
"-ta 0.1 -td 0.1 -qvt 0.25 -brlen 0.7 -cap 1.5 -rx 1 -genegistic 1 -conf 0.75",
......
from Circos import InputCircos, bed_to_circos
rule circos_input:
rule make_CIRCOS_input:
"""Make input files for making a circos diagram."""
input:
seg="Input/Segments_tumor.txt",
......@@ -14,7 +14,7 @@ rule circos_input:
run:
InputCircos(input.seg, input.gistic, input.rubic_gains, input.rubic_losses, output.seg, output.gistic, output.rubic)
rule make_circos:
rule make_CIRCOS_plot:
"""Make circos diagram of recurrent regions in RUBIC and GISTIC2.0"""
input:
seg="Reports/Circos/Segments.txt",
......@@ -23,13 +23,13 @@ rule make_circos:
output:
"Reports/Circos/RecurrentRegions.png"
params:
workflow.basedir + "/scripts/circos/circos.conf"
conf=workflow.basedir + "/scripts/circos/circos.conf"
conda:
workflow.basedir + "/envs/circos.yaml"
shell:
"circos -conf {params[0]} -outputfile {output[0]} -param cnv_file={input.seg} -param gistic_file={input.gistic} -param rubic_file={input.rubic}"
"circos -conf {params.conf} -outputfile {output[0]} -param cnv_file={input.seg} -param gistic_file={input.gistic} -param rubic_file={input.rubic}"
rule make_legend_circos:
rule make_legend_CIRCOS:
output:
"Reports/Circos/legend.png"
run:
......@@ -45,7 +45,7 @@ rule make_legend_circos:
bbox = legend.get_window_extent().transformed(fig.dpi_scale_trans.inverted())
fig.savefig(output[0], dpi=400, bbox_inches=bbox)
rule add_legend_circos:
rule add_legend_CIRCOS:
input:
"Reports/Circos/RecurrentRegions.png",
"Reports/Circos/legend.png"
......@@ -61,7 +61,7 @@ rule add_legend_circos:
circos.paste(legend, offset)
circos.save(output[0])
rule circos_input_zoom:
rule circos_input_zoom: #necessary?
"""Make input files for making a circos diagram."""
input:
bed="Reports/Overlap_known_genes.bed"
......@@ -72,17 +72,22 @@ rule circos_input_zoom:
run:
bed_to_circos(input.bed, output.rubic, output.gistic, output.genes)
rule make_circos_zoom:
def get_list_genes(gene_file):
with open(gene_file, 'r') as genes:
for line in genes:
print(line)
rule make_zoomed_CIRCOS_plot:
"""Compare locations of known genes, recurrent regions from RUBIC and recurrent regions from GISTIC2."""
input:
gistic="Reports/Circos/Zoom/GISTIC.txt",
rubic="Reports/Circos/Zoom/RUBIC.txt",
genes="Reports/Circos/Zoom/Genes.txt",
genes="Reports/Circos/Zoom/Genes.txt"
output:
plots="Reports/Overlap_plots/12.png"
plots=expand("Reports/Overlap_plots/{gene}.png", gene="NR6") #get_list_genes(input.genes))
params:
workflow.basedir + "/scripts/circos/circos_zoom.conf",
chrom='hs12'
chrom='hs12:67-71'
conda:
workflow.basedir + "/envs/circos.yaml"
shell:
......
......@@ -31,7 +31,7 @@ rule report_tools:
output.genes_both, output.genes_gistic, output.genes_rubic,
input.overlap, output.bed_known)
rule bed_intersect:
rule get_overlap_GISTIC_RUBIC:
"""Intersect the recurrent regions detected by RUBIC and GISTIC2.0."""
input:
gistic="GISTIC/regions_track.conf_" + config["gistic_precision"] + ".bed",
......@@ -43,7 +43,7 @@ rule bed_intersect:
shell:
"bedtools intersect -a {input.gistic} -b {input.rubic} -wo > {output}"
rule bed_known_genes:
rule get_overlap_known_genes:
"""Intersect known genes and recurrent regions detected by RUBIC and GISTIC2.0."""
input:
known="Reports/Locations_known_genes.bed",
......
import os.path
def get_settings(nr_settings, all_settings):
print(nr_settings)
print(all_settings)
print(list(range(len(config["comparison_settings"]))))
rule gistic_settings:
"""Run GISTIC2 based on different settings."""
input:
gistic_directory=os.path.join(config["gisticdir"], "gistic2"),
seg="Input/Segments_tumor.txt"
seg="Input/Segments_tumor.txt",
lambda wildcards: config["comparison_settings"][wildcards.setting]
output:
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"
......@@ -12,7 +16,8 @@ rule gistic_settings:
cnv="",
ref=config["reference"],
ref_file="",
extra=(config["comparison_settings"])[int("{setting_nr}")]
extra="wildcards.setting",
confidence=config["gistic_precision"]
wrapper:
"file:" + workflow.basedir + "/wrappers/GISTIC2"
......
import datetime
import os.path
rule install_gistic:
rule install_GISTIC:
"""Install GISTIC2 to a directory of choice."""
output:
os.path.join(config["gisticdir"], "gistic2")
......@@ -10,7 +10,7 @@ rule install_gistic:
shell:
"{workflow.basedir}/scripts/install_gistic2.sh {params}"
rule run_gistic:
rule run_GISTIC:
"""Run GISTIC2 for the tumor segmentation data."""
input:
gistic_directory=os.path.join(config["gisticdir"], "gistic2"),
......@@ -22,7 +22,8 @@ rule run_gistic:
cnv="",
ref=config["reference"],
ref_file="",
extra=config["settings_gistic"]
extra=config["settings_gistic"],
confidence=config["gistic_precision"]
benchmark:
"Benchmarks/GISTIC2." + str(datetime.datetime.now()).replace(" ", "_") + ".txt"
wrapper:
......
rule go_analysis:
rule do_GO_analysis:
"""Perform a gene ontology enrichment analysis using topGO."""
input:
gene_list="Reports/Genes_{tool}.txt"
......@@ -14,7 +14,7 @@ rule go_analysis:
wrapper:
"file:" + workflow.basedir + "/wrappers/topgo"
rule compare_enriched_terms:
rule compare_enriched_GOs:
"""Compare the top 50 GO terms detected by RUBIC and GISTIC2.0"""
input:
go=expand("GO/Enriched_GOs_{tool}.txt", tool=["GISTIC2", "RUBIC"])
......
import ReportSegments
rule firehose:
rule download_firehose_data:
"""Download copy number profiles for a cancer type of choice from firehose."""
output:
"Input/Segments_all.txt"
......@@ -22,11 +22,11 @@ def pipeline_input(wildcards):
if (provided_input != ""): #use provided input file
return provided_input
elif (provided_input == "") and (config["cancer_type"] != "") and (config["date_data"] != ""): #use firehose data
return rules.firehose.output
return rules.download_firehose_data.output
else:
raise ValueError("Provide either a segmentation file as input or get firehose data based on the cancer type and date of choice.")
rule define_input:
rule define_input_pipeline:
"""Create a tumor and normal segmentation file based on the provided input."""
input:
pipeline_input
......@@ -46,7 +46,7 @@ rule define_input:
else: #split firehose data in tumor and normal files.
split_normal_tumor(input[0], output.tumor, output.normal)
rule report_seg:
rule report_segmentation_file:
"""Report information on the input segmentation file."""
input:
seg="Input/Segments_tumor.txt"
......
from Rubic import MarkerFile, BedFile
rule markers_rubic:
rule make_marker_file_RUBIC:
"""Make marker file to use as input for RUBIC based on segmentation file (start, center and end positions of each segment)."""
input:
"Input/Segments_tumor.txt"
......@@ -9,7 +9,7 @@ rule markers_rubic:
run:
MarkerFile(input[0], output[0])
rule run_rubic:
rule run_RUBIC:
"""Run RUBIC for the tumor segmentation data."""
input:
seg="Input/Segments_tumor.txt",
......@@ -26,7 +26,7 @@ rule run_rubic:
wrapper:
"file:" + workflow.basedir +"/wrappers/rubic"
rule make_bed_rubic:
rule make_bed_file_RUBIC:
input:
gains="RUBIC/gains.txt",
losses="RUBIC/losses.txt"
......
......@@ -2,8 +2,9 @@ import ReportSizes
from SampleSizes import SegFile
import os.path
import datetime
from AUC import ROC_curve
rule seg_subsets:
rule get_segmentation_files_subsets:
"""Create segmentation files with different numbers of samples (randomly chosen) for a number of times."""
input:
"Input/Segments_tumor.txt"
......@@ -12,7 +13,7 @@ rule seg_subsets:
run:
SegFile(input[0], output)
rule run_gistic_subsets:
rule run_GISTIC_subsets:
"""Run GISTIC2 for the segmentation files with different subsets."""
input:
gistic_directory=os.path.join(config["gisticdir"], "gistic2"),
......@@ -24,11 +25,12 @@ rule run_gistic_subsets:
cnv="",
ref=config["reference"],
ref_file="",
extra=config["settings_gistic"]
extra=config["settings_gistic"],
confidence=config["gistic_precision"]
wrapper:
"file:" + workflow.basedir + "/wrappers/GISTIC2"
rule run_rubic_subsets:
rule run_RUBIC_subsets:
"""Run RUBIC for the segmentation files with different subsets."""
input:
seg="Samplesize/Input/Size{rand_nr}.Rep{rep_nr}.txt",
......@@ -48,8 +50,8 @@ rule run_rubic_subsets:
#"68ec08a/bio/rubic"
"file:" + workflow.basedir +"/wrappers/rubic"
rule report_sizes:
"""Report the difference when using different sample sizes."""
rule report_size_differences:
"""Report the differences when using different sample sizes."""
input:
gistic=expand("Samplesize/GISTIC/Size{rand_nr}.Rep{rep_nr}/all_lesions.conf_" + config["gistic_precision"] + ".txt", rand_nr=config["sizes"], rep_nr=config["repeats"]),
rubic_gains=expand("Samplesize/RUBIC/Size{rand_nr}.Rep{rep_nr}/gains.txt", rand_nr=config["sizes"], rep_nr=config["repeats"]),
......@@ -65,3 +67,55 @@ rule report_sizes:
ref=config["reference"]
run:
ReportSizes.make_report(input.gistic, input.rubic_gains, input.rubic_losses, params.census, params.known, params.reps, params.sizes, params.ref, output.report, output.plots)
rule make_bed_RUBIC_subsets:
"""Make a bed file with the regions detected using RUBIC with a subset of the total sample."""
input:
gains="Samplesize/RUBIC/Size{rand_nr}.Rep{rep_nr}/gains.txt",
losses="Samplesize/RUBIC/Size{rand_nr}.Rep{rep_nr}/losses.txt"
output:
bed="Samplesize/RUBIC/Size{rand_nr}.Rep{rep_nr}/regions_track.bed"
run:
BedFile(input.gains, input.losses, output.bed)
rule compare_subset_truth_GISTIC:
"""Do bedtools intersect between the GISTIC bed file with subset and bed file all samples."""
input:
bed_subsets="Samplesize/GISTIC/Size{rand_nr}.Rep{rep_nr}/regions_track.conf_" + config["gistic_precision"] + ".bed",
bed_truth="GISTIC/regions_track.conf_" + config["gistic_precision"] + ".bed"
output:
subset="Samplesize/GISTIC/Size{rand_nr}.Rep{rep_nr}/Overlap_subset_truth.bed",
truth="Samplesize/GISTIC/Size{rand_nr}.Rep{rep_nr}/Overlap_truth_subset.bed",
conda:
workflow.basedir + "/envs/bedtools.yaml"
shell:
"bedtools intersect -a {input.bed_subsets} -b {input.bed_truth} -wao > {output.subset} && \
bedtools intersect -a {input.bed_truth} -b {input.bed_subsets} -wao > {output.truth}"
rule compare_subset_truth_RUBIC:
"""Do bedtools intersect between the RUBIC bed file with subset and bed file all samples."""
input:
bed_subsets="Samplesize/RUBIC/Size{rand_nr}.Rep{rep_nr}/regions_track.bed",
bed_truth="RUBIC/regions_track.bed"
output:
subset="Samplesize/RUBIC/Size{rand_nr}.Rep{rep_nr}/Overlap_subset_truth.bed",
truth="Samplesize/RUBIC/Size{rand_nr}.Rep{rep_nr}/Overlap_truth_subset.bed",
conda:
workflow.basedir + "/envs/bedtools.yaml"
shell:
"bedtools intersect -a {input.bed_subsets} -b {input.bed_truth} -wao > {output.subset} && \
bedtools intersect -a {input.bed_truth} -b {input.bed_subsets} -wao > {output.truth}"
rule make_ROC_plot:
"""Make ROC plot on the precision and recall from the subsets using GISTIC and RUBIC."""
input:
gistic_subset=expand("Samplesize/GISTIC/Size{rand_nr}.Rep{rep_nr}/Overlap_subset_truth.bed", rand_nr=config["sizes"], rep_nr=config["repeats"]),
gistic_truth=expand("Samplesize/GISTIC/Size{rand_nr}.Rep{rep_nr}/Overlap_truth_subset.bed", rand_nr=config["sizes"], rep_nr=config["repeats"]),
rubic_subset=expand("Samplesize/RUBIC/Size{rand_nr}.Rep{rep_nr}/Overlap_subset_truth.bed", rand_nr=config["sizes"], rep_nr=config["repeats"]),
rubic_truth=expand("Samplesize/RUBIC/Size{rand_nr}.Rep{rep_nr}/Overlap_truth_subset.bed", rand_nr=config["sizes"], rep_nr=config["repeats"]),
output:
AUC="Samplesize/Precision_recall.png"
params:
sizes=config["sizes"]
run:
ROC_curve(input.gistic_subset, input.gistic_truth, input.rubic_subset, input.rubic_truth, output.AUC, params.sizes)
import ReportControl
rule run_gistic_control:
rule run_GISTIC_control:
"""Run GISTIC2 for the tumor segmentation data with data from control samples included."""
input:
gistic_directory=os.path.join(config["gisticdir"], "gistic2"),
seg="Input/Segments_tumor.txt"
output:
"Control/"
"Control/all_lesions.conf_" + config["gistic_precision"] + ".txt",
"Control/regions_track.conf_" + config["gistic_precision"] + ".bed"
params:
cnv="Input/Segments_normal.txt",
gistic_directory=config["gisticdir"],
ref=config["reference"],
ref_file="",
extra=""
extra="",
confidence=config["gistic_precision"]
wrapper:
"file:" + os.path.join(workflow.basedir, "wrappers/GISTIC2")
"file:" + workflow.basedir + "/wrappers/GISTIC2"
rule report_control:
"""Report the differences between using a control and without using a control."""
......
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style('whitegrid')
def ROC_curve(gistic_subset, gistic_truth, rubic_subset, rubic_truth, plot_file, list_sizes):
plot_recall, plot_precision, plot_avg_recall, plot_avg_precision = [], [], [], []
for tool in (gistic_subset, gistic_truth), (rubic_subset, rubic_truth):
list_recall, list_precision = get_list_rates(tool[0], tool[1], list_sizes)
plot_recall.append(list_recall) #avg_recall)
plot_precision.append(list_precision) #.append(#avg_precision)
avg_recall, avg_precision = calculate_averages(list_recall, list_precision)
plot_avg_recall.append(avg_recall) #avg_recall)
plot_avg_precision.append(avg_precision)
plot_ROC(plot_recall, plot_precision, plot_file, list_sizes, False)
plot_ROC(plot_avg_recall, plot_avg_precision, plot_file + "_avg.png", list_sizes, True)
def get_list_rates(subset_files, truth_files, list_sizes):
list_recall = [[] for i in range(len(list_sizes))]
list_precision = [[] for i in range(len(list_sizes))]
for i in range(len(subset_files)):
size_file = subset_files[i].split("Size")[1].split(".Rep")[0]
recall, precision = calculate_precision_recall(subset_files[i], truth_files[i])
for size in range(len(list_sizes)):
if str(list_sizes[size]) == size_file:
list_recall[size].append(recall)
list_precision[size].append(precision)
return list_recall, list_precision
def calculate_precision_recall(bed_subset, bed_truth):
FP, TP, FN = 0, 0, 0
with open(bed_subset, 'r') as subset: #precision
for region in subset:
if region.startswith("track"):
pass #header
else:
line = region.split("\t")
if line[4] == '.':
FP += 1
else:
TP += 1
with open(bed_truth, 'r') as truth: #recall
for region in truth:
if region.startswith("track"):
pass #header
else:
line = region.split("\t")
if line[4] == '.':
FN += 1
#else:
# TP += 1
recall = TP / float(TP + FN)
precision = TP / float(TP + FP)
return recall, precision
def calculate_averages(list_recall, list_precision):
avg_recall, avg_precision = [], []
for size in list_recall:
avg = sum(size) / float(len(size))
avg_recall.append(avg)
for size in list_precision:
avg = sum(size) / float(len(size))
avg_precision.append(avg)
return avg_recall, avg_precision
def plot_ROC(list_recall, list_precision, plot_file, list_sizes, avg):
plt.figure()
if avg:
plt.xlim([0, 1])
plt.ylim([0.7, 1])
point_size=50
else:
plt.xlim([0, 1])
plt.ylim([0.5, 1.02])
point_size=20
for i in range(len(list_recall)):
recall, precision = list_recall[i], list_precision[i]
for j in range(len(recall)):
col = sns.cubehelix_palette(len(list_sizes), start=.5, rot=-.75, dark=.2)[j] if i == 0 else sns.cubehelix_palette(len(list_sizes))[j]
plt.scatter(recall[j], precision[j], color=col, s=point_size)
plt.xlabel('Recall')
plt.ylabel('Precision')
plt.savefig(plot_file)
plt.close()
......@@ -20,11 +20,11 @@ def make_report(size_gistic, size_rubic_gains, size_rubic_losses, census_genes,
for tool in 'GISTIC', 'RUBIC':
size_file = (size_rubic_gains[i], size_rubic_losses[i]) if tool == 'RUBIC' else size_gistic[i]
parsed_results = parse_regions(size_file, known_genes, census_genes, tool)
if tool not in all_results.keys():
all_results[tool] = {}
all_results[tool][size] = [parsed_results]
else:
all_results[tool][size] = all_results[tool][size] + [parsed_results]
#if tool not in all_results.keys():
# all_results[tool] = {}
# all_results[tool][size] = [parsed_results]
#else:
# all_results[tool][size] = all_results[tool][size] + [parsed_results]
stats_results = get_stats(parsed_results, size)
for stat_list in stats_results[0], stats_results[1]:
converted_stats = [tool] + stat_list[0:2]
......@@ -33,7 +33,7 @@ def make_report(size_gistic, size_rubic_gains, size_rubic_losses, census_genes,
for stat in stat_list[5:]:
converted_stats.append(float(stat.split(" (")[0]))
list_stats.append(converted_stats)
overlap_genes(all_results, report_file)
#overlap_genes(all_results, report_file)
make_plots(list_stats, reps, sizes, plot_dir)
def overlap_genes(all_results, report_file):
......@@ -60,7 +60,7 @@ def plot_size_differences(df_stats, value_y_axis, list_sizes, nr_reps, plot_dir)
"""Plot the differences between analyses using different sample sizes."""
sns.set_style("whitegrid")
g = sns.factorplot(x="Sample size", y=value_y_axis, col="Type", hue="Tool", data=df_stats, kind="box",
size=5, aspect=1, palette=sns.cubehelix_palette(8, start=.5, rot=-.75, dark=.2))
size=5, aspect=1, palette=["#5975A4","#5F9E6E"])
g.set_axis_labels("Sample size", value_y_axis).set_titles("{col_name}").despine(bottom=True)
#add_significance(g, df_stats, list_sizes, value_y_axis)
png_file = os.path.join(plot_dir, value_y_axis.replace(" ", "_") + ".png")
......
......@@ -24,11 +24,11 @@ def make_report(gistic_results, rubic_gain_results, rubic_loss_results,
parsed.append(parsed_results)
stats.append(get_stats(parsed_results, tool))
stats.append(parse_bed_overlap(bed_overlap, known_genes, census_genes))
table_all_regions(parsed, file_regions) #make table with all regions
make_tool_report(file_tools, stats) #make tool report
table_all_regions(parsed, file_regions) #make table with all regions
make_tool_report(file_tools, stats) #make tool report
all_genes = make_gene_files(parsed, file_genes_GISTIC, file_genes_RUBIC, file_genes_both, known_genes, file_venn) #make gene files and venn overlap plot
plot_histogram_sizes(parsed, file_swarmplot) #plot histogram with the sizes of the regions
make_bed_known_regions(known_genes, biomart_file, bed_known_genes) #Make bed file with the locations of known genes.
plot_histogram_sizes(parsed, file_swarmplot) #plot histogram with the sizes of the regions
make_bed_known_regions(known_genes, biomart_file, bed_known_genes) #Make bed file with the locations of known genes.
def make_tool_report(file_tools, stats_tools):
"""Make a report of the results from GISTIC and RUBIC."""
......@@ -86,6 +86,8 @@ def make_gene_file_overlap(gene_lists, out_both):
def venn3_overlap(gene_lists, known_genes, out_venn):
known = parse_gene_file(known_genes, np.inf)
plt.subplots(figsize=(7, 7))
overlap_tools = set(gene_lists[0]).intersection(set(gene_lists[1]))
print(overlap_tools.intersection(set(known)))
venn_sets = [set(gene_lists[0]), set(gene_lists[1]), set(known)]
c = venn3(venn_sets, ('GISTIC2', 'RUBIC', ' Known genes'))
c.get_patch_by_id('100').set_color('#5975A4'), c.get_patch_by_id('010').set_color('#5F9E6E')
......
......@@ -20,21 +20,21 @@ z = 5
file = conf(gistic_file)
r0 = 0.9r
r1 = 0.7r
fill_color = lgrey
fill_color = 89,117,164
</highlight>
<highlight>
file = conf(rubic_file)
r0 = 0.7r
r1 = 0.5r
fill_color = lyellow
fill_color = 95,158,110
</highlight>
<highlight>
file = conf(gene_file)
r0 = 1.0r
r1 = 0.9r
fill_color = black
fill_color = 109,119,167
</highlight>
</highlights>
......
......@@ -10,7 +10,7 @@ from snakemake.shell import shell
segments = os.path.abspath(snakemake.input.seg)
gistic_dir = os.path.abspath(snakemake.input.gistic_directory).split("/gistic2")[0]
outfolder = os.path.abspath(snakemake.output[0]).split("all_lesions")[0]
print(outfolder)
#Select reference file
ref = snakemake.params.get("ref", "")
ref_file = snakemake.params.get("ref_file", "")
......@@ -27,10 +27,11 @@ if cnv_file != "":
cnv_arg = " --cnv " + cnv_file if os.stat(cnv_file).st_size != 0 else " "
else:
cnv_arg = " "
print(cnv_arg)
#Additional arguments
extra = snakemake.params.get("extra", "")
if snakemake.params.confidence != "":
extra += "-conf 0." + snakemake.params.confidence
#Make output directory, go to gistic2 directory and run gistic2
command = "./gistic2 -b " + outfolder + " -seg " + segments + " -refgene " + reference + cnv_arg + extra
......
......@@ -43,7 +43,7 @@ resultWeight <- getSigGroups(GOdata, test.stat)
allRes <- GenTable(GOdata, classic = resultFisher,
#KS = resultKS,
weight = resultWeight,
orderBy = "weight", ranksOf = "classic", topNodes = 50)
orderBy = "weight", ranksOf = "classic") #, topNodes = 50)
print(allRes)
write.table(allRes, file=snakemake@output[[1]], quote=FALSE, sep="\t", eol = "\n")
......