Skip to content

Commit 9ccd22d

Browse files
author
Chris Nobles
authored
Merge pull request #39 from cnobles/update_v0.9.9
Update v0.9.9
2 parents 39ee0c9 + ab0f85d commit 9ccd22d

26 files changed

+1428
-1261
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ before_install:
33
- sudo apt-get -qq update
44
- sudo apt-get install xdotool
55
- sudo apt-get install texlive-latex-extra
6+
- sudo apt-get install libgfortran3
67
install:
78
- bash install.sh
89
script: bash etc/tests/test.sh

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.9.8
1+
v0.9.9

README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,35 +63,33 @@ conda activate iguide
6363
iguide list_samples configs/simulation.config.yml
6464
6565
# Create test analysis directory
66-
# (The simulation configuration file is used by default and does not need to be specified)
6766
6867
iguide setup configs/simulation.config.yml
6968
7069
# Process a simulation dataset
7170
7271
iguide run configs/simulation.config.yml -- -np
7372
iguide run configs/simulation.config.yml -- --latency-wait 30
74-
cat analysis/simulation/output/unique_sites.simulation.csv
7573
76-
# Processing will complete with a report, but if additional analyses are required,
77-
# you can reevaluate the 'incorp_sites' object. Multiple objects can be evaluated
78-
# together, just include the run files.
74+
# Processing will complete with several reports, but if additional analyses are required,
75+
# you can re-evaluate a run by its config file. Multiple runs can be evaluated together,
76+
# just include multiple config files.
7977
80-
iguide eval analysis/simulation/output/incorp_sites.simulation.rds \
78+
iguide eval configs/simulation.config.yml \
8179
-o analysis/simulation/output/iguide.eval.simulation.test.rds \
8280
-s sampleInfo/simulation.supp.csv
8381
8482
# After evaluation, generate a report in a different format than standard.
8583
# Additionally the evaluation and report generation step can be combined using
86-
# config file(s) as inputs for the 'report' subcommand.
84+
# config file(s) as inputs for the 'report' subcommand (using the -c flag instead of -e).
8785
8886
iguide report -e analysis/simulation/output/iguide.eval.simulation.test.rds \
8987
-o analysis/simulation/reports/report.simulation.pdf \
9088
-s sampleInfo/simulation.supp.csv \
9189
-t pdf
9290
9391
# When you are all finished and ready to archive / remove excess files, a minimal configuration
94-
# can be achived with the 'clean' subcommand.
92+
# can be achieved with the 'clean' subcommand.
9593
9694
iguide clean configs/simulation.config.yml
9795
@@ -106,6 +104,18 @@ conda deactivate
106104

107105
### Changelog:
108106

107+
**v0.9.9 (June 10th, 2019)**
108+
109+
* Modified the assimilate + evaluate workflow
110+
+ Assimilate now only includes reference genome data, meaning a cleaner intermediate file
111+
+ Evaluate will now handle ref. gene sets and further analysis
112+
+ This increases the modularity and consistancy of the workflow
113+
* Revised the iGUIDE Report format to be more informational and clearer
114+
* Revised a bit of the workflow to make reprocessing smoother
115+
* Updated BLAT coupling script to be more memory efficient
116+
* Fixed TravisCI testing!
117+
* Changed stat workflow, now restarting analysis won't init a total reproc.
118+
109119
**v0.9.8 (April 19th, 2019)**
110120

111121
* iGUIDE can now support non-Cas9 nucleases as well!

Snakefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ if not os.path.isdir(ROOT_DIR):
5555
# Check for sequence file paths
5656
if not os.path.isdir(config["Seq_Path"]):
5757
raise SystemExit("Path to sequencing files is not found (Seq_Path). Check your config file.")
58-
58+
59+
# Check for config symlink to check proper run directory setup
60+
if not os.path.isfile(RUN_DIR + "/config.yml"):
61+
raise SystemExit("Path to symbolic config is not present. Check to make sure you've run 'iguide setup' first.")
5962

6063
# Default params if not included in config
6164
if not "maxNcount" in config:
@@ -100,7 +103,6 @@ if not "reportMB" in config:
100103
# Target Rules
101104
rule all:
102105
input:
103-
uniq_sites=RUN_DIR + "/output/unique_sites." + RUN + ".csv.gz",
104106
incorp_sites=RUN_DIR + "/output/incorp_sites." + RUN + ".rds",
105107
report=RUN_DIR + "/reports/report." + RUN + ".html",
106108
summary=RUN_DIR + "/reports/summary." + RUN + ".txt",

docs/pages/changelog.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@
66
ChangeLog
77
=========
88

9+
**v0.9.9 (June 10th, 2019)**
10+
11+
* Modified the assimilate + evaluate workflow
12+
13+
- Assimilate now only includes reference genome data, meaning a cleaner intermediate file
14+
- Evaluate will now handle ref. gene sets and further analysis
15+
- This increases the modularity and consistancy of the workflow
16+
17+
* Revised the iGUIDE Report format to be more informational and clearer
18+
* Revised a bit of the workflow to make reprocessing smoother
19+
* Updated BLAT coupling script to be more memory efficient
20+
* Fixed TravisCI testing!
21+
* Changed stat workflow, now restarting analysis won't initiate a total reprocessing.
22+
923
**v0.9.8 (April 19th, 2019)**
1024

1125
* iGUIDE can now support non-Cas9 nucleases as well!

docs/pages/quickstart.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -123,57 +123,57 @@ terminal, so you can see what snakemake is about to perform. Next, the test data
123123
is moved to the input directory underneath the new test run directory. Then the
124124
entirety of processing can start.::
125125

126-
# After constructing the config file and having reference files
127-
# (i.e. sampleinfo). You can check the samples associated with the run.
128-
126+
# If conda is not in your path ...
127+
128+
source ${HOME}/miniconda3/etc/profile.d/conda.sh
129+
130+
# Activate iguide environment
131+
132+
conda activate iguide
133+
134+
# After constructing the config file and having reference files (i.e. sampleinfo)
135+
# You can check the samples associated with the run.
136+
129137
iguide list_samples configs/simulation.config.yml
130138

131139
# Create test analysis directory
132-
# (The simulation configuration file is used by default and does not need to
133-
# be specified)
134-
140+
135141
iguide setup configs/simulation.config.yml
136142

137143
# Process a simulation dataset
138144

139145
iguide run configs/simulation.config.yml -- -np
140146
iguide run configs/simulation.config.yml -- --latency-wait 30
141-
zcat analysis/simulation/output/unique_sites.simulation.csv.gz
142147

143-
# Processing will complete with a report, but if additional analyses are
144-
# required, you can reevaluate the 'incorp_sites' object. Multiple objects
145-
# can be evaluated together, just include the run files.
148+
# Processing will complete with several reports, but if additional analyses are required,
149+
# you can re-evaluate a run by its config file. Multiple runs can be evaluated together,
150+
# just include multiple config files.
146151

147-
iguide eval analysis/simulation/output/incorp_sites.simulation.rds \
152+
iguide eval configs/simulation.config.yml \
148153
-o analysis/simulation/output/iguide.eval.simulation.test.rds \
149154
-s sampleInfo/simulation.supp.csv
150155

151156
# After evaluation, generate a report in a different format than standard.
152-
# Additionally the evaluation and report generation step can be combined using
153-
# config file(s) as inputs for the 'report' subcommand. For PDF output, you'll
154-
# need to verify that your system has the correct latex-based software
155-
# support, such as 'texlive'.
157+
# Additionally the evaluation and report generation step can be combined using
158+
# config file(s) as inputs for the 'report' subcommand (using the -c flag instead of -e).
156159

157160
iguide report -e analysis/simulation/output/iguide.eval.simulation.test.rds \
158161
-o analysis/simulation/reports/report.simulation.pdf \
159162
-s sampleInfo/simulation.supp.csv \
160163
-t pdf
161164

162-
# If you are looking for a quick and consise report of the output, use the
163-
# 'summary' subcommand with input of either a config file(s) or a single
164-
# evaluation file, generated by the 'eval' subcommand.
165-
166-
iguide summary -e analysis/simulation/output/iguide.eval.simulation.test.rds
167-
168-
# When you are all finished and ready to archive / remove excess files, a
169-
# minimal configuration can be achived with the 'clean' subcommand.
165+
# When you are all finished and ready to archive / remove excess files, a minimal configuration
166+
# can be achieved with the 'clean' subcommand.
170167

171168
iguide clean configs/simulation.config.yml
172169

173170
# Or you realized you messed up all the input and need to restart
174171

175172
iguide clean configs/simulation.config.yml --remove_proj
176173

174+
# Deactivate the environment
175+
176+
conda deactivate
177177

178178
Uninstall
179179
---------

etc/tests/simulation.digests.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Simulation output check sums (md5)
22

33
file1 :
4-
name : "unique_sites.simulation.csv"
5-
path : "analysis/simulation/output/unique_sites.simulation.csv.gz"
6-
md5 : "c4cd8f98201fe8dd613f4eab9287cc78"
7-
8-
file2 :
94
name : "incorp_sites.simulation.rds"
105
path : "analysis/simulation/output/incorp_sites.simulation.rds"
11-
md5 : "1c92defd2037daf5ad540157ff523663"
6+
md5 : "dbfc152e8e3ee129c11ab953ed8aa9de"
7+
8+
file2 :
9+
name : "stats.core.simulation.csv"
10+
path : "analysis/simulation/output/stats.core.simulation.csv"
11+
md5 : "b593a0e58c97f48a5b367184bd440ad3"
1212

1313
file3 :
14-
name : "stats.simulation.csv"
15-
path : "analysis/simulation/output/stats.simulation.csv"
16-
md5 : "c3f087be1a092d1d7dfce053936fb238"
14+
name : "stats.eval.simulation.csv"
15+
path : "analysis/simulation/output/stats.eval.simulation.csv"
16+
md5 : "57158a4826685a8024b3281284ac42b6"

etc/tests/test.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ conda activate ${__IGUIDE_ENV}
1515
# Create test analysis directory
1616
iguide setup configs/simulation.config.yml
1717

18-
# Generate test DAG graph
18+
# Generate test DAG graph and run
1919
iguide run configs/simulation.config.yml -- -np
2020

2121
iguide run configs/simulation.config.yml -- --dag --nolock | dot -Tsvg > \
2222
analysis/simulation/reports/simulation.dag.svg
2323

24-
iguide run configs/simulation.config.yml -- -p -w 30 --nolock --cores ${__CORES}
24+
iguide run configs/simulation.config.yml -- -p -w 30 --notemp --nolock --cores ${__CORES}
2525

26+
# Evaluate and report out using a different metadata set
2627
iguide eval configs/simulation.config.yml \
2728
-o analysis/simulation/reports/iguide.eval.simulation.test.rds \
2829
-s sampleInfo/simulation.supp.csv

rules/arch.rules

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Architecture Rules
33
# Related to setting up analysis directories and consolidating data
44

5-
rule generate_stat_matrix:
5+
rule core_stat_matrix:
66
input:
77
demulti=RUN_DIR + "/process_data/" + RUN + ".demulti.stat",
88
trimR1=expand(
@@ -22,22 +22,29 @@ rule generate_stat_matrix:
2222
RUN_DIR + "/process_data/{sample}.align.stat", sample=SAMPLES),
2323
assim=RUN_DIR + "/process_data/" + RUN + ".assim.stat"
2424
output:
25-
RUN_DIR + "/output/stats." + RUN + ".csv"
25+
RUN_DIR + "/output/stats.core." + RUN + ".csv"
2626
params:
27-
dir=RUN_DIR + "/process_data",
2827
tool=ROOT_DIR + "/tools/rscripts/collect_stats.R"
2928
resources:
3029
mem_mb = lambda wildcards, attempt: attempt * config["defaultMB"]
31-
shell:
32-
"""
33-
Rscript {params.tool} {params.dir} -o {output}
34-
"""
30+
shell: "Rscript {params.tool} {input} -o {output}"
31+
32+
rule eval_stat_matrix:
33+
input: RUN_DIR + "/process_data/" + RUN + ".eval.stat"
34+
output: RUN_DIR + "/output/stats.eval." + RUN + ".csv"
35+
params:
36+
tool=ROOT_DIR + "/tools/rscripts/collect_stats.R"
37+
resources:
38+
mem_mb = lambda wildcards, attempt: attempt * config["defaultMB"]
39+
shell: "Rscript {params.tool} {input} -o {output}"
3540

3641
rule gen_stat_report:
37-
input: RUN_DIR + "/output/stats." + RUN + ".csv"
42+
input:
43+
core = RUN_DIR + "/output/stats.core." + RUN + ".csv",
44+
eval = RUN_DIR + "/output/stats.eval." + RUN + ".csv"
3845
output: RUN_DIR + "/reports/runstats." + RUN + ".html"
3946
params:
40-
tool = ROOT_DIR + "/tools/rscripts/write_stat_report.R",
47+
tool = ROOT_DIR + "/tools/rscripts/generate_stat_report.R",
4148
config = RUN_DIR + "/" + "config.yml"
4249
log: RUN_DIR + "/logs/" + RUN + ".runstats.log"
4350
resources:

rules/consol.rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ rule consolidate:
1717
shell:
1818
"""
1919
Rscript {params.tool} {input} -o {output.consol} -k {output.key} \
20-
--stat {output.stat} > {log} 2>&1
20+
--stat {output.stat} > {log} 2>&1
2121
"""
2222

0 commit comments

Comments
 (0)