Skip to content

Commit 6306e0a

Browse files
authored
Merge pull request #19 from jlab/add_ns_suppl_blocks
nature styleguide requires reporting n's for all figures
2 parents 258d7ef + 967b098 commit 6306e0a

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

‎plotting/plot_include_orb.py‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,7 @@ def plot_block_correlation(
10341034
assemblers = settings["labels"]["assemblers"]
10351035
# 'Mann-Whitney', 't-test_ind', 'Wilcoxon'
10361036

1037+
block_colors = {"recovered": "lightgreen", "missed": "#dddddd"}
10371038
for i, environment in tqdm(enumerate(environments), disable=not verbose, desc=f"Drawing panels for {field} plot"):
10381039
ax = axes[i]
10391040
plotdata = data_block_recovery[environment]
@@ -1050,7 +1051,7 @@ def plot_block_correlation(
10501051
x=field,
10511052
hue="category",
10521053
ax=ax,
1053-
palette={"recovered": "lightgreen", "missed": "#dddddd"},
1054+
palette=block_colors,
10541055
showfliers=False,
10551056
hue_order=hue_order,
10561057
order=ordered_assembler,
@@ -1080,6 +1081,19 @@ def plot_block_correlation(
10801081
fontweight="bold",
10811082
)
10821083

1084+
ns = plotdata.groupby(["assembler", "category"]).size()
1085+
ax_ns = ax.twinx()
1086+
ax_ns.set_ylim(ax.get_ylim())
1087+
ns_labels = []
1088+
ns_colors = []
1089+
for ass_label in ordered_assembler:
1090+
for cat in hue_order:
1091+
ns_labels.append(f"n={ns.loc[ass_label, cat]:,}")
1092+
ns_colors.append({"lightgreen": "darkgreen", "#dddddd": "darkgray"}.get(block_colors[cat]))
1093+
ax_ns.set_yticks([x + offset for x in ax.get_yticks() for offset in [-0.2, 0.2]], labels=ns_labels, fontsize=8)
1094+
for color, label in zip(ns_colors, ax_ns.get_yticklabels()):
1095+
label.set_color(color)
1096+
10831097
if test is not None:
10841098
annotator = Annotator(
10851099
ax,
@@ -1128,6 +1142,7 @@ def plot_block_correlation(
11281142
[0, 100, 200, 300, 400, 500, 1000, 2000, 3000],
11291143
labels=["0", "", "", "", "", "500", "1000", "2000", "3000"],
11301144
)
1145+
11311146
return fig
11321147

11331148

‎test_nextflow.config‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,11 @@ process {
1515
clusterOptions = '' // --exclude=rs700-bcf-5.intra //rs700-bcf-1.intra,rs700-bcf-4.intra
1616

1717
beforeScript = """
18-
var=/var/scratch/\$USER/process_tmp_\$(date +%s%N)\$RANDOM
19-
echo $USER >> log.txt
20-
echo \$var > podman_dir.txt
21-
mkdir -p \$var/podman
22-
#podman system reset -f
23-
#podman system migrate
24-
export XDG_RUNTIME_DIR=\$var/podman
25-
export TMPDIR=\$var
2618
export http_proxy=http://192.168.10.1:3128
2719
export https_proxy=http://192.168.10.1:3128
2820
export ftp_proxy=http://192.168.10.1:3128
2921
"""
3022

31-
afterScript = """
32-
var=\$(cat podman_dir.txt)
33-
echo \$var
34-
rm -rf \$var
35-
"""
36-
37-
3823
withName: SALMON_QUANT {
3924
memory = '32G'
4025
cpus = 32

0 commit comments

Comments
 (0)