Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
ZARP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
zavolan_group
pipelines
ZARP
Commits
a0babc83
Commit
a0babc83
authored
5 years ago
by
BIOPZ-Bak Maciej
Browse files
Options
Downloads
Patches
Plain Diff
add TIN score merge and plot steps
parent
9f2e0a67
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!43
add TIN score merge and plot steps
Pipeline
#10457
passed
5 years ago
Stage: test
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Snakefile
+104
-12
104 additions, 12 deletions
Snakefile
images/rule_graph.svg
+218
-198
218 additions, 198 deletions
images/rule_graph.svg
tests/input_files/cluster.json
+12
-0
12 additions, 0 deletions
tests/input_files/cluster.json
with
334 additions
and
210 deletions
Snakefile
+
104
−
12
View file @
a0babc83
...
...
@@ -64,17 +64,12 @@ rule finish:
sample=[i for i in list(samples_table.index.values)],
seqmode=[samples_table.loc[i, 'seqmode']
for i in list(samples_table.index.values)]),
TIN_score = expand(
os.path.join(
config['output_dir'],
"{seqmode}",
"{sample}",
"TIN",
"TIN_score.tsv"),
zip,
sample=[i for i in list(samples_table.index.values)],
seqmode=[samples_table.loc[i, 'seqmode']
for i in list(samples_table.index.values)]),
TIN_boxplot_PNG = os.path.join(
config['output_dir'],
"TIN_scores_boxplot.png"),
TIN_boxplot_PDF = os.path.join(
config['output_dir'],
"TIN_scores_boxplot.pdf"),
salmon_merge_genes = expand(
os.path.join(
config["output_dir"],
...
...
@@ -483,7 +478,7 @@ rule calculate_TIN_scores:
threads: 8
singularity:
"docker://zavolab/tin_score_calculation:0.
1
.0-slim"
"docker://zavolab/tin_score_calculation:0.
2
.0-slim"
shell:
"(tin_score_calculation.py \
...
...
@@ -494,6 +489,103 @@ rule calculate_TIN_scores:
-n 100 > {output.TIN_score};) 2> {log.stderr}"
rule merge_TIN_scores:
"""
Merge TIN scores tables
"""
input:
TIN_score = expand(
os.path.join(
config['output_dir'],
"{seqmode}",
"{sample}",
"TIN",
"TIN_score.tsv"),
zip,
sample=[i for i in list(samples_table.index.values)],
seqmode=[samples_table.loc[i, 'seqmode']
for i in list(samples_table.index.values)])
output:
TIN_scores_merged = os.path.join(
config['output_dir'],
"TIN_scores_merged.tsv")
params:
TIN_score_merged_paths = ",".join(expand(
os.path.join(
config['output_dir'],
"{seqmode}",
"{sample}",
"TIN",
"TIN_score.tsv"),
zip,
sample=[i for i in list(samples_table.index.values)],
seqmode=[samples_table.loc[i, 'seqmode']
for i in list(samples_table.index.values)]))
log:
stderr = os.path.join(
config['log_dir'],
"merge_TIN_scores.stderr.log"),
stdout = os.path.join(
config["log_dir"],
"merge_TIN_scores.stdout.log")
threads: 1
singularity:
"docker://zavolab/tin_score_calculation:0.2.0-slim"
shell:
"(tin_score_merge.py \
--input-files {params.TIN_score_merged_paths} \
--output-file {output.TIN_scores_merged}) \
1> {log.stdout} 2> {log.stderr}"
rule plot_TIN_scores:
"""
Generate TIN scores boxplots
"""
input:
TIN_scores_merged = os.path.join(
config['output_dir'],
"TIN_scores_merged.tsv"),
output:
TIN_boxplot_PNG = os.path.join(
config['output_dir'],
"TIN_scores_boxplot.png"),
TIN_boxplot_PDF = os.path.join(
config['output_dir'],
"TIN_scores_boxplot.pdf")
params:
TIN_boxplot_prefix = os.path.join(
config['output_dir'],
"TIN_scores_boxplot")
log:
stderr = os.path.join(
config['log_dir'],
"plot_TIN_scores.stderr.log"),
stdout = os.path.join(
config["log_dir"],
"plot_TIN_scores.stdout.log")
threads: 1
singularity:
"docker://zavolab/tin_score_calculation:0.2.0-slim"
shell:
"(tin_score_plot.py \
--input-file {input.TIN_scores_merged} \
--output-file-prefix {params.TIN_boxplot_prefix}) \
1> {log.stdout} 2> {log.stderr}"
rule salmon_quantmerge_genes:
'''
Merge gene quantifications into a single file
...
...
This diff is collapsed.
Click to expand it.
images/rule_graph.svg
+
218
−
198
View file @
a0babc83
This diff is collapsed.
Click to expand it.
tests/input_files/cluster.json
+
12
−
0
View file @
a0babc83
...
...
@@ -43,5 +43,17 @@
"time"
:
"06:00:00"
,
"threads"
:
"8"
,
"mem"
:
"32G"
},
"merge_TIN_scores"
:
{
"time"
:
"00:05:00"
,
"threads"
:
"1"
,
"mem"
:
"4G"
},
"plot_TIN_scores"
:
{
"time"
:
"00:05:00"
,
"threads"
:
"1"
,
"mem"
:
"4G"
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment