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

Updated wrappers.

parent 6869823f
...@@ -10,7 +10,7 @@ from snakemake.shell import shell ...@@ -10,7 +10,7 @@ from snakemake.shell import shell
segments = os.path.abspath(snakemake.input.seg) segments = os.path.abspath(snakemake.input.seg)
gistic_dir = os.path.abspath(snakemake.input.gistic_directory).split("/gistic2")[0] gistic_dir = os.path.abspath(snakemake.input.gistic_directory).split("/gistic2")[0]
outfolder = os.path.abspath(snakemake.output[0]).split("all_lesions")[0] outfolder = os.path.abspath(snakemake.output[0]).split("all_lesions")[0]
print(outfolder)
#Select reference file #Select reference file
ref = snakemake.params.get("ref", "") ref = snakemake.params.get("ref", "")
ref_file = snakemake.params.get("ref_file", "") ref_file = snakemake.params.get("ref_file", "")
...@@ -27,10 +27,11 @@ if cnv_file != "": ...@@ -27,10 +27,11 @@ if cnv_file != "":
cnv_arg = " --cnv " + cnv_file if os.stat(cnv_file).st_size != 0 else " " cnv_arg = " --cnv " + cnv_file if os.stat(cnv_file).st_size != 0 else " "
else: else:
cnv_arg = " " cnv_arg = " "
print(cnv_arg)
#Additional arguments #Additional arguments
extra = snakemake.params.get("extra", "") 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 #Make output directory, go to gistic2 directory and run gistic2
command = "./gistic2 -b " + outfolder + " -seg " + segments + " -refgene " + reference + cnv_arg + extra command = "./gistic2 -b " + outfolder + " -seg " + segments + " -refgene " + reference + cnv_arg + extra
......
...@@ -43,7 +43,7 @@ resultWeight <- getSigGroups(GOdata, test.stat) ...@@ -43,7 +43,7 @@ resultWeight <- getSigGroups(GOdata, test.stat)
allRes <- GenTable(GOdata, classic = resultFisher, allRes <- GenTable(GOdata, classic = resultFisher,
#KS = resultKS, #KS = resultKS,
weight = resultWeight, weight = resultWeight,
orderBy = "weight", ranksOf = "classic", topNodes = 50) orderBy = "weight", ranksOf = "classic") #, topNodes = 50)
print(allRes) 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")
......
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