From 579c95d6e322dc1ea89eab4bd19a376ef25f3ae6 Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sat, 2 Jan 2021 11:07:26 -0500
Subject: [PATCH 01/23] properly specify config overrides in tests

(needs multiple args to --config, not multiple instances of --config)
---
 .circleci/config.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.circleci/config.yml b/.circleci/config.yml
index 9b5d5b8f..3d4670a0 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -153,7 +153,7 @@ variables:
           ./run_test.sh --use-conda -j2 -k -p -r \
             --configfile $ORIG/test/test_configs/test_chipseq_regression.yaml \
             --config sampletable=$ORIG/test/test_configs/chipseq_one_run.tsv \
-            --config merged_bigwigs="{}" \
+            merged_bigwigs="{}" \
             --until bed_to_bigbed
 
           # Piggy-backing on that test, here we check to make sure it's OK to
@@ -161,7 +161,7 @@ variables:
           ./run_test.sh -n \
             --configfile $ORIG/test/test_configs/test_chipseq_no_peaks.yaml \
             --config sampletable=$ORIG/test/test_configs/chipseq_one_run.tsv \
-            --config merged_bigwigs="{}" \
+            merged_bigwigs="{}" \
             --until bed_to_bigbed
 
   # --------------------------------------------------------------------------

From 07f9583baf0b1ab094cf092589f8a96a076a5145 Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sat, 2 Jan 2021 11:08:16 -0500
Subject: [PATCH 02/23] better error message for chipseq configs, fixes #243

---
 lib/common.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/common.py b/lib/common.py
index 921414a4..a1462267 100644
--- a/lib/common.py
+++ b/lib/common.py
@@ -589,10 +589,10 @@ def get_techreps(sampletable, label):
 
     is_chipseq = 'antibody' in sampletable.columns
     if is_chipseq:
-        err = (
-            "No technical replicates found for label '{}'. This looks to "
-            "be a ChIP-seq experiment; check the peak-calling section of"
-            "the config.".format(label)
+        err = ("""
+        No technical replicates found for label '{}'. Check the ChIP-seq config
+        file to ensure the peak-calling section only specifies values from the
+        sampletable's "label" column.""".format(label)
         )
     else:
         err = "No technical replicates found for label '{}'.".format(label)

From 4d3d15cb0cca75b2a1e8d5d3e32e3375a3874754 Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sat, 2 Jan 2021 11:10:40 -0500
Subject: [PATCH 03/23] use ConfigurationError exception class

---
 lib/helpers.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/helpers.py b/lib/helpers.py
index f76f2a22..397d8f65 100644
--- a/lib/helpers.py
+++ b/lib/helpers.py
@@ -6,6 +6,9 @@
 from snakemake.io import expand, regex
 from lib import common
 
+class ConfigurationError(Exception):
+    pass
+
 
 def detect_layout(sampletable):
     """
@@ -144,7 +147,7 @@ def check_unique_samplename(df):
     """
     ns = df.index
     if len(ns.unique()) < len(ns):
-        raise ValueError('Samplenames non unique, check the sampletable\n')
+        raise ConfigurationError('Samplenames non unique, check the sampletable\n')
 
 def preflight(config):
     """

From bc24eeb2a13d8fb708dc26c66a12a50d84a43c5f Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sat, 2 Jan 2021 11:11:07 -0500
Subject: [PATCH 04/23] preflight() only cares that first column contains ids

(rather than requiring column name)
---
 lib/helpers.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/helpers.py b/lib/helpers.py
index 397d8f65..d490e71e 100644
--- a/lib/helpers.py
+++ b/lib/helpers.py
@@ -157,7 +157,7 @@ def preflight(config):
     ----------
     config: yaml config object
     """
-    sampletable = pd.read_table(config['sampletable'], index_col='samplename', comment='#')
+    sampletable = pd.read_table(config['sampletable'], index_col=0, comment='#')
     check_unique_samplename(sampletable)
     if 'orig_filename' in sampletable.columns:
         check_unique_fn(sampletable)

From 537d281f466669eee01c08ee7f4f9f44c0a584b0 Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sat, 2 Jan 2021 11:12:26 -0500
Subject: [PATCH 05/23] back to checking if --configfile provided

This allow the complex ChIP-seq to run; otherwise the merged_bigwigs key
would be *updated* rather than replaced. Not sure I fully understand it
without digging through the Snakemake code, but empiricially this is
working now
---
 workflows/chipseq/Snakefile | 7 +++----
 workflows/rnaseq/Snakefile  | 4 ++--
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/workflows/chipseq/Snakefile b/workflows/chipseq/Snakefile
index 21abb1f7..5eb03d90 100644
--- a/workflows/chipseq/Snakefile
+++ b/workflows/chipseq/Snakefile
@@ -17,7 +17,8 @@ from lib.patterns_targets import ChIPSeqConfig
 #
 # ----------------------------------------------------------------------------
 
-configfile: 'config/config.yaml'
+if not workflow.overwrite_configfiles:
+    configfile: 'config/config.yaml'
 
 config = common.load_config(config)
 
@@ -50,8 +51,6 @@ def wrapper_for(path):
     return 'file:' + os.path.join('../..','wrappers', 'wrappers', path)
 
 
-
-
 # ----------------------------------------------------------------------------
 # RULES
 # ----------------------------------------------------------------------------
@@ -75,7 +74,7 @@ final_targets = utils.flatten((
     utils.flatten(c.targets['plotcorrelation']),
 ))
 
-if 'merged_bigwigs' in config:
+if config.get('merged_bigwigs', None):
     final_targets.extend(utils.flatten(c.targets['merged_bigwig']))
 
 
diff --git a/workflows/rnaseq/Snakefile b/workflows/rnaseq/Snakefile
index a006798d..11ba3e03 100644
--- a/workflows/rnaseq/Snakefile
+++ b/workflows/rnaseq/Snakefile
@@ -16,8 +16,8 @@ from lib.patterns_targets import RNASeqConfig
 #
 # ----------------------------------------------------------------------------
 
-configfile: 'config/config.yaml'
-
+if not workflow.overwrite_configfiles:
+    configfile: 'config/config.yaml'
 
 config = common.load_config(config)
 

From 2e37deb65884ae8308ca377b9b159df19313fd1b Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sat, 2 Jan 2021 11:14:40 -0500
Subject: [PATCH 06/23] add config and sampletable for complex chipseq

---
 .../complex-dataset-chipseq-config.yaml       | 25 +++++++++++++++++++
 .../complex-dataset-chipseq-sampletable.tsv   | 20 +++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 test/test_configs/complex-dataset-chipseq-config.yaml
 create mode 100644 test/test_configs/complex-dataset-chipseq-sampletable.tsv

diff --git a/test/test_configs/complex-dataset-chipseq-config.yaml b/test/test_configs/complex-dataset-chipseq-config.yaml
new file mode 100644
index 00000000..e80f2726
--- /dev/null
+++ b/test/test_configs/complex-dataset-chipseq-config.yaml
@@ -0,0 +1,25 @@
+patterns: 'config/chipseq_patterns.yaml'
+organism: 'human'
+references_dir: 'references_data'
+
+aligner:
+  index: 'bowtie2'
+  tag: 'gencode-v28'
+
+rrna:
+  index: 'bowtie2'
+  tag: 'rRNA'
+
+fastq_screen:
+  - label: rRNA
+    organism: human
+    tag: rRNA
+  - label: human
+    organism: human
+    tag: gencode-v28
+
+merged_bigwigs: {}
+chipseq: {}
+
+include_references:
+  - '../../include/reference_configs/Homo_sapiens.yaml'
diff --git a/test/test_configs/complex-dataset-chipseq-sampletable.tsv b/test/test_configs/complex-dataset-chipseq-sampletable.tsv
new file mode 100644
index 00000000..a193ded7
--- /dev/null
+++ b/test/test_configs/complex-dataset-chipseq-sampletable.tsv
@@ -0,0 +1,20 @@
+sampleid	label	biological_material	antibody	Run	Assay Type	AvgSpotLen	Bases	BioProject	BioSample	Bytes	Experiment	GEO_Accession (exp)	Instrument	LibraryLayout	LibrarySelection	LibrarySource	Organism	Platform	ReleaseDate	Sample Name	SAMPLE_TYPE	source_name	SRA Study	Cell_Line	Treatment
+BRD4-dBET6-1	BRD4-dBET6-1	dBET6-1	BRD4	SRR6202977	ChIP-Seq	51	2888699568	PRJNA415413	SAMN07822419	1088112015	SRX3312884	GSM2828225	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828225	cell line	ChIP-seq for BRD4 in HAP1 cell line treated with dBET6	SRP120974	HAP1	dBET6
+BRD4-dBET6-2	BRD4-dBET6-2	dBET6-2	BRD4	SRR6202978	ChIP-Seq	51	2817455985	PRJNA415413	SAMN07822418	1073353111	SRX3312885	GSM2828226	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828226	cell line	ChIP-seq for BRD4 in HAP1 cell line treated with dBET6	SRP120974	HAP1	dBET6
+BRD4-DMSO-1	BRD4-DMSO-1	DMSO-1	BRD4	SRR6202979	ChIP-Seq	51	2649558426	PRJNA415413	SAMN07822417	1004127474	SRX3312886	GSM2828227	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828227	cell line	ChIP-seq for BRD4 in HAP1 cell line treated with DMSO	SRP120974	HAP1	DMSO
+BRD4-DMSO-2	BRD4-DMSO-2	DMSO-2	IgG	SRR6202980	ChIP-Seq	51	2331669408	PRJNA415413	SAMN07822416	883284565	SRX3312887	GSM2828228	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828228	cell line	ChIP-seq for BRD4 in HAP1 cell line treated with DMSO	SRP120974	HAP1	DMSO
+IgG-dBET6-1	IgG-dBET6-1	dBET6-1	IgG	SRR6202981	ChIP-Seq	51	2582802180	PRJNA415413	SAMN07822415	976901766	SRX3312888	GSM2828229	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828229	cell line	ChIP-seq with mock IgG antibody in HAP1 cell line treated with dBET6	SRP120974	HAP1	dBET6
+IgG-dBET6-2	IgG-dBET6-2	dBET6-2	IgG	SRR6202982	ChIP-Seq	51	2518887450	PRJNA415413	SAMN07822414	957269285	SRX3312889	GSM2828230	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828230	cell line	ChIP-seq with mock IgG antibody in HAP1 cell line treated with dBET6	SRP120974	HAP1	dBET6
+IgG-DMSO-1	IgG-DMSO-1	DMSO-1	IgG	SRR6202983	ChIP-Seq	51	2936252988	PRJNA415413	SAMN07822413	1105389590	SRX3312890	GSM2828231	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828231	cell line	ChIP-seq with mock IgG antibody in HAP1 cell line treated with DMSO	SRP120974	HAP1	DMSO
+IgG-DMSO-2	IgG-DMSO-2	DMSO-2	IgG	SRR6202984	ChIP-Seq	51	2668375233	PRJNA415413	SAMN07822412	1008987333	SRX3312891	GSM2828232	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828232	cell line	ChIP-seq with mock IgG antibody in HAP1 cell line treated with DMSO	SRP120974	HAP1	DMSO
+input-dBET6-1	input-dBET6-1	dBET6-1	input	SRR6202985	ChIP-Seq	51	1655658441	PRJNA415413	SAMN07822411	624046569	SRX3312892	GSM2828233	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828233	cell line	ChIP-seq for Input in HAP1 cell line treated with dBET6	SRP120974	HAP1	dBET6
+input-dBET6-2	input-dBET6-2	dBET6-2	input	SRR6202986	ChIP-Seq	51	1696489653	PRJNA415413	SAMN07822410	643171472	SRX3312893	GSM2828234	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828234	cell line	ChIP-seq for Input in HAP1 cell line treated with dBET6	SRP120974	HAP1	dBET6
+input-DMSO-1	input-DMSO-1	DMSO-1	input	SRR6202987	ChIP-Seq	51	1594794837	PRJNA415413	SAMN07822409	600198413	SRX3312894	GSM2828235	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828235	cell line	ChIP-seq for Input in HAP1 cell line treated with DMSO	SRP120974	HAP1	DMSO
+input-DMSO-2	input-DMSO-2	DMSO-2	input	SRR6202988	ChIP-Seq	51	1832520474	PRJNA415413	SAMN07822408	699204870	SRX3312895	GSM2828236	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828236	cell line	ChIP-seq for Input in HAP1 cell line treated with DMSO	SRP120974	HAP1	DMSO
+MTHFD1-dBET6-1	MTHFD1-dBET6-1	dBET6-1	MTHFD1	SRR6202989	ChIP-Seq	51	2369093667	PRJNA415413	SAMN07822407	901959099	SRX3312896	GSM2828237	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828237	cell line	ChIP-seq for MTHFD1 in HAP1 cell line treated with dBET6	SRP120974	HAP1	dBET6
+MTHFD1-dBET6-2	MTHFD1-dBET6-2	dBET6-2	MTHFD1	SRR6202990	ChIP-Seq	51	1982794218	PRJNA415413	SAMN07822406	755171006	SRX3312897	GSM2828238	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828238	cell line	ChIP-seq for MTHFD1 in HAP1 cell line treated with dBET6	SRP120974	HAP1	dBET6
+MTHFD1-DMSO-1	MTHFD1-DMSO-1	DMSO-1	MTHFD1	SRR6202991	ChIP-Seq	51	2709781470	PRJNA415413	SAMN07822405	1024385435	SRX3312898	GSM2828239	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828239	cell line	ChIP-seq for MTHFD1 in HAP1 cell line treated with DMSO	SRP120974	HAP1	DMSO
+MTHFD1-DMSO-2	MTHFD1-DMSO-2	DMSO-2	MTHFD1	SRR6202992	ChIP-Seq	51	2468011278	PRJNA415413	SAMN07822404	938165043	SRX3312899	GSM2828240	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828240	cell line	ChIP-seq for MTHFD1 in HAP1 cell line treated with DMSO	SRP120974	HAP1	DMSO
+H3K27ac-untreated-1	H3K27ac-untreated-1	untreated-1	H3K27ac	SRR6202993	ChIP-Seq	61	1060781399	PRJNA415413	SAMN07822403	371528672	SRX3312900	GSM2828241	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828241	cell line	ChIP-seq for H3K27ac in HAP1 cell line	SRP120974	HAP1	
+H3K27ac-untreated-2	H3K27ac-untreated-2	untreated-2	H3K27ac	SRR6202994	ChIP-Seq	61	1468837056	PRJNA415413	SAMN07822402	575306586	SRX3312901	GSM2828242	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828242	cell line	ChIP-seq for H3K27ac in HAP1 cell line	SRP120974	HAP1	
+IgG-untreated1	IgG-untreated1	untreated-1	IgG	SRR6202995	ChIP-Seq	61	1360415717	PRJNA415413	SAMN07822401	516746459	SRX3312902	GSM2828243	Illumina HiSeq 4000	SINGLE	ChIP	GENOMIC	Homo sapiens	ILLUMINA	2019-04-04T00:00:00Z	GSM2828243	cell line	ChIP-seq with mock IgG antibody in HAP1 cell line	SRP120974	HAP1	

From 2d466b023f717f4e68819bac1abf0cb9f9db4d12 Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sat, 2 Jan 2021 11:15:01 -0500
Subject: [PATCH 07/23] add driver scripts for complex rnaseq and chipseq

---
 workflows/chipseq/run_complex_test.sh | 6 ++++++
 workflows/rnaseq/run_complex_test.sh  | 5 +++++
 2 files changed, 11 insertions(+)
 create mode 100755 workflows/chipseq/run_complex_test.sh
 create mode 100755 workflows/rnaseq/run_complex_test.sh

diff --git a/workflows/chipseq/run_complex_test.sh b/workflows/chipseq/run_complex_test.sh
new file mode 100755
index 00000000..0d5fe3c1
--- /dev/null
+++ b/workflows/chipseq/run_complex_test.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+snakemake \
+    --configfile ../../test/test_configs/complex-dataset-chipseq-config.yaml \
+    --config \
+      sampletable=../../test/test_configs/complex-dataset-chipseq-sampletable.tsv \
+    "$@"
diff --git a/workflows/rnaseq/run_complex_test.sh b/workflows/rnaseq/run_complex_test.sh
new file mode 100755
index 00000000..966e4139
--- /dev/null
+++ b/workflows/rnaseq/run_complex_test.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+snakemake \
+    --configfile ../../test/test_configs/complex-dataset-rnaseq-config.yaml \
+    --config sampletable=../../test/test_configs/complex-dataset-rnaseq-sampletable.tsv merged_bigwigs="{}" \
+    "$@"

From 452994ed781090f8b3a40c48aac844216ca832e4 Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sat, 2 Jan 2021 11:36:05 -0500
Subject: [PATCH 08/23] localrules symlinks only if symlinks rule is created

---
 workflows/chipseq/Snakefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/workflows/chipseq/Snakefile b/workflows/chipseq/Snakefile
index 5eb03d90..3206595c 100644
--- a/workflows/chipseq/Snakefile
+++ b/workflows/chipseq/Snakefile
@@ -44,7 +44,6 @@ wildcard_constraints:
     n = '[1,2]',
     sample = '|'.join(SAMPLES)
 
-localrules: symlinks
 
 
 def wrapper_for(path):
@@ -93,6 +92,8 @@ rule targets:
 
 if 'orig_filename' in c.sampletable.columns:
 
+    localrules: symlinks
+
     # Convert the sampletable to be indexed by the first column, for
     # convenience in generating the input/output filenames.
     _st = c.sampletable.set_index(c.sampletable.columns[0])

From 21821e18d44ea6173ae4b838f2a029caa3a35e6a Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sat, 2 Jan 2021 11:40:14 -0500
Subject: [PATCH 09/23] send fastq-dump output to log (rnaseq and chipseq)

---
 workflows/chipseq/Snakefile | 7 +++++--
 workflows/rnaseq/Snakefile  | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/workflows/chipseq/Snakefile b/workflows/chipseq/Snakefile
index 3206595c..a42e0b7a 100644
--- a/workflows/chipseq/Snakefile
+++ b/workflows/chipseq/Snakefile
@@ -117,7 +117,6 @@ if 'orig_filename' in c.sampletable.columns:
         output:
             render_r1_r2(c.patterns['fastq'])
         run:
-
             assert len(output) == len(input), (input, output)
             for src, linkname in zip(input, output):
                 utils.make_relative_symlink(src, linkname)
@@ -136,6 +135,9 @@ if 'Run' in c.sampletable.columns and sum(c.sampletable['Run'].str.startswith('S
     rule fastq_dump:
         output:
             fastq=render_r1_r2(c.patterns['fastq'])
+
+        log:
+            r1_only(c.patterns['fastq'])[0] + '.log'
         run:
             srr = _st.loc[wildcards.sample, 'Run']
 
@@ -151,6 +153,7 @@ if 'Run' in c.sampletable.columns and sum(c.sampletable['Run'].str.startswith('S
                     '--gzip '
                     '--split-files '
                     # '-X 100000 ' # [TEST SETTINGS]
+                    '&> {log}'
                 )
 
                 # The filenames are predictable, so we can move them as needed.
@@ -165,7 +168,7 @@ if 'Run' in c.sampletable.columns and sum(c.sampletable['Run'].str.startswith('S
                     '{srr} '
                     '-Z '
                     # '-X 100000 ' # [TEST SETTINGS]
-                    '| gzip -c > {output[0]}.tmp '
+                    '2> {log} | gzip -c > {output[0]}.tmp '
                     '&& mv {output[0]}.tmp {output[0]} '
                 )
 
diff --git a/workflows/rnaseq/Snakefile b/workflows/rnaseq/Snakefile
index 11ba3e03..1f48880e 100644
--- a/workflows/rnaseq/Snakefile
+++ b/workflows/rnaseq/Snakefile
@@ -109,7 +109,6 @@ if 'orig_filename' in c.sampletable.columns:
         output:
             render_r1_r2(c.patterns['fastq'])
         run:
-
             assert len(output) == len(input), (input, output)
             for src, linkname in zip(input, output):
                 utils.make_relative_symlink(src, linkname)
@@ -128,6 +127,9 @@ if 'Run' in c.sampletable.columns and sum(c.sampletable['Run'].str.startswith('S
     rule fastq_dump:
         output:
             fastq=render_r1_r2(c.patterns['fastq'])
+
+        log:
+            r1_only(c.patterns['fastq'])[0] + '.log'
         run:
             srr = _st.loc[wildcards.sample, 'Run']
 
@@ -143,6 +145,7 @@ if 'Run' in c.sampletable.columns and sum(c.sampletable['Run'].str.startswith('S
                     '--gzip '
                     '--split-files '
                     # '-X 100000 ' # [TEST SETTINGS]
+                    '&> {log}'
                 )
 
                 # The filenames are predictable, so we can move them as needed.
@@ -157,7 +160,7 @@ if 'Run' in c.sampletable.columns and sum(c.sampletable['Run'].str.startswith('S
                     '{srr} '
                     '-Z '
                     # '-X 100000 ' # [TEST SETTINGS]
-                    '| gzip -c > {output[0]}.tmp '
+                    '2> {log} | gzip -c > {output[0]}.tmp '
                     '&& mv {output[0]}.tmp {output[0]} '
                 )
 

From c250eaf21adc7908ba06ddf94d36506d968e153b Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sat, 2 Jan 2021 11:44:32 -0500
Subject: [PATCH 10/23] use multiple cores for cutadapt in SE mode

---
 workflows/chipseq/Snakefile | 1 +
 workflows/rnaseq/Snakefile  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/workflows/chipseq/Snakefile b/workflows/chipseq/Snakefile
index a42e0b7a..94845745 100644
--- a/workflows/chipseq/Snakefile
+++ b/workflows/chipseq/Snakefile
@@ -207,6 +207,7 @@ rule cutadapt:
                 "-o {output[0]} "
                 "-a AGATCGGAAGAGCACACGTCTGAACTCCAGTCA "
                 '-q 20 '
+                '-j {threads} '
                 '--minimum-length 25 '
                 "{input.fastq[0]} "
                 "&> {log}"
diff --git a/workflows/rnaseq/Snakefile b/workflows/rnaseq/Snakefile
index 1f48880e..79d40529 100644
--- a/workflows/rnaseq/Snakefile
+++ b/workflows/rnaseq/Snakefile
@@ -257,6 +257,7 @@ rule cutadapt:
                 "-o {output[0]} "
                 "-a AGATCGGAAGAGCACACGTCTGAACTCCAGTCA "
                 '-q 20 '
+                '-j {threads} '
                 '--minimum-length 25 '
                 "{input.fastq[0]} "
                 "&> {log}"

From 953006ad8d320a1a0df18e015d514f5354a0c830 Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sat, 2 Jan 2021 11:51:27 -0500
Subject: [PATCH 11/23] use multiple threads for fastqc

---
 workflows/chipseq/Snakefile | 5 ++++-
 workflows/rnaseq/Snakefile  | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/workflows/chipseq/Snakefile b/workflows/chipseq/Snakefile
index 94845745..d8ce4d0c 100644
--- a/workflows/chipseq/Snakefile
+++ b/workflows/chipseq/Snakefile
@@ -218,7 +218,10 @@ rule fastqc:
     """
     Run FastQC
     """
-    input: '{sample_dir}/{sample}/{sample}{suffix}'
+    input:
+        '{sample_dir}/{sample}/{sample}{suffix}'
+    threads:
+        6
     output:
         html='{sample_dir}/{sample}/fastqc/{sample}{suffix}_fastqc.html',
         zip='{sample_dir}/{sample}/fastqc/{sample}{suffix}_fastqc.zip',
diff --git a/workflows/rnaseq/Snakefile b/workflows/rnaseq/Snakefile
index 79d40529..a5be9a87 100644
--- a/workflows/rnaseq/Snakefile
+++ b/workflows/rnaseq/Snakefile
@@ -268,7 +268,10 @@ rule fastqc:
     """
     Run FastQC
     """
-    input: '{sample_dir}/{sample}/{sample}{suffix}'
+    input:
+        '{sample_dir}/{sample}/{sample}{suffix}'
+    threads:
+        6
     output:
         html='{sample_dir}/{sample}/fastqc/{sample}{suffix}_fastqc.html',
         zip='{sample_dir}/{sample}/fastqc/{sample}{suffix}_fastqc.zip',

From bcf77f6945d46391a1c555e3e56ebfb7b74c36f9 Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sat, 2 Jan 2021 20:55:48 -0500
Subject: [PATCH 12/23] make sure multibigwigsummary uses configured threads

---
 workflows/chipseq/Snakefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/workflows/chipseq/Snakefile b/workflows/chipseq/Snakefile
index d8ce4d0c..18d4826c 100644
--- a/workflows/chipseq/Snakefile
+++ b/workflows/chipseq/Snakefile
@@ -738,6 +738,7 @@ rule multibigwigsummary:
             'bins '
             '-b {input} '
             '--labels {labels} '
+            '--numberOfProcessors {threads} '
             '-out {output.npz} '
             '--outRawCounts {output.tab}'
         )

From 0b2ed876a761325263e3c289802abb5f2b0e726f Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sat, 2 Jan 2021 20:56:13 -0500
Subject: [PATCH 13/23] support fingerprint in cases where input is unavailable
 for some samples

---
 workflows/chipseq/Snakefile | 41 +++++++++++++++++++++----------------
 1 file changed, 23 insertions(+), 18 deletions(-)

diff --git a/workflows/chipseq/Snakefile b/workflows/chipseq/Snakefile
index 18d4826c..ca8bf1f6 100644
--- a/workflows/chipseq/Snakefile
+++ b/workflows/chipseq/Snakefile
@@ -567,24 +567,29 @@ rule fingerprint:
         metrics=c.patterns['fingerprint']['metrics']
     threads: 8
     log: c.patterns['fingerprint']['metrics'] + '.log'
-    shell:
-        'plotFingerprint '
-        '--bamfiles {input.bams} '
-        '-p {threads} '
-        # The JSDsample argument is disabled for testing as it dramatically
-        # increases the run time.
-        # [TEST SETTINGS +1]
-        '--JSDsample {input.control} '
-        '--smartLabels '
-        '--extendReads=300 '
-        '--skipZeros '
-        '--outQualityMetrics {output.metrics} '
-        '--outRawCounts {output.raw_counts} '
-        '--plotFile {output.plot} '
-        # Default is 500k; use fewer to speed up testing:
-        # '--numberOfSamples 50 '  # [TEST SETTINGS ]
-        '&> {log} '
-        '&& sed -i "s/NA/0.0/g" {output.metrics} '
+    run:
+        if len(input.control) == 0:
+            jsdsample_arg = ""
+        else:
+            jsdsample_arg = '--JSDsample {input.control}'
+        shell(
+            'plotFingerprint ' '--bamfiles {input.bams} '
+            '-p {threads} '
+            # The JSDsample argument is disabled for testing as it dramatically
+            # increases the run time.
+            # [TEST SETTINGS +1]
+            '{jsdsample_arg} '
+            '--smartLabels '
+            '--extendReads=300 '
+            '--skipZeros '
+            '--outQualityMetrics {output.metrics} '
+            '--outRawCounts {output.raw_counts} '
+            '--plotFile {output.plot} '
+            # Default is 500k; use fewer to speed up testing:
+            # '--numberOfSamples 50 '  # [TEST SETTINGS ]
+            '&> {log} '
+            '&& sed -i "s/NA/0.0/g" {output.metrics} '
+        )
 
 
 rule sicer:

From b2532242512ffd3f613879187b9dbf90b143682b Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sun, 3 Jan 2021 19:26:00 -0500
Subject: [PATCH 14/23] add peak-calling and bigwig merging to complex chipseq
 config

---
 .../complex-dataset-chipseq-config.yaml       | 76 ++++++++++++++++++-
 1 file changed, 74 insertions(+), 2 deletions(-)

diff --git a/test/test_configs/complex-dataset-chipseq-config.yaml b/test/test_configs/complex-dataset-chipseq-config.yaml
index e80f2726..61406e94 100644
--- a/test/test_configs/complex-dataset-chipseq-config.yaml
+++ b/test/test_configs/complex-dataset-chipseq-config.yaml
@@ -18,8 +18,80 @@ fastq_screen:
     organism: human
     tag: gencode-v28
 
-merged_bigwigs: {}
-chipseq: {}
+merged_bigwigs:
+  BRD4-dBET6:
+    - BRD4-dBET6-1
+    - BRD4-dBET6-2
+  BRD4-DMSO:
+    - BRD4-DMSO-1
+    - BRD4-DMSO-2
+  IgG-dBET6:
+    - IgG-dBET6-1
+    - IgG-dBET6-2
+  IgG-DMSO:
+    - IgG-DMSO-1
+    - IgG-DMSO-2
+  MTHFD1-dBET6:
+    - MTHFD1-dBET6-1
+    - MTHFD1-dBET6-2
+  MTHFD1-DMSO:
+    - MTHFD1-DMSO-1
+    - MTHFD1-DMSO-2
+  H3K27ac:
+    - H3K27ac-untreated-1
+    - H3K27ac-untreated-2
+
+chipseq:
+  peak_calling:
+    - label: BRD4-dBET6-1
+      algorithm: macs2
+      ip:
+        - BRD4-dBET6-1
+      control:
+        - input-dBET6-1
+    - label: BRD4-dBET6-2
+      algorithm: macs2
+      ip:
+        - BRD4-dBET6-2
+      control:
+        - input-dBET6-2
+    - label: BRD4-DMSO-1
+      algorithm: macs2
+      ip:
+        - BRD4-DMSO-1
+      control:
+        - input-DMSO-1
+    - label: BRD4-DMSO-2
+      algorithm: macs2
+      ip:
+        - BRD4-DMSO-2
+      control:
+        - input-DMSO-2
+    - label: MTHFD1-dBET6-1
+      algorithm: macs2
+      ip:
+        - MTHFD1-dBET6-1
+      control:
+        - input-dBET6-1
+    - label: MTHFD1-dBET6-2
+      algorithm: macs2
+      ip:
+        - MTHFD1-dBET6-2
+      control:
+        - input-dBET6-2
+    - label: MTHFD1-DMSO-1
+      algorithm: macs2
+      ip:
+        - MTHFD1-DMSO-1
+      control:
+        - input-DMSO-1
+    - label: MTHFD1-DMSO-2
+      algorithm: macs2
+      ip:
+        - MTHFD1-DMSO-2
+      control:
+        - input-DMSO-2
+
 
 include_references:
   - '../../include/reference_configs/Homo_sapiens.yaml'

From 28356ba42c6cbadf8a41b7081b46a86e68bf01cd Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sun, 3 Jan 2021 19:26:34 -0500
Subject: [PATCH 15/23] redirect to logs for merge bigwig output

---
 wrappers/wrappers/average-bigwigs/wrapper.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/wrappers/wrappers/average-bigwigs/wrapper.py b/wrappers/wrappers/average-bigwigs/wrapper.py
index a191fc30..94be840a 100644
--- a/wrappers/wrappers/average-bigwigs/wrapper.py
+++ b/wrappers/wrappers/average-bigwigs/wrapper.py
@@ -11,8 +11,6 @@
 else:
     mem_arg = ''
 
-log = snakemake.log_fmt_shell()
-
 if len(snakemake.input.bigwigs) == 1:
     utils.make_relative_symlink(snakemake.input.bigwigs[0], snakemake.output[0])
 
@@ -26,9 +24,9 @@
 
     shell(
         'export LC_ALL=C; '
-        'bigWigMerge {snakemake.input.bigwigs} stdout '
+        'bigWigMerge {snakemake.input.bigwigs} stdout 2> {snakemake.log} '
         """| awk 'BEGIN{{OFS="\t"}}{{$4={f}*$4; print}}' """
         '| sort {mem_arg} -T {tmpdir} -k1,1 -k2,2n > {tmp} '
         '&& bedGraphToBigWig {tmp} {snakemake.input.chromsizes} '
-        '{snakemake.output} {log}'
+        '{snakemake.output} &>> {snakemake.log}'
     )

From fc87b8463f046c99baa8a3c5a3abcbe51d600d00 Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sun, 4 Apr 2021 14:15:44 -0400
Subject: [PATCH 16/23] fix configfile overrides in tests

---
 .circleci/config.yml | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/.circleci/config.yml b/.circleci/config.yml
index 25b37dcf..550d88c8 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -218,19 +218,19 @@ variables:
           # only go to the cutadapt step.
           rm -r data
           ./run_test.sh -j 1 --use-conda -k -p -r --until cutadapt \
-            --configfile $ORIG/test/test_configs/override.yaml \
+            --configfile $ORIG/test/test_configs/test_rnaseq.yaml \
             --config sampletable=$ORIG/test/test_configs/test_sra_sampletable.tsv
 
           # Same as above, but SE
           rm -r data
           ./run_test.sh -j 1 --use-conda -k -p -r --until cutadapt \
-            --configfile $ORIG/test/test_configs/override.yaml \
+            --configfile $ORIG/test/test_configs/test_rnaseq.yaml \
             --config sampletable=$ORIG/test/test_configs/test_sra_sampletable_SE_only.tsv
 
           # test strandedness, PE
           rm -r data && cp -r /tmp/data data
           ./run_test.sh -j 2 --use-conda -k -p -r --until strand_check \
-            --configfile $ORIG/test/test_configs/override.yaml \
+            --configfile $ORIG/test/test_configs/test_rnaseq.yaml \
             --config sampletable=$ORIG/test/test_configs/test_pe_sampletable.tsv \
             && cat strandedness.tsv
 
@@ -245,7 +245,9 @@ variables:
           rm -r data && cp -r /tmp/data data
           ./run_test.sh -j 2 --use-conda -k -p -r \
             --forcerun star_pass1 \
-            --configfile $ORIG/test/test_configs/star_override_2pass.yaml \
+            --configfile \
+              $ORIG/test/test_configs/test_rnaseq_config.yaml \
+              $ORIG/test/test_configs/star_override_2pass.yaml \
             --config sampletable=$ORIG/test/test_configs/two_samples.tsv \
             --until star_pass2
 
@@ -253,14 +255,17 @@ variables:
           rm -r data && cp -r /tmp/data data
           ./run_test.sh -j 2 --use-conda -k -p -r \
             --forcerun star \
-            --configfile $ORIG/test/test_configs/star_override_1pass.yaml \
+            --configfile \
+              $ORIG/test/test_configs/test_rnaseq_config.yaml \
+              $ORIG/test/test_configs/star_override_1pass.yaml \
             --config sampletable=$ORIG/test/test_configs/two_samples.tsv \
             --until star
 
           # test PE reads
           rm -r data && cp -r /tmp/data data
           ./run_test.sh -j 2 --use-conda -k -p -r --until multiqc \
-            --configfile $ORIG/test/test_configs/override.yaml \
+            --configfile \
+              $ORIG/test/test_configs/test_rnaseq_config.yaml \
             --config sampletable=$ORIG/test/test_configs/test_pe_sampletable.tsv
 
   # --------------------------------------------------------------------------

From 495ad75148888349dc431df829bd705b3b535d3b Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sun, 4 Apr 2021 14:16:50 -0400
Subject: [PATCH 17/23] update env-pinned.yml

---
 env-pinned.yml | 381 +++++++++++++++++++++++++++----------------------
 1 file changed, 213 insertions(+), 168 deletions(-)

diff --git a/env-pinned.yml b/env-pinned.yml
index 9fda864b..93b0c9c8 100644
--- a/env-pinned.yml
+++ b/env-pinned.yml
@@ -1,3 +1,4 @@
+name: /home/dalerr/lcdb-wf/env
 channels:
   - conda-forge
   - bioconda
@@ -6,152 +7,186 @@ dependencies:
   - _libgcc_mutex=0.1=conda_forge
   - _openmp_mutex=4.5=1_gnu
   - _r-mutex=1.0.1=anacondar_1
-  - alsa-lib=1.2.3=h516909a_0
+  - aiohttp=3.7.4=py39h3811e60_0
   - amply=0.1.4=py_0
   - apipkg=1.5=py_0
   - appdirs=1.4.4=pyh9f0ad1d_0
   - argcomplete=1.12.2=pyhd8ed1ab_0
   - argh=0.26.2=pyh9f0ad1d_1002
+  - async-timeout=3.0.1=py_1000
   - attrs=20.3.0=pyhd3deb0d_0
   - backcall=0.2.0=pyh9f0ad1d_0
   - backports=1.0=py_2
-  - backports.functools_lru_cache=1.6.1=py_0
-  - bedtools=2.30.0=hc088bd4_0
+  - backports.functools_lru_cache=1.6.3=pyhd8ed1ab_0
+  - bedtools=2.30.0=h7d7f7ad_1
   - binutils_impl_linux-64=2.35.1=h193b22a_2
   - binutils_linux-64=2.35=h67ddf6f_30
-  - biopython=1.78=py38h497a2fe_1
-  - bowtie=1.3.0=py38hed8969a_1
-  - bowtie2=2.4.2=py38h1c8e9b9_1
-  - brotlipy=0.7.0=py38h497a2fe_1001
-  - bwidget=1.9.14=ha770c72_0
-  - bx-python=0.8.9=py38hb90e610_2
+  - biopython=1.78=py39h3811e60_2
+  - boost-cpp=1.74.0=hc6e9bd1_2
+  - boto3=1.17.44=pyhd8ed1ab_0
+  - botocore=1.20.44=pyhd8ed1ab_0
+  - bowtie=1.3.0=py39h176da8b_2
+  - bowtie2=2.4.2=py39hc9c6fcd_2
+  - brotlipy=0.7.0=py39h3811e60_1001
+  - bwidget=1.9.14=0
+  - bx-python=0.8.11=py39h5d76eff_1
   - bzip2=1.0.8=h7f98852_4
-  - c-ares=1.17.1=h36c2ea0_0
-  - ca-certificates=2020.12.5=ha878542_0
-  - cairo=1.16.0=hcf35c78_1003
-  - certifi=2020.12.5=py38h578d9bd_1
-  - cffi=1.14.5=py38ha65f79e_0
-  - chardet=4.0.0=py38h578d9bd_1
+  - c-ares=1.17.1=h7f98852_1
+  - ca-certificates=2021.1.19=h06a4308_1
+  - cachetools=4.2.1=pyhd8ed1ab_0
+  - cairo=1.16.0=h6cf1ce9_1008
+  - certifi=2020.12.5=py39hf3d152e_1
+  - cffi=1.14.5=py39he32792d_0
+  - chardet=4.0.0=py39hf3d152e_1
   - click=7.1.2=pyh9f0ad1d_0
-  - coincbc=2.10.5=hab63836_1
-  - coloredlogs=15.0=py38h578d9bd_0
+  - coincbc=2.10.5=hcee13e7_1
+  - colorama=0.4.4=pyh9f0ad1d_0
+  - coloredlogs=15.0=py39hf3d152e_0
   - colormath=3.0.0=py_2
-  - configargparse=1.3=pyhd8ed1ab_0
-  - cryptography=3.4.4=py38h3e25421_0
-  - curl=7.71.1=he644dc0_8
-  - cutadapt=3.2=py38h0213d0e_0
+  - commonmark=0.9.1=py_0
+  - configargparse=1.4=pyhd8ed1ab_0
+  - cryptography=3.4.7=py39hbca0aa6_0
+  - curl=7.76.0=h979ede3_0
+  - cutadapt=3.3=py39h38f01e4_1
   - cycler=0.10.0=py_2
-  - datrie=0.8.2=py38h1e0a361_1
-  - decorator=4.4.2=py_0
-  - deeptools=3.5.0=py_0
-  - deeptoolsintervals=0.1.9=py38h0213d0e_2
-  - dnaio=0.5.0=py38h0213d0e_0
-  - docutils=0.16=py38h578d9bd_3
+  - datrie=0.8.2=py39h07f9747_1
+  - dbus=1.13.18=hb2f20db_0
+  - decorator=5.0.5=pyhd8ed1ab_0
+  - deeptools=3.5.1=py_0
+  - deeptoolsintervals=0.1.9=py39h38f01e4_3
+  - dnaio=0.5.0=py39h38f01e4_1
+  - docutils=0.17=py39hf3d152e_0
   - execnet=1.8.0=pyh44b312d_0
-  - expat=2.2.10=h9c3ff4c_0
-  - fastq-screen=0.14.0=pl526_0
-  - fastqc=0.11.9=0
+  - expat=2.3.0=h9c3ff4c_0
+  - fastq-screen=0.14.0=pl5262hdfd78af_1
+  - fastqc=0.11.9=hdfd78af_1
+  - filelock=3.0.12=pyh9f0ad1d_0
   - font-ttf-dejavu-sans-mono=2.37=hab24e00_0
   - fontconfig=2.13.1=hba837de_1004
   - freetype=2.10.4=h0708190_1
-  - fribidi=1.0.10=h36c2ea0_0
-  - future=0.18.2=py38h578d9bd_3
-  - gat=1.3.6=py38h197edbe_2
-  - gcc_impl_linux-64=7.5.0=hda68d29_13
-  - gcc_linux-64=7.5.0=h47867f9_30
-  - gettext=0.19.8.1=h0b5b191_1005
-  - gffread=0.12.1=h8b12597_0
+  - fribidi=1.0.10=h516909a_0
+  - future=0.18.2=py39hf3d152e_3
+  - gat=1.3.6=py39hd1f1204_3
+  - gcc_impl_linux-64=9.3.0=h70c0ae5_18
+  - gcc_linux-64=9.3.0=hf25ea35_30
+  - gettext=0.20.2=hf68c758_0
+  - gffread=0.12.1=h2e03b76_1
   - gffutils=0.10.1=pyh864c0ab_1
-  - gfortran_impl_linux-64=7.5.0=h56cb351_18
-  - gfortran_linux-64=7.5.0=h78c8a43_30
-  - giflib=5.2.1=h36c2ea0_2
-  - gitdb=4.0.5=pyhd8ed1ab_1
-  - gitpython=3.1.13=pyhd8ed1ab_0
-  - glib=2.66.7=h9c3ff4c_0
-  - glib-tools=2.66.7=h9c3ff4c_0
-  - graphite2=1.3.13=h58526e2_1001
+  - gfortran_impl_linux-64=9.3.0=hc4a2995_18
+  - gfortran_linux-64=9.3.0=hdc58fab_30
+  - giflib=5.2.1=h516909a_2
+  - gitdb=4.0.7=pyhd8ed1ab_0
+  - gitpython=3.1.14=pyhd8ed1ab_0
+  - glib=2.68.0=h9c3ff4c_2
+  - glib-tools=2.68.0=h9c3ff4c_2
+  - google-api-core=1.26.2=pyhd8ed1ab_0
+  - google-auth=1.28.0=pyh44b312d_0
+  - google-cloud-core=1.6.0=pyhd3eb1b0_0
+  - google-cloud-storage=1.37.0=pyhd3eb1b0_0
+  - google-crc32c=1.1.2=py39hb81f231_0
+  - google-resumable-media=1.2.0=pyhd3deb0d_0
+  - googleapis-common-protos=1.53.0=py39hf3d152e_0
+  - graphite2=1.3.14=h23475e2_0
   - gsl=2.6=he838d99_2
-  - gxx_impl_linux-64=7.5.0=h64c220c_13
-  - gxx_linux-64=7.5.0=h555fc39_30
-  - harfbuzz=2.4.0=h9f30f68_3
-  - hdf5=1.10.5=nompi_h7c3c948_1111
-  - hisat2=2.2.1=he1b5a44_2
-  - htslib=1.11=hd3b49d5_1
-  - humanfriendly=9.1=py38h578d9bd_0
-  - icu=64.2=he1b5a44_1
+  - gst-plugins-base=1.18.4=h29181c9_0
+  - gstreamer=1.18.4=h76c114f_0
+  - gxx_impl_linux-64=9.3.0=hd87eabc_18
+  - gxx_linux-64=9.3.0=h3fbe746_30
+  - harfbuzz=2.8.0=h83ec7ef_1
+  - hdf5=1.10.5=nompi_h5b725eb_1114
+  - hisat2=2.2.1=h1b792b2_3
+  - htslib=1.12=h9093b5e_1
+  - humanfriendly=9.1=py39hf3d152e_0
+  - icu=68.1=h58526e2_0
   - idna=2.10=pyh9f0ad1d_0
-  - importlib-metadata=3.4.0=py38h578d9bd_0
-  - importlib_metadata=3.4.0=hd8ed1ab_0
+  - importlib-metadata=3.10.0=py39hf3d152e_0
+  - importlib_metadata=3.10.0=hd8ed1ab_0
   - iniconfig=1.1.1=pyh9f0ad1d_0
   - intervalstats=1.01=0
-  - ipython=7.20.0=py38h81c977d_2
+  - ipython=7.22.0=py39hef51801_0
   - ipython_genutils=0.2.0=py_1
-  - isa-l=2.30.0=h7f98852_1
-  - jedi=0.18.0=py38h578d9bd_2
+  - isa-l=2.30.0=ha770c72_4
+  - jedi=0.18.0=py39hf3d152e_2
   - jemalloc=5.2.1=h9c3ff4c_5
   - jinja2=2.11.3=pyh44b312d_0
-  - jpeg=9d=h36c2ea0_0
-  - jsonschema=3.2.0=py_2
-  - jupyter_core=4.7.1=py38h578d9bd_0
+  - jmespath=0.10.0=pyh9f0ad1d_0
+  - jpeg=9d=h516909a_0
+  - jsonschema=3.2.0=pyhd8ed1ab_3
+  - jupyter_core=4.7.1=py39hf3d152e_0
   - kernel-headers_linux-64=2.6.32=h77966d4_13
-  - kiwisolver=1.3.1=py38h1fd1430_1
+  - kiwisolver=1.3.1=py39h1a9c180_1
   - krb5=1.17.2=h926e7f8_0
-  - lcms2=2.11=hcbb858e_1
+  - lcms2=2.12=hddcbb42_0
   - ld_impl_linux-64=2.35.1=hea4e1c9_2
   - libblas=3.9.0=8_openblas
   - libcblas=3.9.0=8_openblas
-  - libcurl=7.71.1=hcdd3856_8
-  - libdeflate=1.6=h516909a_0
-  - libedit=3.1.20191231=he28a2e2_2
+  - libclang=11.1.0=default_ha53f305_0
+  - libcrc32c=1.1.1=he1b5a44_2
+  - libcurl=7.76.0=hc4aaa36_0
+  - libdeflate=1.7=h7f98852_5
+  - libedit=3.1.20210216=h27cfd23_1
   - libev=4.33=h516909a_1
+  - libevent=2.1.10=hcdb4288_3
   - libffi=3.3=h58526e2_2
+  - libgcc-devel_linux-64=9.3.0=h7864c58_18
   - libgcc-ng=9.3.0=h2828fa1_18
-  - libgd=2.2.5=h307a58e_1007
-  - libgfortran-ng=7.5.0=h14aa051_18
-  - libgfortran4=7.5.0=h14aa051_18
-  - libglib=2.66.7=h1f3bc88_0
+  - libgd=2.3.2=h78a0170_0
+  - libgfortran-ng=9.3.0=hff62375_18
+  - libgfortran5=9.3.0=hff62375_18
+  - libglib=2.68.0=h3e27bee_2
   - libgomp=9.3.0=h2828fa1_18
   - libiconv=1.16=h516909a_0
   - liblapack=3.9.0=8_openblas
+  - libllvm11=11.1.0=hf817b99_1
   - libnghttp2=1.43.0=h812cca2_0
-  - libopenblas=0.3.12=pthreads_hb3c22a3_1
-  - libpng=1.6.37=h21135ba_2
-  - libssh2=1.9.0=hab1572f_5
+  - libopenblas=0.3.12=pthreads_h4812303_1
+  - libpng=1.6.37=hed695b0_2
+  - libpq=13.1=hfd2b0eb_2
+  - libprotobuf=3.15.6=h780b84a_0
+  - libssh2=1.9.0=ha56f1ee_6
+  - libstdcxx-devel_linux-64=9.3.0=hb016644_18
   - libstdcxx-ng=9.3.0=h6de172a_18
-  - libtiff=4.1.0=hc3755c2_3
-  - libuuid=2.32.1=h7f98852_1000
-  - libwebp=1.0.2=h56121f0_5
-  - libxcb=1.13=h7f98852_1003
-  - libxml2=2.9.10=hee79883_0
+  - libtiff=4.2.0=hdc55705_0
+  - libuuid=2.32.1=h14c3975_1000
+  - libwebp=1.2.0=h3452ae3_0
+  - libwebp-base=1.2.0=h7f98852_2
+  - libxcb=1.14=h7b6447c_0
+  - libxkbcommon=1.0.3=he3ba5ed_0
+  - libxml2=2.9.10=h72842e0_3
   - lz4-c=1.9.3=h9c3ff4c_0
   - lzo=2.10=h516909a_1000
   - lzstring=1.0.4=py_1001
   - make=4.3=hd18ef5c_1
-  - markdown=3.3.3=pyh9f0ad1d_0
-  - markupsafe=1.1.1=py38h497a2fe_3
-  - matplotlib=3.3.2=0
-  - matplotlib-base=3.3.2=py38h5c7f4ab_1
+  - markdown=3.3.4=pyhd8ed1ab_0
+  - markupsafe=1.1.1=py39h3811e60_3
+  - matplotlib=3.4.1=py39hf3d152e_0
+  - matplotlib-base=3.4.1=py39h2fa2bec_0
   - more-itertools=8.7.0=pyhd8ed1ab_0
-  - multiqc=1.9=py_1
+  - multidict=5.1.0=py39h3811e60_1
+  - multiqc=1.10.1=py_0
+  - mysql-common=8.0.23=ha770c72_1
   - mysql-connector-c=6.1.11=h6eb9d5d_1007
-  - nbformat=5.1.2=pyhd8ed1ab_1
-  - ncbi-ngs-sdk=2.10.9=h3e72335_0
+  - mysql-libs=8.0.23=h935591d_1
+  - nbformat=5.1.3=pyhd8ed1ab_0
+  - ncbi-ngs-sdk=2.10.9=hff44eed_1
   - ncurses=6.2=h58526e2_4
   - networkx=2.5=py_0
-  - numpy=1.20.1=py38h18fd61f_0
+  - nspr=4.30=h9c3ff4c_0
+  - nss=3.63=hb5efdd6_0
+  - numpy=1.20.2=py39hdbf815f_0
   - olefile=0.46=pyh9f0ad1d_1
-  - openblas=0.3.12=pthreads_h43bd3aa_1
-  - openjdk=11.0.8=hacce0ff_0
-  - openssl=1.1.1j=h7f98852_0
+  - openblas=0.3.12=pthreads_h04b7a96_1
+  - openjdk=11.0.1=h516909a_1016
+  - openssl=1.1.1k=h7f98852_0
   - ossuuid=1.6.2=hf484d3e_1000
   - packaging=20.9=pyh44b312d_0
-  - pandas=1.2.2=py38h51da96c_0
-  - pandoc=2.11.4=h7f98852_0
-  - pango=1.42.4=h7062337_4
-  - parso=0.8.1=pyhd8ed1ab_0
+  - pandas=1.2.3=py39hde0f152_0
+  - pandoc=2.12=h7f98852_0
+  - pango=1.48.4=hb8ff022_0
+  - parso=0.8.2=pyhd8ed1ab_0
   - patsy=0.5.1=py_0
   - pcre=8.44=he1b5a44_0
-  - pcre2=10.35=h032f7d1_2
+  - pcre2=10.36=h032f7d1_1
   - perl=5.26.2=h36c2ea0_1008
   - perl-app-cpanminus=1.7044=pl526_1
   - perl-business-isbn=3.004=pl526_0
@@ -164,7 +199,7 @@ dependencies:
   - perl-extutils-makemaker=7.36=pl526_1
   - perl-file-path=2.16=pl526_0
   - perl-file-temp=0.2304=pl526_2
-  - perl-gd=2.71=pl526he860b03_0
+  - perl-gd=2.68=pl526he941832_0
   - perl-gdgraph=1.54=pl526_0
   - perl-gdtextutil=0.86=pl526h14c3975_5
   - perl-mime-base64=3.15=pl526_1
@@ -176,109 +211,119 @@ dependencies:
   - perl-xml-sax-base=1.09=pl526_0
   - perl-xsloader=0.24=pl526_0
   - pexpect=4.8.0=pyh9f0ad1d_2
-  - picard=2.25.0=0
-  - pickleshare=0.7.5=py_1003
-  - pigz=2.5=h27826a3_0
-  - pillow=8.1.0=py38h357d4e7_1
+  - picard=2.25.1=hdfd78af_1
+  - pickleshare=0.7.5=py39hde42818_1002
+  - pigz=2.6=h27826a3_0
+  - pillow=8.2.0=py39he98fc37_0
   - pip=21.0.1=pyhd8ed1ab_0
-  - pixman=0.38.0=h516909a_1003
+  - pixman=0.40.0=h36c2ea0_0
   - plotly=4.14.3=pyh44b312d_0
-  - pluggy=0.13.1=py38h578d9bd_4
-  - preseq=2.0.3=hc216eb9_5
-  - prompt-toolkit=3.0.16=pyha770c72_0
-  - psutil=5.8.0=py38h497a2fe_1
-  - pthread-stubs=0.4=h36c2ea0_1001
+  - pluggy=0.13.1=py39hf3d152e_4
+  - preseq=3.1.2=h06ef8b0_1
+  - prompt-toolkit=3.0.18=pyha770c72_0
+  - protobuf=3.15.6=py39he80948d_0
+  - psutil=5.8.0=py39h3811e60_1
   - ptyprocess=0.7.0=pyhd3deb0d_0
-  - pulp=2.3.1=py38h32f6830_0
+  - pulp=2.4=py39hf3d152e_0
   - py=1.10.0=pyhd3deb0d_0
-  - py2bit=0.3.0=py38h0213d0e_4
-  - pybedtools=0.8.1=py38h1c8e9b9_2
-  - pybigwig=0.3.18=py38h55f8d50_0
+  - py2bit=0.3.0=py39h38f01e4_5
+  - pyasn1=0.4.8=py_0
+  - pyasn1-modules=0.2.8=py_0
+  - pybedtools=0.8.2=py39h39abbe0_1
+  - pybigwig=0.3.18=py39h015b436_1
   - pycparser=2.20=pyh9f0ad1d_2
-  - pyfaidx=0.5.9.2=pyh3252c3a_0
-  - pygments=2.8.0=pyhd8ed1ab_0
+  - pyfaidx=0.5.9.5=pyh3252c3a_0
+  - pygments=2.8.1=pyhd8ed1ab_0
   - pyopenssl=20.0.1=pyhd8ed1ab_0
   - pyparsing=2.4.7=pyh9f0ad1d_0
-  - pyrsistent=0.17.3=py38h497a2fe_2
-  - pysam=0.16.0.1=py38hbdc2ae9_1
-  - pysocks=1.7.1=py38h578d9bd_3
-  - pytest=6.2.2=py38h578d9bd_0
+  - pyqt=5.12.3=py39hf3d152e_7
+  - pyqt-impl=5.12.3=py39h0fcd23e_7
+  - pyqt5-sip=4.19.18=py39he80948d_7
+  - pyqtchart=5.12=py39h0fcd23e_7
+  - pyqtwebengine=5.12.1=py39h0fcd23e_7
+  - pyrsistent=0.17.3=py39h3811e60_2
+  - pysam=0.16.0.1=py39h051187c_3
+  - pysocks=1.7.1=py39hf3d152e_3
+  - pytest=6.2.2=py39hf3d152e_0
   - pytest-forked=1.3.0=pyhd3deb0d_0
   - pytest-xdist=2.2.1=pyhd8ed1ab_0
-  - python=3.8.6=hffdb5ce_5_cpython
+  - python=3.9.2=hffdb5ce_0_cpython
   - python-dateutil=2.8.1=py_0
-  - python-isal=0.4.0=py38h497a2fe_0
-  - python-lzo=1.12=py38h86e1cee_1003
-  - python_abi=3.8=1_cp38
+  - python-isal=0.9.0=py39h3811e60_1
+  - python-lzo=1.12=py39h265373d_1003
+  - python_abi=3.9=1_cp39
   - pytz=2021.1=pyhd8ed1ab_0
-  - pyyaml=5.4.1=py38h497a2fe_0
-  - r-base=4.0.2=h95c6c4b_0
+  - pyyaml=5.4.1=py39h3811e60_0
+  - qt=5.12.9=hda022c4_4
+  - r-base=4.0.3=h349a78a_8
   - ratelimiter=1.2.0=py_1002
-  - readline=8.0=he28a2e2_2
+  - readline=8.1=h27cfd23_0
   - requests=2.25.1=pyhd3deb0d_0
   - retrying=1.3.3=py_2
-  - rseqc=4.0.0=py38h0213d0e_0
-  - salmon=1.4.0=hf69c8f4_0
-  - samtools=1.11=h6270b1f_0
-  - scipy=1.5.3=py38h828c644_0
-  - seaborn=0.11.1=hd8ed1ab_1
+  - rich=10.1.0=py39hf3d152e_0
+  - rsa=4.7.2=pyh44b312d_0
+  - rseqc=3.0.1=py_0
+  - s3transfer=0.3.6=pyhd8ed1ab_0
+  - salmon=1.4.0=h84f40af_1
+  - samtools=1.12=h9aed4be_1
+  - scipy=1.6.2=py39hee8e79c_0
+  - seaborn=0.11.1=ha770c72_0
   - seaborn-base=0.11.1=pyhd8ed1ab_1
   - sed=4.8=he412f7d_0
-  - setuptools=49.6.0=py38h578d9bd_3
-  - simplejson=3.17.2=py38h497a2fe_2
+  - setuptools=52.0.0=py39h06a4308_0
+  - simplejson=3.17.2=py39h3811e60_2
   - six=1.15.0=pyh9f0ad1d_0
+  - smart_open=5.0.0=pyhd3eb1b0_0
   - smmap=3.0.5=pyh44b312d_0
-  - snakemake-minimal=5.32.2=py_0
+  - snakemake-minimal=6.1.0=pyhdfd78af_1
   - spectra=0.0.11=py_1
-  - sqlite=3.34.0=h74cdb3f_0
+  - sqlite=3.35.3=h74cdb3f_0
   - sra-tools=2.10.9=pl526haddd2b5_0
-  - star=2.7.7a=0
-  - statsmodels=0.12.2=py38h5c078b8_0
-  - subread=2.0.1=hed695b0_0
+  - star=2.7.8a=h9ee0642_1
+  - statsmodels=0.12.2=py39hce5d2b2_0
+  - subread=2.0.1=h5bf99c6_1
   - sysroot_linux-64=2.12=h77966d4_13
-  - tbb=2020.2=h4bd325d_3
-  - tk=8.6.10=h21135ba_1
+  - tbb=2020.2=h4bd325d_4
+  - tk=8.6.10=hed695b0_1
   - tktable=2.10=hb7b940f_3
   - toml=0.10.2=pyhd8ed1ab_0
   - toposort=1.6=pyhd8ed1ab_0
-  - tornado=6.1=py38h497a2fe_1
+  - tornado=6.1=py39h3811e60_1
   - trackhub=0.2.4=pyh864c0ab_2
   - traitlets=5.0.5=py_0
-  - ucsc-bedgraphtobigwig=377=h446ed27_1
-  - ucsc-bedsort=377=h446ed27_2
-  - ucsc-bedtobigbed=377=h446ed27_1
-  - ucsc-bigwigmerge=377=h446ed27_1
-  - ucsc-fetchchromsizes=377=h446ed27_1
-  - ucsc-genepredtobed=377=h446ed27_3
-  - ucsc-gtftogenepred=377=h446ed27_3
-  - ucsc-liftover=377=h446ed27_2
-  - ucsc-oligomatch=377=h446ed27_1
-  - ucsc-twobittofa=377=h446ed27_2
-  - ucsc-wigtobigwig=377=h446ed27_1
-  - urllib3=1.26.3=pyhd8ed1ab_0
+  - typing-extensions=3.7.4.3=0
+  - typing_extensions=3.7.4.3=py_0
+  - tzdata=2021a=he74cb21_0
+  - ucsc-bedgraphtobigwig=377=h0b8a92a_2
+  - ucsc-bedsort=377=h0b8a92a_3
+  - ucsc-bedtobigbed=377=h0b8a92a_2
+  - ucsc-bigwigmerge=377=h0b8a92a_2
+  - ucsc-fetchchromsizes=377=h0b8a92a_2
+  - ucsc-genepredtobed=377=h0b8a92a_4
+  - ucsc-gtftogenepred=377=h0b8a92a_4
+  - ucsc-liftover=377=h0b8a92a_3
+  - ucsc-oligomatch=377=h0b8a92a_2
+  - ucsc-twobittofa=377=h0b8a92a_3
+  - ucsc-wigtobigwig=377=h0b8a92a_2
+  - urllib3=1.26.4=pyhd8ed1ab_0
   - wcwidth=0.2.5=pyh9f0ad1d_2
   - wheel=0.36.2=pyhd3deb0d_0
-  - wrapt=1.12.1=py38h497a2fe_3
-  - xopen=1.1.0=py38h578d9bd_1
-  - xorg-fixesproto=5.0=h14c3975_1002
-  - xorg-inputproto=2.3.2=h7f98852_1002
-  - xorg-kbproto=1.0.7=h7f98852_1002
+  - wrapt=1.12.1=py39h3811e60_3
+  - xopen=1.1.0=py39hf3d152e_2
+  - xorg-kbproto=1.0.7=h14c3975_1002
   - xorg-libice=1.0.10=h516909a_0
-  - xorg-libsm=1.2.3=h84519dc_1000
-  - xorg-libx11=1.6.12=h516909a_0
-  - xorg-libxau=1.0.9=h7f98852_0
-  - xorg-libxdmcp=1.1.3=h7f98852_0
-  - xorg-libxext=1.3.4=h516909a_0
-  - xorg-libxfixes=5.0.3=h516909a_1004
-  - xorg-libxi=1.7.10=h516909a_0
-  - xorg-libxrender=0.9.10=h516909a_1002
-  - xorg-libxtst=1.2.3=h516909a_1002
-  - xorg-recordproto=1.14.2=h516909a_1002
+  - xorg-libsm=1.2.3=hd9c2040_1000
+  - xorg-libx11=1.7.0=h36c2ea0_0
+  - xorg-libxext=1.3.4=h7f98852_1
+  - xorg-libxrender=0.9.10=h7f98852_1003
+  - xorg-libxt=1.2.1=h7f98852_2
   - xorg-renderproto=0.11.1=h14c3975_1002
-  - xorg-xextproto=7.3.0=h7f98852_1002
-  - xorg-xproto=7.0.31=h7f98852_1007
+  - xorg-xextproto=7.3.0=h14c3975_1002
+  - xorg-xproto=7.0.31=h14c3975_1007
   - xz=5.2.5=h516909a_1
   - yaml=0.2.5=h516909a_0
-  - zipp=3.4.0=py_0
+  - yarl=1.5.1=py39h07f9747_0
+  - zipp=3.4.1=pyhd8ed1ab_0
   - zlib=1.2.11=h516909a_1010
-  - zstd=1.4.8=ha95c52a_1
+  - zstd=1.4.9=ha95c52a_0
+prefix: /home/dalerr/lcdb-wf/env

From 99851a12e310522d0ba05845ad5a427e88549c13 Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sun, 4 Apr 2021 14:19:34 -0400
Subject: [PATCH 18/23] use pinned env for deploy and tests

---
 .circleci/config.yml | 6 ++----
 deploy.py            | 4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/.circleci/config.yml b/.circleci/config.yml
index 550d88c8..897630f8 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -71,11 +71,9 @@ variables:
             conda config --system --add channels bioconda
             conda config --system --add channels conda-forge
             conda install mamba -y
-            mamba env create -n lcdb-wf-test --file env.yml
-            mamba env create -n lcdb-wf-test-r --file env-r.yml
+            mamba env create -n lcdb-wf-test --file env-pinned.yml
+            mamba env create -n lcdb-wf-test-r --file env-r-pinned.yml
         fi
-        # conda env export -n lcdb-wf-test > env.yaml
-        # conda env export -n lcdb-wf-test-r > env-r.yaml
 
   # --------------------------------------------------------------------------
   # Deploy into a new directory and get the test data.
diff --git a/deploy.py b/deploy.py
index 6967a5e3..3d84bda8 100644
--- a/deploy.py
+++ b/deploy.py
@@ -223,7 +223,7 @@ def filter_out_other_workflows(filenames, patterns_to_include, prefilter="workfl
             "-p",
             "./env",
             "--file",
-            "env.yml",
+            "env-pinned.yml",
             "-c",
             "conda-forge",
             "-c",
@@ -242,7 +242,7 @@ def filter_out_other_workflows(filenames, patterns_to_include, prefilter="workfl
             "-p",
             "./env-r",
             "--file",
-            "env-r.yml",
+            "env-r-pinned.yml",
             "-c",
             "conda-forge",
             "-c",

From b979450386123f34c215ff542e19252bd32b3cb2 Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sun, 4 Apr 2021 14:20:25 -0400
Subject: [PATCH 19/23] update env-r-pinned

---
 env-r-pinned.yml | 328 +++++++++++++++++++++++------------------------
 1 file changed, 164 insertions(+), 164 deletions(-)

diff --git a/env-r-pinned.yml b/env-r-pinned.yml
index 00a4d6ec..332e515f 100644
--- a/env-r-pinned.yml
+++ b/env-r-pinned.yml
@@ -1,3 +1,4 @@
+name: /home/dalerr/lcdb-wf/mamba-env-r-unpinned
 channels:
   - conda-forge
   - bioconda
@@ -8,174 +9,172 @@ dependencies:
   - _r-mutex=1.0.1=anacondar_1
   - binutils_impl_linux-64=2.35.1=h193b22a_2
   - binutils_linux-64=2.35=h67ddf6f_30
-  - bioconductor-all=1.32.0=r40_0
-  - bioconductor-annotate=1.68.0=r40_0
-  - bioconductor-annotationdbi=1.52.0=r40_0
-  - bioconductor-annotationhub=2.22.0=r40_0
-  - bioconductor-apeglm=1.12.0=r40h5f743cb_0
-  - bioconductor-biobase=2.50.0=r40h037d062_0
-  - bioconductor-biocfilecache=1.14.0=r40_0
-  - bioconductor-biocgenerics=0.36.0=r40_0
-  - bioconductor-biocparallel=1.24.0=r40h5f743cb_0
-  - bioconductor-biocversion=3.12.0=r40_0
-  - bioconductor-biomart=2.46.0=r40_0
-  - bioconductor-biostrings=2.58.0=r40h037d062_0
-  - bioconductor-clusterprofiler=3.18.0=r40_0
-  - bioconductor-complexheatmap=2.6.2=r40_0
-  - bioconductor-consensusclusterplus=1.54.0=r40_0
-  - bioconductor-degreport=1.26.0=r40_0
-  - bioconductor-delayedarray=0.16.0=r40h037d062_0
-  - bioconductor-deseq2=1.30.0=r40h5f743cb_0
-  - bioconductor-do.db=2.9=r40_9
-  - bioconductor-dose=3.16.0=r40_0
-  - bioconductor-dupradar=1.20.0=r40_0
-  - bioconductor-edger=3.32.0=r40h5f743cb_0
-  - bioconductor-enrichplot=1.10.0=r40_0
-  - bioconductor-fgsea=1.16.0=r40h5f743cb_0
-  - bioconductor-genefilter=1.72.0=r40hc6cf775_0
-  - bioconductor-geneplotter=1.68.0=r40_0
-  - bioconductor-genomeinfodb=1.26.0=r40_0
-  - bioconductor-genomeinfodbdata=1.2.4=r40_0
-  - bioconductor-genomicalignments=1.26.0=r40h037d062_0
-  - bioconductor-genomicfeatures=1.42.0=r40_0
-  - bioconductor-genomicranges=1.42.0=r40h037d062_0
-  - bioconductor-go.db=3.12.1=r40_0
-  - bioconductor-gosemsim=2.16.0=r40h5f743cb_0
-  - bioconductor-graph=1.68.0=r40h037d062_0
-  - bioconductor-graphite=1.36.0=r40_0
-  - bioconductor-ihw=1.18.0=r40_0
-  - bioconductor-interactivedisplaybase=1.28.0=r40_0
-  - bioconductor-iranges=2.24.0=r40h037d062_0
-  - bioconductor-limma=3.46.0=r40h037d062_0
-  - bioconductor-lpsymphony=1.18.0=r40h5f743cb_0
-  - bioconductor-matrixgenerics=1.2.0=r40_0
-  - bioconductor-qvalue=2.22.0=r40_0
-  - bioconductor-reactome.db=1.74.0=r40_0
-  - bioconductor-reactomepa=1.34.0=r40_0
-  - bioconductor-rhtslib=1.22.0=r40h037d062_0
-  - bioconductor-rsamtools=2.6.0=r40h5f743cb_0
-  - bioconductor-rsubread=2.4.0=r40h037d062_0
-  - bioconductor-rtracklayer=1.50.0=r40h9bb0e53_1
-  - bioconductor-s4vectors=0.28.0=r40h037d062_0
-  - bioconductor-summarizedexperiment=1.20.0=r40_0
-  - bioconductor-sva=3.38.0=r40h037d062_0
-  - bioconductor-tximport=1.18.0=r40_0
-  - bioconductor-xvector=0.30.0=r40h037d062_0
-  - bioconductor-zlibbioc=1.36.0=r40h037d062_0
-  - bwidget=1.9.14=ha770c72_0
+  - bioconductor-all=1.32.0=r40hdfd78af_1
+  - bioconductor-annotate=1.68.0=r40hdfd78af_1
+  - bioconductor-annotationdbi=1.52.0=r40hdfd78af_1
+  - bioconductor-annotationhub=2.22.0=r40hdfd78af_1
+  - bioconductor-apeglm=1.12.0=r40h399db7b_1
+  - bioconductor-biobase=2.50.0=r40hd029910_1
+  - bioconductor-biocfilecache=1.14.0=r40hdfd78af_1
+  - bioconductor-biocgenerics=0.36.0=r40hdfd78af_1
+  - bioconductor-biocparallel=1.24.1=r40h399db7b_0
+  - bioconductor-biocversion=3.12.0=r40hdfd78af_1
+  - bioconductor-biomart=2.46.3=r40hdfd78af_0
+  - bioconductor-biostrings=2.58.0=r40hd029910_1
+  - bioconductor-clusterprofiler=3.18.1=r40hdfd78af_0
+  - bioconductor-complexheatmap=2.6.2=r40hdfd78af_1
+  - bioconductor-consensusclusterplus=1.54.0=r40hdfd78af_1
+  - bioconductor-degreport=1.26.0=r40hdfd78af_1
+  - bioconductor-delayedarray=0.16.3=r40hd029910_0
+  - bioconductor-deseq2=1.30.1=r40h399db7b_0
+  - bioconductor-do.db=2.9=r40hdfd78af_10
+  - bioconductor-dose=3.16.0=r40hdfd78af_1
+  - bioconductor-dupradar=1.20.0=r40hdfd78af_1
+  - bioconductor-edger=3.32.1=r40h399db7b_0
+  - bioconductor-enrichplot=1.10.2=r40hdfd78af_0
+  - bioconductor-fgsea=1.16.0=r40h399db7b_1
+  - bioconductor-genefilter=1.72.1=r40hba52eb8_0
+  - bioconductor-geneplotter=1.68.0=r40hdfd78af_1
+  - bioconductor-genomeinfodb=1.26.4=r40hdfd78af_0
+  - bioconductor-genomeinfodbdata=1.2.4=r40hdfd78af_2
+  - bioconductor-genomicalignments=1.26.0=r40hd029910_1
+  - bioconductor-genomicfeatures=1.42.2=r40hdfd78af_0
+  - bioconductor-genomicranges=1.42.0=r40hd029910_1
+  - bioconductor-go.db=3.12.1=r40hdfd78af_1
+  - bioconductor-gosemsim=2.16.1=r40h399db7b_0
+  - bioconductor-graph=1.68.0=r40hd029910_1
+  - bioconductor-graphite=1.36.0=r40hdfd78af_1
+  - bioconductor-ihw=1.18.0=r40hdfd78af_1
+  - bioconductor-interactivedisplaybase=1.28.0=r40hdfd78af_1
+  - bioconductor-iranges=2.24.1=r40hd029910_0
+  - bioconductor-limma=3.46.0=r40hd029910_1
+  - bioconductor-lpsymphony=1.18.0=r40h399db7b_1
+  - bioconductor-matrixgenerics=1.2.1=r40hdfd78af_0
+  - bioconductor-qvalue=2.22.0=r40hdfd78af_1
+  - bioconductor-reactome.db=1.74.0=r40hdfd78af_1
+  - bioconductor-reactomepa=1.34.0=r40hdfd78af_1
+  - bioconductor-rhtslib=1.22.0=r40hd029910_1
+  - bioconductor-rsamtools=2.6.0=r40h399db7b_1
+  - bioconductor-rsubread=2.4.3=r40hd029910_0
+  - bioconductor-rtracklayer=1.50.0=r40h7f5ccec_2
+  - bioconductor-s4vectors=0.28.1=r40hd029910_0
+  - bioconductor-summarizedexperiment=1.20.0=r40hdfd78af_1
+  - bioconductor-sva=3.38.0=r40hd029910_1
+  - bioconductor-tximport=1.18.0=r40hdfd78af_1
+  - bioconductor-xvector=0.30.0=r40hd029910_1
+  - bioconductor-zlibbioc=1.36.0=r40hd029910_1
+  - bwidget=1.9.14=0
   - bzip2=1.0.8=h7f98852_4
-  - c-ares=1.17.1=h36c2ea0_0
-  - ca-certificates=2020.12.5=ha878542_0
-  - cairo=1.16.0=h9f066cc_1006
-  - certifi=2020.12.5=py39hf3d152e_1
-  - curl=7.71.1=he644dc0_8
+  - c-ares=1.17.1=h7f98852_1
+  - ca-certificates=2021.1.19=h06a4308_1
+  - cairo=1.16.0=h6cf1ce9_1008
+  - curl=7.76.0=h979ede3_0
   - fontconfig=2.13.1=hba837de_1004
   - freetype=2.10.4=h0708190_1
-  - fribidi=1.0.10=h36c2ea0_0
-  - gcc_impl_linux-64=7.5.0=hda68d29_13
-  - gcc_linux-64=7.5.0=h47867f9_30
-  - gettext=0.19.8.1=h0b5b191_1005
-  - gfortran_impl_linux-64=7.5.0=h56cb351_18
-  - gfortran_linux-64=7.5.0=h78c8a43_30
-  - glib=2.66.7=h9c3ff4c_0
-  - glib-tools=2.66.7=h9c3ff4c_0
+  - fribidi=1.0.10=h516909a_0
+  - gcc_impl_linux-64=9.3.0=h70c0ae5_18
+  - gcc_linux-64=9.3.0=hf25ea35_30
+  - gettext=0.20.2=hf68c758_0
+  - gfortran_impl_linux-64=9.3.0=hc4a2995_18
+  - gfortran_linux-64=9.3.0=hdc58fab_30
   - gmp=6.2.1=h58526e2_0
-  - graphite2=1.3.13=h58526e2_1001
+  - graphite2=1.3.14=h23475e2_0
   - gsl=2.6=he838d99_2
-  - gxx_impl_linux-64=7.5.0=h64c220c_13
-  - gxx_linux-64=7.5.0=h555fc39_30
-  - harfbuzz=2.7.2=ha5b49bf_1
-  - icu=67.1=he1b5a44_0
-  - jpeg=9d=h36c2ea0_0
+  - gxx_impl_linux-64=9.3.0=hd87eabc_18
+  - gxx_linux-64=9.3.0=h3fbe746_30
+  - harfbuzz=2.8.0=h83ec7ef_1
+  - icu=68.1=h58526e2_0
+  - jpeg=9d=h516909a_0
   - kernel-headers_linux-64=2.6.32=h77966d4_13
   - krb5=1.17.2=h926e7f8_0
   - ld_impl_linux-64=2.35.1=hea4e1c9_2
-  - libblas=3.8.0=17_openblas
-  - libcblas=3.8.0=17_openblas
-  - libcurl=7.71.1=hcdd3856_8
-  - libedit=3.1.20191231=he28a2e2_2
+  - libblas=3.9.0=8_openblas
+  - libcblas=3.9.0=8_openblas
+  - libcurl=7.76.0=hc4aaa36_0
+  - libedit=3.1.20210216=h27cfd23_1
   - libev=4.33=h516909a_1
   - libffi=3.3=h58526e2_2
+  - libgcc-devel_linux-64=9.3.0=h7864c58_18
   - libgcc-ng=9.3.0=h2828fa1_18
-  - libgfortran-ng=7.5.0=h14aa051_18
-  - libgfortran4=7.5.0=h14aa051_18
-  - libgit2=1.1.0=h0b03e73_0
-  - libglib=2.66.7=h1f3bc88_0
+  - libgfortran-ng=9.3.0=hff62375_18
+  - libgfortran5=9.3.0=hff62375_18
+  - libgit2=1.1.0=h3974521_1
+  - libglib=2.68.0=h3e27bee_2
   - libgomp=9.3.0=h2828fa1_18
   - libiconv=1.16=h516909a_0
-  - liblapack=3.8.0=17_openblas
+  - liblapack=3.9.0=8_openblas
   - libnghttp2=1.43.0=h812cca2_0
-  - libopenblas=0.3.10=pthreads_hb3c22a3_5
-  - libpng=1.6.37=h21135ba_2
-  - libssh2=1.9.0=hab1572f_5
+  - libopenblas=0.3.12=pthreads_h4812303_1
+  - libpng=1.6.37=hed695b0_2
+  - libssh2=1.9.0=ha56f1ee_6
+  - libstdcxx-devel_linux-64=9.3.0=hb016644_18
   - libstdcxx-ng=9.3.0=h6de172a_18
   - libtiff=4.2.0=hdc55705_0
-  - libuuid=2.32.1=h7f98852_1000
-  - libwebp-base=1.2.0=h7f98852_0
-  - libxcb=1.13=h7f98852_1003
-  - libxml2=2.9.10=h68273f3_2
+  - libuuid=2.32.1=h14c3975_1000
+  - libwebp-base=1.2.0=h7f98852_2
+  - libxcb=1.14=h7b6447c_0
+  - libxml2=2.9.10=h72842e0_3
   - lz4-c=1.9.3=h9c3ff4c_0
   - make=4.3=hd18ef5c_1
   - ncurses=6.2=h58526e2_4
-  - openssl=1.1.1j=h7f98852_0
-  - pandoc=2.11.4=h7f98852_0
-  - pango=1.42.4=h69149e4_5
+  - openssl=1.1.1k=h7f98852_0
+  - pandoc=2.12=h7f98852_0
+  - pango=1.48.4=hb8ff022_0
   - pcre=8.44=he1b5a44_0
-  - pcre2=10.35=h032f7d1_2
-  - pip=21.0.1=pyhd8ed1ab_0
+  - pcre2=10.36=h032f7d1_1
   - pixman=0.40.0=h36c2ea0_0
-  - pthread-stubs=0.4=h36c2ea0_1001
-  - python=3.9.1=hffdb5ce_5_cpython
-  - python_abi=3.9=1_cp39
+  - r=4.0=r40_1004
   - r-ashr=2.2_47=r40h0357c0b_1
   - r-askpass=1.1=r40hcdcec82_2
   - r-assertthat=0.2.1=r40h6115d3f_2
   - r-backports=1.2.1=r40hcfec24a_0
-  - r-base=4.0.2=he766273_1
+  - r-base=4.0.3=h349a78a_8
   - r-base64enc=0.1_3=r40hcdcec82_1004
   - r-bbmle=1.0.23.1=r40h6115d3f_1
   - r-bdsmatrix=1.3_4=r40hcdcec82_1
   - r-bh=1.75.0_0=r40hc72bb7e_0
-  - r-biocmanager=1.30.10=r40h6115d3f_1
+  - r-biocmanager=1.30.12=r40hc72bb7e_0
   - r-bit=4.0.4=r40hcdcec82_0
   - r-bit64=4.0.5=r40hcdcec82_0
   - r-bitops=1.0_6=r40hcdcec82_1004
   - r-blob=1.2.1=r40h6115d3f_1
+  - r-boot=1.3_27=r40hc72bb7e_0
   - r-brew=1.0_6=r40h6115d3f_1003
   - r-brio=1.1.1=r40hcfec24a_0
-  - r-broom=0.7.4=r40hc72bb7e_0
+  - r-broom=0.7.5=r40hc72bb7e_0
   - r-bslib=0.2.4=r40hc72bb7e_0
   - r-cachem=1.0.4=r40hcfec24a_0
   - r-cairo=1.5_12.2=r40hcdcec82_0
-  - r-callr=3.5.1=r40h142f84f_0
-  - r-catools=1.18.1=r40h03ef668_0
+  - r-callr=3.6.0=r40hc72bb7e_0
+  - r-catools=1.18.2=r40h03ef668_0
   - r-checkmate=2.0.0=r40hcdcec82_1
   - r-circlize=0.4.12=r40hc72bb7e_0
-  - r-cli=2.3.0=r40hc72bb7e_0
+  - r-class=7.3_18=r40hcfec24a_0
+  - r-cli=2.3.1=r40hc72bb7e_0
   - r-clipr=0.7.1=r40h142f84f_0
   - r-clue=0.3_58=r40h7f98852_0
-  - r-cluster=2.1.0=r40h31ca83e_4
+  - r-cluster=2.1.1=r40h859d828_0
   - r-coda=0.19_4=r40h142f84f_0
   - r-codetools=0.2_18=r40hc72bb7e_0
   - r-colorspace=2.0_0=r40h9e2df91_0
   - r-commonmark=1.7=r40hcdcec82_1002
   - r-covr=3.5.1=r40h0357c0b_0
   - r-cowplot=1.1.1=r40hc72bb7e_0
-  - r-cpp11=0.2.6=r40hc72bb7e_0
+  - r-cpp11=0.2.7=r40hc72bb7e_0
   - r-crayon=1.4.1=r40hc72bb7e_0
   - r-credentials=1.3.0=r40h6115d3f_0
   - r-crosstalk=1.1.1=r40hc72bb7e_0
-  - r-curl=4.3=r40hcdcec82_1
-  - r-data.table=1.13.6=r40hcfec24a_0
+  - r-curl=4.3=r40hcfec24a_1
+  - r-data.table=1.14.0=r40hcfec24a_0
   - r-dbi=1.1.1=r40hc72bb7e_0
   - r-dbplyr=2.1.0=r40hc72bb7e_0
   - r-dendextend=1.14.0=r40h6115d3f_0
-  - r-desc=1.2.0=r40h6115d3f_1003
+  - r-desc=1.3.0=r40hc72bb7e_0
   - r-devtools=2.3.2=r40h6115d3f_0
   - r-diffobj=0.3.3=r40hcfec24a_0
   - r-digest=0.6.27=r40h1b71b39_0
   - r-downloader=0.4=r40h6115d3f_1003
-  - r-dplyr=1.0.4=r40h03ef668_0
+  - r-dplyr=1.0.5=r40h03ef668_0
   - r-dt=0.17=r40hc72bb7e_0
   - r-egg=0.4.5=r40h6115d3f_2
   - r-ellipsis=0.3.1=r40hcdcec82_0
@@ -183,26 +182,27 @@ dependencies:
   - r-etrunct=0.1=r40_1002
   - r-evaluate=0.14=r40h6115d3f_2
   - r-fansi=0.4.2=r40hcfec24a_0
-  - r-farver=2.0.3=r40h0357c0b_1
+  - r-farver=2.1.0=r40h03ef668_0
   - r-fastmap=1.1.0=r40h03ef668_0
   - r-fastmatch=1.1_0=r40hcdcec82_1005
   - r-fdrtool=1.2.16=r40hcfec24a_0
   - r-foreach=1.5.1=r40h142f84f_0
-  - r-formatr=1.7=r40h6115d3f_2
+  - r-foreign=0.8_81=r40hcfec24a_0
+  - r-formatr=1.8=r40hc72bb7e_0
   - r-fs=1.5.0=r40h0357c0b_0
   - r-futile.logger=1.4.3=r40h6115d3f_1003
   - r-futile.options=1.0.1=r40h6115d3f_1002
   - r-gclus=1.3.2=r40h6115d3f_2
   - r-generics=0.1.0=r40hc72bb7e_0
-  - r-gert=1.2.0=r40hcfec24a_0
+  - r-gert=1.3.0=r40hbd84cd2_0
   - r-getoptlong=1.0.5=r40hc72bb7e_0
   - r-ggdendro=0.1.22=r40h6115d3f_0
-  - r-ggforce=0.3.2=r40h0357c0b_0
+  - r-ggforce=0.3.3=r40h03ef668_0
   - r-ggnewscale=0.4.5=r40hc72bb7e_0
   - r-ggplot2=3.3.3=r40hc72bb7e_0
-  - r-ggraph=2.0.4=r40he524a50_0
+  - r-ggraph=2.0.5=r40h03ef668_0
   - r-ggrepel=0.9.1=r40h03ef668_0
-  - r-gh=1.2.0=r40hc72bb7e_0
+  - r-gh=1.2.1=r40hc72bb7e_0
   - r-git2r=0.28.0=r40hf628c3e_0
   - r-gitcreds=0.1.1=r40hc72bb7e_0
   - r-globaloptions=0.1.2=r40_0
@@ -213,22 +213,22 @@ dependencies:
   - r-gtable=0.3.0=r40h6115d3f_3
   - r-gtools=3.8.2=r40hcdcec82_1
   - r-heatmaply=1.2.1=r40hc72bb7e_0
-  - r-hexbin=1.28.1=r40h31ca83e_2
+  - r-hexbin=1.28.2=r40h859d828_0
   - r-highr=0.8=r40h6115d3f_2
   - r-hms=1.0.0=r40hc72bb7e_0
   - r-htmltools=0.5.1.1=r40h03ef668_0
   - r-htmlwidgets=1.5.3=r40hc72bb7e_0
   - r-httpuv=1.5.5=r40h03ef668_0
   - r-httr=1.4.2=r40h6115d3f_0
-  - r-igraph=1.2.6=r40h084b37e_1
+  - r-igraph=1.2.6=r40hfbf21e4_1
   - r-ini=0.3.1=r40h6115d3f_1003
   - r-invgamma=1.1=r40h6115d3f_1
   - r-irlba=2.3.3=r40h7fa42b6_3
-  - r-isoband=0.2.3=r40h03ef668_0
+  - r-isoband=0.2.4=r40h03ef668_0
   - r-iterators=1.0.13=r40h142f84f_0
   - r-jquerylib=0.1.3=r40hc72bb7e_0
   - r-jsonlite=1.7.2=r40hcfec24a_0
-  - r-kernsmooth=2.23_18=r40h7679c2e_0
+  - r-kernsmooth=2.23_18=r40h742201e_0
   - r-knitr=1.31=r40hc72bb7e_0
   - r-labeling=0.4.2=r40h142f84f_0
   - r-lambda.r=1.2.4=r40h6115d3f_1
@@ -248,18 +248,19 @@ dependencies:
   - r-mgcv=1.8_34=r40he454529_0
   - r-mime=0.10=r40hcfec24a_0
   - r-mixsqp=0.3_43=r40hfbb317b_1
-  - r-mnormt=1.5_7=r40h31ca83e_2
+  - r-mnormt=2.0.2=r40h859d828_0
   - r-munsell=0.5.0=r40h6115d3f_1003
-  - r-mvtnorm=1.1_1=r40h31ca83e_1
-  - r-nlme=3.1_150=r40h31ca83e_0
+  - r-mvtnorm=1.1_1=r40h580db52_1
+  - r-nlme=3.1_152=r40h859d828_0
+  - r-nnet=7.3_15=r40hcfec24a_0
   - r-nozzle.r1=1.1_1=r40_1003
   - r-numderiv=2016.8_1.1=r40h6115d3f_3
   - r-openssl=1.4.3=r40he5c4762_0
   - r-pheatmap=1.0.12=r40h6115d3f_2
-  - r-pillar=1.4.7=r40hc72bb7e_0
+  - r-pillar=1.5.1=r40hc72bb7e_0
   - r-pkgbuild=1.2.0=r40hc72bb7e_0
   - r-pkgconfig=2.0.3=r40h6115d3f_1
-  - r-pkgload=1.1.0=r40h0357c0b_0
+  - r-pkgload=1.2.0=r40h03ef668_0
   - r-plogr=0.2.0=r40h6115d3f_1003
   - r-plotly=4.9.3=r40hc72bb7e_0
   - r-plyr=1.8.6=r40h0357c0b_1
@@ -267,42 +268,44 @@ dependencies:
   - r-polyclip=1.10_0=r40h0357c0b_2
   - r-praise=1.0.0=r40h6115d3f_1004
   - r-prettyunits=1.1.1=r40h6115d3f_1
-  - r-processx=3.4.5=r40hcfec24a_0
+  - r-processx=3.5.0=r40hcfec24a_0
   - r-progress=1.2.2=r40h6115d3f_2
   - r-promises=1.2.0.1=r40h03ef668_0
-  - r-ps=1.5.0=r40hcfec24a_0
-  - r-psych=2.0.12=r40hc72bb7e_0
+  - r-ps=1.6.0=r40hcfec24a_0
+  - r-psych=2.1.3=r40hc72bb7e_0
   - r-purrr=0.3.4=r40hcdcec82_1
-  - r-qap=0.1_1=r40h31ca83e_1006
+  - r-qap=0.1_1=r40h580db52_1006
   - r-r6=2.5.0=r40hc72bb7e_0
   - r-rappdirs=0.3.3=r40hcfec24a_0
   - r-rcmdcheck=1.3.3=r40h6115d3f_3
   - r-rcolorbrewer=1.1_2=r40h6115d3f_1003
   - r-rcpp=1.0.6=r40h03ef668_0
-  - r-rcpparmadillo=0.10.2.1.0=r40h306847c_0
+  - r-rcpparmadillo=0.10.2.2.0=r40h306847c_0
   - r-rcppeigen=0.3.3.9.1=r40h306847c_0
   - r-rcppnumerical=0.4_0=r40h0357c0b_1
-  - r-rcurl=1.98_1.2=r40hcdcec82_1
+  - r-rcurl=1.98_1.3=r40hcfec24a_0
   - r-readr=1.4.0=r40h1b71b39_0
+  - r-recommended=4.0=r40_1004
   - r-registry=0.5_1=r40h6115d3f_2
   - r-rematch2=2.1.2=r40h6115d3f_1
-  - r-remotes=2.2.0=r40h6115d3f_0
+  - r-remotes=2.3.0=r40hc72bb7e_0
   - r-reshape=0.8.8=r40hcdcec82_2
   - r-reshape2=1.4.4=r40h0357c0b_1
   - r-rex=1.2.0=r40h6115d3f_1
   - r-rjson=0.2.20=r40h0357c0b_1002
   - r-rlang=0.4.10=r40hcfec24a_0
-  - r-rmarkdown=2.6=r40hc72bb7e_0
+  - r-rmarkdown=2.7=r40hc72bb7e_0
   - r-roxygen2=7.1.1=r40h0357c0b_0
+  - r-rpart=4.1_15=r40hcfec24a_2
   - r-rprojroot=2.0.2=r40hc72bb7e_0
-  - r-rsqlite=2.2.3=r40h03ef668_0
+  - r-rsqlite=2.2.5=r40h03ef668_0
   - r-rstudioapi=0.13=r40hc72bb7e_0
   - r-rvcheck=0.1.8=r40h6115d3f_1
   - r-rversions=2.0.2=r40h6115d3f_0
   - r-sass=0.3.1=r40h03ef668_0
   - r-scales=1.1.1=r40h6115d3f_0
   - r-scatterpie=0.1.5=r40h6115d3f_0
-  - r-seriation=1.2_9=r40h31ca83e_1
+  - r-seriation=1.2_9=r40h580db52_1
   - r-sessioninfo=1.1.1=r40h6115d3f_1002
   - r-shadowtext=0.0.7=r40h6115d3f_1
   - r-shape=1.4.5=r40_0
@@ -310,61 +313,58 @@ dependencies:
   - r-slam=0.1_48=r40hbfbffee_0
   - r-snow=0.4_3=r40h6115d3f_1002
   - r-sourcetools=0.1.7=r40he1b5a44_1002
-  - r-sparsem=1.78=r40h31ca83e_2
-  - r-spp=1.16.0=r40h0357c0b_3
+  - r-sparsem=1.81=r40h859d828_0
+  - r-spatial=7.3_13=r40hcfec24a_0
+  - r-spp=1.16.0=r40h52a8340_4
   - r-squarem=2021.1=r40hc72bb7e_0
-  - r-stringi=1.5.3=r40hca8494e_0
+  - r-stringi=1.5.3=r40hcabe038_1
   - r-stringr=1.4.0=r40h6115d3f_2
-  - r-survival=3.2_7=r40hcfec24a_0
+  - r-survival=3.2_10=r40hcfec24a_0
   - r-sys=3.4=r40hcdcec82_0
   - r-testthat=3.0.2=r40h03ef668_0
-  - r-tibble=3.0.6=r40hcfec24a_0
+  - r-tibble=3.1.0=r40hcfec24a_1
   - r-tidygraph=1.2.0=r40h0357c0b_0
-  - r-tidyr=1.1.2=r40h0357c0b_0
+  - r-tidyr=1.1.3=r40h03ef668_0
   - r-tidyselect=1.1.0=r40h6115d3f_0
-  - r-tinytex=0.29=r40hc72bb7e_0
+  - r-tinytex=0.31=r40hc72bb7e_0
+  - r-tmvnsim=1.0_2=r40h859d828_3
   - r-truncnorm=1.0_8=r40hcdcec82_1002
   - r-tsp=1.1_10=r40hcdcec82_1
-  - r-tweenr=1.0.1=r40h0357c0b_1002
+  - r-tweenr=1.0.2=r40h03ef668_0
   - r-upsetr=1.4.0=r40h6115d3f_2
   - r-usethis=2.0.1=r40hc72bb7e_0
-  - r-utf8=1.1.4=r40hcdcec82_1003
-  - r-vctrs=0.3.6=r40hcfec24a_0
+  - r-utf8=1.2.1=r40hcfec24a_0
+  - r-vctrs=0.3.7=r40hcfec24a_0
   - r-viridis=0.5.1=r40h6115d3f_1004
   - r-viridislite=0.3.0=r40h6115d3f_1003
-  - r-waldo=0.2.4=r40hc72bb7e_0
+  - r-waldo=0.2.5=r40hc72bb7e_0
   - r-webshot=0.5.2=r40h6115d3f_1
   - r-whisker=0.4=r40h6115d3f_1
   - r-withr=2.4.1=r40hc72bb7e_0
   - r-xfun=0.20=r40hcfec24a_0
-  - r-xml=3.99_0.5=r40hcfec24a_0
+  - r-xml=3.99_0.6=r40hcfec24a_0
   - r-xml2=1.3.2=r40h0357c0b_1
   - r-xopen=1.0.0=r40h6115d3f_1003
   - r-xtable=1.8_4=r40h6115d3f_3
   - r-yaml=2.2.1=r40hcfec24a_1
   - r-zeallot=0.1.0=r40h6115d3f_1002
   - r-zip=2.1.1=r40hcdcec82_0
-  - readline=8.0=he28a2e2_2
+  - readline=8.1=h27cfd23_0
   - sed=4.8=he412f7d_0
-  - setuptools=49.6.0=py39hf3d152e_3
-  - sqlite=3.34.0=h74cdb3f_0
   - sysroot_linux-64=2.12=h77966d4_13
-  - tk=8.6.10=h21135ba_1
+  - tk=8.6.10=hed695b0_1
   - tktable=2.10=hb7b940f_3
-  - tzdata=2021a=he74cb21_0
-  - wheel=0.36.2=pyhd3deb0d_0
-  - xorg-kbproto=1.0.7=h7f98852_1002
+  - xorg-kbproto=1.0.7=h14c3975_1002
   - xorg-libice=1.0.10=h516909a_0
-  - xorg-libsm=1.2.3=h84519dc_1000
-  - xorg-libx11=1.6.12=h516909a_0
-  - xorg-libxau=1.0.9=h7f98852_0
-  - xorg-libxdmcp=1.1.3=h7f98852_0
-  - xorg-libxext=1.3.4=h516909a_0
-  - xorg-libxrender=0.9.10=h516909a_1002
-  - xorg-libxt=1.2.1=h7f98852_0
+  - xorg-libsm=1.2.3=hd9c2040_1000
+  - xorg-libx11=1.7.0=h36c2ea0_0
+  - xorg-libxext=1.3.4=h7f98852_1
+  - xorg-libxrender=0.9.10=h7f98852_1003
+  - xorg-libxt=1.2.1=h7f98852_2
   - xorg-renderproto=0.11.1=h14c3975_1002
-  - xorg-xextproto=7.3.0=h7f98852_1002
-  - xorg-xproto=7.0.31=h7f98852_1007
+  - xorg-xextproto=7.3.0=h14c3975_1002
+  - xorg-xproto=7.0.31=h14c3975_1007
   - xz=5.2.5=h516909a_1
   - zlib=1.2.11=h516909a_1010
-  - zstd=1.4.8=ha95c52a_1
+  - zstd=1.4.9=ha95c52a_0
+prefix: /home/dalerr/lcdb-wf/mamba-env-r-unpinned

From 9dbb27f6a45b947b3394e689bb1ccac70aebea13 Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sun, 4 Apr 2021 14:28:58 -0400
Subject: [PATCH 20/23] update cache key to reflect env yamls

---
 .circleci/config.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.circleci/config.yml b/.circleci/config.yml
index 897630f8..c2dc7b1d 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -26,7 +26,7 @@ variables:
 
   save_cache: &save_cache
     save_cache:
-      key: v0-{{ checksum "env.yml" }}-{{ checksum "env-r.yml" }}
+      key: v0-{{ checksum "env-pinned.yml" }}-{{ checksum "env-r-pinned.yml" }}-{{ checksum "env-r.yml" }}- {{ checksum "env.yml" }}
       paths:
         - /opt/conda
 
@@ -38,7 +38,7 @@ variables:
   restore_cache: &restore_cache
     restore_cache:
       keys:
-        - v0-{{ checksum "env.yml" }}-{{ checksum "env-r.yml" }}
+        - v0-{{ checksum "env-pinned.yml" }}-{{ checksum "env-r-pinned.yml" }}-{{ checksum "env-r.yml" }}- {{ checksum "env.yml" }}
 
   # --------------------------------------------------------------------------
   # The path needs to be set each time; in jobs below this will be called as

From 7f590a2ff1d4d886bbae5991d5f49b6df27dc8d0 Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sun, 4 Apr 2021 15:43:25 -0400
Subject: [PATCH 21/23] add additional test configs

---
 test/test_configs/test_file_uri.yaml      | 45 +++++++++++++++++++++++
 test/test_configs/test_rnaseq_config.yaml | 42 +++++++++++++++++++++
 test/test_configs/test_sra_config.yaml    | 32 ++++++++++++++++
 3 files changed, 119 insertions(+)
 create mode 100644 test/test_configs/test_file_uri.yaml
 create mode 100644 test/test_configs/test_rnaseq_config.yaml
 create mode 100644 test/test_configs/test_sra_config.yaml

diff --git a/test/test_configs/test_file_uri.yaml b/test/test_configs/test_file_uri.yaml
new file mode 100644
index 00000000..d619e5cb
--- /dev/null
+++ b/test/test_configs/test_file_uri.yaml
@@ -0,0 +1,45 @@
+sampletable: 'config/sampletable.tsv'
+
+patterns: 'config/rnaseq_patterns.yaml'
+
+# Which key in the `references` dict below to use
+organism: 'filebased'
+
+# If not specified here, use the environment variable REFERENCES_DIR.
+references_dir: 'references_data'
+
+aligner:
+  index: 'hisat2'
+  tag: 'test'
+
+rrna:
+  index: 'bowtie2'
+  tag: 'test'
+
+gtf:
+  tag: "test"
+
+salmon:
+  tag: "test"
+
+fastq_screen:
+  - label: test
+    organism: filebased
+    tag: test
+
+references:
+  filebased:
+    test:
+      genome:
+        url: "file://test.fa.gz"
+        indexes:
+          - "bowtie2"
+          - "hisat2"
+      annotation:
+        url: "file://test.gtf.gz"
+        conversions:
+          - "bed12"
+          - "refflat"
+      transcriptome:
+        indexes:
+          - "salmon"
diff --git a/test/test_configs/test_rnaseq_config.yaml b/test/test_configs/test_rnaseq_config.yaml
new file mode 100644
index 00000000..b8d79b92
--- /dev/null
+++ b/test/test_configs/test_rnaseq_config.yaml
@@ -0,0 +1,42 @@
+sampletable: 'config/sampletable.tsv'
+
+patterns: 'config/rnaseq_patterns.yaml'
+
+# Which key in the `references` dict below to use
+organism: 'dmel'
+
+# If not specified here, use the environment variable REFERENCES_DIR.
+references_dir: 'references_data'
+
+aligner:
+  index: 'hisat2'
+  tag: 'test'
+
+rrna:
+  index: 'bowtie2'
+  tag: 'rRNA'
+
+gtf:
+  tag: "test"
+
+salmon:
+  tag: "test"
+
+fastq_screen:
+  - label: rRNA
+    organism: dmel
+    tag: test
+  - label: PhiX
+    organism: phix
+    tag: default
+  - label: Fly
+    organism: dmel
+    tag: test
+
+# See the reference config files in the top level of the repo,
+# include/reference_configs, for inspiration for more species.
+
+include_references:
+  - '../../include/reference_configs/test.yaml'
+  - '../../include/reference_configs/PhiX.yaml'
+  - '../../include/reference_configs/Drosophila_melanogaster.yaml'
diff --git a/test/test_configs/test_sra_config.yaml b/test/test_configs/test_sra_config.yaml
new file mode 100644
index 00000000..f1127658
--- /dev/null
+++ b/test/test_configs/test_sra_config.yaml
@@ -0,0 +1,32 @@
+patterns: 'config/rnaseq_patterns.yaml'
+
+# Which key in the `references` dict below to use
+organism: 'human'
+
+# If not specified here, use the environment variable REFERENCES_DIR.
+references_dir: 'references_data'
+
+aligner:
+  index: 'star'
+  tag: 'gencode-v28'
+
+rrna:
+  index: 'bowtie2'
+  tag: 'rRNA'
+
+gtf:
+  tag: "gencode-v28"
+
+salmon:
+  tag: "gencode-v28"
+
+fastq_screen:
+  - label: rRNA
+    organism: human
+    tag: rRNA
+  - label: human
+    organism: human
+    tag: gencode-v28
+
+include_references:
+  - '../../include/reference_configs/Drosophila_melanogaster.yaml'

From 30b22d798cfeb866a2c374bcc61f2db3fdebe9c6 Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sun, 4 Apr 2021 17:55:33 -0400
Subject: [PATCH 22/23] when testing urls, skip file://

---
 lib/common.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/common.py b/lib/common.py
index a0e05d76..76d8efa8 100644
--- a/lib/common.py
+++ b/lib/common.py
@@ -857,6 +857,9 @@ def check_urls(config, verbose=False):
     failures = []
     urls = list(set(utils.flatten(pluck(config, 'url'))))
     for url in urls:
+        if url.startswith('file://'):
+            continue
+
         res = check_url(url, verbose=verbose)
 
         # we expect exit code 23 because we're triggering SIGPIPE with the

From 3f967628bc541f85cd0cd62743e59b05239b1dd9 Mon Sep 17 00:00:00 2001
From: daler <dalerr@niddk.nih.gov>
Date: Sun, 4 Apr 2021 18:08:31 -0400
Subject: [PATCH 23/23] fix name of test rnaseq config

---
 .circleci/config.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.circleci/config.yml b/.circleci/config.yml
index c2dc7b1d..eccbc364 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -216,19 +216,19 @@ variables:
           # only go to the cutadapt step.
           rm -r data
           ./run_test.sh -j 1 --use-conda -k -p -r --until cutadapt \
-            --configfile $ORIG/test/test_configs/test_rnaseq.yaml \
+            --configfile $ORIG/test/test_configs/test_rnaseq_config.yaml \
             --config sampletable=$ORIG/test/test_configs/test_sra_sampletable.tsv
 
           # Same as above, but SE
           rm -r data
           ./run_test.sh -j 1 --use-conda -k -p -r --until cutadapt \
-            --configfile $ORIG/test/test_configs/test_rnaseq.yaml \
+            --configfile $ORIG/test/test_configs/test_rnaseq_config.yaml \
             --config sampletable=$ORIG/test/test_configs/test_sra_sampletable_SE_only.tsv
 
           # test strandedness, PE
           rm -r data && cp -r /tmp/data data
           ./run_test.sh -j 2 --use-conda -k -p -r --until strand_check \
-            --configfile $ORIG/test/test_configs/test_rnaseq.yaml \
+            --configfile $ORIG/test/test_configs/test_rnaseq_config.yaml \
             --config sampletable=$ORIG/test/test_configs/test_pe_sampletable.tsv \
             && cat strandedness.tsv