Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #2 from loosolab/wilson
Wilson
  • Loading branch information
msbentsen committed Jun 26, 2020
2 parents 9eef0bd + bf8a380 commit a99e92a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions environments/wilson.yaml
Expand Up @@ -28,3 +28,4 @@ dependencies:
- r-car
- r-rjson
- r-circlize==0.4.8
- r-optparse
9 changes: 6 additions & 3 deletions snakefiles/wilson.snake
Expand Up @@ -45,8 +45,10 @@ rule convert_individual_overview:
"../environments/wilson.yaml"
output:
os.path.join(OUTPUTDIR, "wilson", "data", "{TF}_overview.clarion")
log:
os.path.join(OUTPUTDIR, "logs", "wilson", "{TF}_convert_individual_overview.log")
shell:
"Rscript {params.scripts}/convert_data.R --input {input.overview} --output {output} --condition_names {input.condition_names} &> /dev/null "
"Rscript {params.scripts}/convert_data.R --input {input.overview} --output {output} --condition_names {input.condition_names} &> {log} "

#Convert global bindetect-output:
rule convert_global_overview:
Expand All @@ -56,13 +58,15 @@ rule convert_global_overview:
app = os.path.join(OUTPUTDIR, "wilson", "app.R")
output:
os.path.join(OUTPUTDIR, "wilson", "data", "bindetect_results.clarion")
log:
os.path.join(OUTPUTDIR, "logs", "wilson", "convert_global_overview.log")
params:
overview = os.path.join(OUTPUTDIR, "overview", "*_results.txt"),
scripts = scripts_dir
conda:
"../environments/wilson.yaml"
shell:
"Rscript {params.scripts}/convert_data.R --input {params.overview} --output {output} --condition_names {input.condition_names} &> /dev/null "
"Rscript {params.scripts}/convert_data.R --input {params.overview} --output {output} --condition_names {input.condition_names} &> {log} "

rule wilson_howto:
input:
Expand All @@ -86,7 +90,6 @@ if (!require(shiny)) install.packages("shiny"); library(shiny)
Now your browser will open and you can start using the app. If this is not the case try opening the link displayed in your console manually.

Note that unlike normal scripts the app will not terminate on its own so please make sure to close the respective process after you are done.
Furthermore, Windows users should install Rtools (https://cran.r-project.org/bin/windows/Rtools/) to enable plot downloading.
"""

f.write(howto)
Expand Down

0 comments on commit a99e92a

Please sign in to comment.