Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] refactor #428

Draft
wants to merge 79 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
a93a6c3
Fixed render_r1_r2 function(s) in Snakefiles
Oct 10, 2024
dfa2353
Merge branch 'master' into fix_406
daler Oct 11, 2024
d0a0300
add newline back in
daler Oct 13, 2024
f7e98ef
Merge pull request #413 from lcdb/fix_406
daler Oct 15, 2024
7d92555
Make strand_arg a param
b-full Oct 16, 2024
d168bb0
Merge pull request #415 from lcdb/fix_issue_405
daler Oct 19, 2024
b808d10
add Plodia interpunctella reference config (#417)
daler Oct 24, 2024
47b379a
Update plotting.R (#423)
njohnso6 Dec 4, 2024
aeca4c2
Change SRA fastq directory (#418)
b-full Dec 14, 2024
a2e5448
mambaforge -> miniforge
daler Jan 1, 2025
4487d90
latest ubuntu for testing
daler Jan 1, 2025
836fff0
https for downloading chainfile
daler Jan 1, 2025
09dedd7
noninteractive apt install
daler Jan 1, 2025
b6c663a
noninteractive apt install
daler Jan 1, 2025
2fc5d71
debug url
daler Jan 1, 2025
a470398
for test "external" data, do not do liftover
daler Jan 1, 2025
ed9161d
remove support for GAT
daler Jan 1, 2025
becdf21
GAT no longer used, remove from requirements
daler Jan 2, 2025
dfaec3e
don't pin python
daler Jan 2, 2025
b65f4cd
pin snakemake >8
daler Jan 2, 2025
0f81f07
update env.yml
daler Jan 2, 2025
f039b64
update snakefiles and lib to reflect changes in snakemake 8
daler Jan 2, 2025
bec163d
rm --bias for kallisto, which was causing segfaults
daler Jan 2, 2025
cc310fb
update test args -r --> --reason for snakemake 8
daler Jan 2, 2025
54514e9
rm --reason for snakemake 8
daler Jan 2, 2025
06c147b
disable colocalization workflow
daler Jan 3, 2025
bea0910
delete lots of stuff
daler Jan 3, 2025
060c2f8
add new references.smk
daler Jan 3, 2025
8bb7398
simplify config
daler Jan 3, 2025
79081fd
utils, common, and helpers are all now in utils
daler Jan 3, 2025
8337b98
cleanup patterns_targets
daler Jan 3, 2025
e8d16df
rnaseq workflow
daler Jan 3, 2025
36fd2e0
specify references dir from config
daler Jan 3, 2025
c321ed3
round of cleanup
daler Jan 3, 2025
32f43bc
better use of params
daler Jan 3, 2025
a9216b9
try moving utils.py to common.smk
daler Jan 4, 2025
300e73d
add strand_check and sra rules
daler Jan 4, 2025
407332e
mega refactor, still only partway done....
daler Jan 4, 2025
e3308bf
back to utils.py
daler Jan 7, 2025
1b62efc
rm libsizes table from multiqc
daler Jan 7, 2025
16d8489
use patterns
daler Jan 7, 2025
d6b512a
mv back to workflows/references/Snakefile
daler Jan 7, 2025
99f3f6b
fix params for bigwig
daler Jan 7, 2025
bf276c3
use slightly cleaner syntax
daler Jan 7, 2025
4328264
always put params directly before run/shell
daler Jan 7, 2025
5134c9e
run snakefmt on references
daler Jan 7, 2025
0b9beec
run snakefmt on rnaseq (and then re-add some comments that caused fai…
daler Jan 7, 2025
6968e4f
move wrappers to scripts
daler Jan 11, 2025
8013417
overhaul and simplify preprocessor
daler Jan 11, 2025
595eddf
add bed_to_bigbed as script
daler Jan 11, 2025
95cefea
add peakcallers to requirements.txt
daler Jan 11, 2025
c357763
clean up log handling for epic2
daler Jan 11, 2025
52ac28a
test settings overhaul
daler Jan 11, 2025
9024aa6
comment sampletable
daler Jan 11, 2025
2483b98
various rnaseq fixes
daler Jan 11, 2025
227646c
chipseq overhaul and simplification
daler Jan 11, 2025
4136207
clean up some tests
daler Jan 12, 2025
d7bb492
convert rrna table to script
daler Jan 12, 2025
66f5a11
fix test on preprocessor
daler Jan 12, 2025
bfdbf5e
updated env yaml
daler Jan 12, 2025
a466da0
fix import
daler Jan 12, 2025
eb68925
fix strand check
daler Jan 12, 2025
8f33026
split featurecounts
daler Jan 12, 2025
39209ce
all sorts of fixes and cleanup
daler Jan 12, 2025
155307a
sra for chipseq
daler Jan 12, 2025
fd1c1c3
clean out test suite
daler Jan 12, 2025
d322e33
add strandcheck back to snakefile
daler Jan 12, 2025
8b6b52a
don't use patterns any more
daler Jan 14, 2025
d5799fa
snakefmt cleanup
daler Jan 14, 2025
da2fc32
rrna_libsizes_table script avoids utils
daler Jan 19, 2025
b049ef6
use mem and disk rather than mem_mb and disk_mb
daler Jan 19, 2025
650e60f
convert to mem and disk in references
daler Jan 19, 2025
d5db4a5
spell out params fully in wrapper
daler Jan 19, 2025
b3a7d94
timestamped log file for slurm wrapper
daler Jan 19, 2025
aa437be
rm wrappers
daler Jan 20, 2025
9f00366
resources to strings
daler Jan 20, 2025
65d2e3b
rm chipseq patterns
daler Jan 20, 2025
3b57a27
update chipseq_trackhub.py
daler Jan 20, 2025
4e86e16
update rnaseq_trackhub.py
daler Jan 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 61 additions & 82 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ variables:
# default settings for all steps
defaults: &defaults
docker:
- image: ubuntu:20.04
- image: ubuntu:latest

# --------------------------------------------------------------------------
# The caching dramatically speeds up testing time, because we can do the
Expand All @@ -28,7 +28,7 @@ variables:
save_cache:
key: v5-{{ checksum "env.yml" }}-{{ checksum "env-r.yml" }}
paths:
- /opt/mambaforge
- /opt/miniforge

# this file is created by sra-tools upon installation by conda, and so
# needs to be included in the cache otherwise fastq-dump thinks it's
Expand All @@ -48,6 +48,7 @@ variables:
name: Set path
command: |
# x11-utils required to avoid R::png() segfaulting
export DEBIAN_FRONTEND=noninteractive
apt update && apt install -y \
curl \
git \
Expand All @@ -73,7 +74,7 @@ variables:

# Note that if we don't escape \$PATH, we'll be stuck with the exact
# PATH defined here, which will break anything needing conda envs.
echo "export PATH=\$PATH:/opt/mambaforge/bin" >> $BASH_ENV
echo "export PATH=\$PATH:/opt/miniforge/bin" >> $BASH_ENV
source $BASH_ENV


Expand All @@ -85,28 +86,16 @@ variables:
command: |
source $BASH_ENV
echo $PATH
# /opt/mambaforge will only exist if there was a cache restore; otherwise we'll make it here.
# /opt/miniforge will only exist if there was a cache restore; otherwise we'll make it here.
#
# Use mambaforge which comes with mamba.
if [ ! -e /opt/mambaforge ]; then
curl -L https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh > mambaforge.sh
bash mambaforge.sh -b -p /opt/mambaforge
source "/opt/mambaforge/etc/profile.d/conda.sh"
source "/opt/mambaforge/etc/profile.d/mamba.sh"
if [ ! -e /opt/miniforge ]; then
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh -b -p /opt/miniforge
source "/opt/miniforge/etc/profile.d/conda.sh"
conda activate

which conda
which mamba
mamba --version

# Note that mambaforge doesn't come with the defaults channel, but
# we're adding it here at the beginning to simulate what most users
# probably have locally (and following the bioconda docs). Using
# strict channel priority means we should [theoretically] never
# pull packages from defaults because they all exist on
# conda-forge.
conda config --system --add channels defaults

conda --version
conda config --system --add channels bioconda
conda config --system --add channels conda-forge
conda config --system --set channel_priority strict
Expand All @@ -115,10 +104,10 @@ variables:
# https://docs.conda.io/projects/conda-build/en/latest/resources/link-scripts.html,
# post-link scripts should not depend on any installed or
# to-be-installed conda packages...but they do.
mamba install -n base r-base yq
conda install -n base r-base yq

time mamba env create -n $LCDBWF_ENV --file env.yml
time mamba env create -n $LCDBWF_ENV_R --file env-r.yml
time conda env create -n $LCDBWF_ENV --file env.yml
time conda env create -n $LCDBWF_ENV_R --file env-r.yml
fi

# --------------------------------------------------------------------------
Expand All @@ -127,7 +116,7 @@ variables:
run:
name: Download example data
command: |
source /opt/mambaforge/etc/profile.d/conda.sh
source /opt/miniforge/etc/profile.d/conda.sh
conda activate $LCDBWF_ENV
conda info --envs
conda config --show
Expand All @@ -151,7 +140,7 @@ variables:
cp $ORIG/workflows/rnaseq/run_test.sh $DEPLOY/workflows/rnaseq/run_test.sh
cp $ORIG/workflows/rnaseq/run_downstream_test.sh $DEPLOY/workflows/rnaseq/run_downstream_test.sh
cp $ORIG/workflows/references/run_test.sh $DEPLOY/workflows/references/run_test.sh
cp $ORIG/workflows/colocalization/run_test.sh $DEPLOY/workflows/colocalization/run_test.sh
# cp $ORIG/workflows/colocalization/run_test.sh $DEPLOY/workflows/colocalization/run_test.sh

mkdir $DEPLOY/ci
mkdir $DEPLOY/test
Expand All @@ -172,7 +161,7 @@ variables:
run:
name: Run pytest suite and testthat suite
command: |
source /opt/mambaforge/etc/profile.d/conda.sh
source /opt/miniforge/etc/profile.d/conda.sh
conda activate $LCDBWF_ENV
# run unit tests and doctests for the modules in lib
test/lcdb-wf-test unit_tests --pytest
Expand All @@ -194,9 +183,9 @@ variables:
name: chipseq workflow
command: |
cd $DEPLOY/workflows/chipseq
source /opt/mambaforge/etc/profile.d/conda.sh
source /opt/miniforge/etc/profile.d/conda.sh
conda activate $LCDBWF_ENV
$DEPLOY/test/lcdb-wf-test chipseq --run-workflow --use-conda -j2 -k -p -r
$DEPLOY/test/lcdb-wf-test chipseq --run-workflow --use-conda -j2 -k -p
$DEPLOY/test/lcdb-wf-test chipseq --trackhub

# --------------------------------------------------------------------------
Expand All @@ -208,10 +197,10 @@ variables:
name: chipseq misc
command: |
cd $DEPLOY/workflows/chipseq
source /opt/mambaforge/etc/profile.d/conda.sh
source /opt/miniforge/etc/profile.d/conda.sh
conda activate $LCDBWF_ENV

./run_test.sh --use-conda -j2 -k -p -r \
./run_test.sh --use-conda -j2 -k -p \
--configfile $ORIG/test/test_configs/test_chipseq_regression.yaml \
--config sampletable=$ORIG/test/test_configs/chipseq_one_run.tsv \
merged_bigwigs="{}" \
Expand All @@ -231,27 +220,17 @@ variables:
--until bed_to_bigbed
fi

# --------------------------------------------------------------------------
# Standard references workflow.
references-step: &references-step
run:
name: references workflow
command: |
source /opt/mambaforge/etc/profile.d/conda.sh
conda activate $LCDBWF_ENV
$DEPLOY/test/lcdb-wf-test references --run-workflow --configfile=config/config.yaml -j2 -p -r -k --orig $ORIG

# --------------------------------------------------------------------------
# Standard RNA-seq workflow
rnaseq-step: &rnaseq-step
run:
name: rnaseq workflow
command: |
cd $DEPLOY
source /opt/mambaforge/etc/profile.d/conda.sh
source /opt/miniforge/etc/profile.d/conda.sh
conda activate $LCDBWF_ENV
$DEPLOY/test/lcdb-wf-test rnaseq --run-workflow -n
$DEPLOY/test/lcdb-wf-test rnaseq --run-workflow --use-conda -j2 -k -p -r --orig $ORIG
$DEPLOY/test/lcdb-wf-test rnaseq --run-workflow --use-conda -j2 -k -p --orig $ORIG

$DEPLOY/test/lcdb-wf-test rnaseq --trackhub --orig $ORIG

Expand All @@ -276,19 +255,19 @@ variables:
command: |
ORIG=$(pwd)
cd $DEPLOY
source /opt/mambaforge/etc/profile.d/conda.sh
source /opt/miniforge/etc/profile.d/conda.sh
conda activate $LCDBWF_ENV

# Check the help for test/lcdb-wf-test to see what args these
# provide; some of them use the --until argument to restrict the
# rules that are run. Note the use of --orig $ORIG to use the test
# configs from the original clone rather than the deployed directory.
$DEPLOY/test/lcdb-wf-test rnaseq --run-workflow --sra-pe -k -r -p -j2 --use-conda --orig $ORIG
$DEPLOY/test/lcdb-wf-test rnaseq --run-workflow --sra-se -k -r -p -j2 --use-conda --orig $ORIG
$DEPLOY/test/lcdb-wf-test rnaseq --run-workflow --strandedness-pe -k -r -p -j2 --use-conda --orig $ORIG
$DEPLOY/test/lcdb-wf-test rnaseq --run-workflow --star-2pass -k -r -p -j2 --use-conda --orig $ORIG
$DEPLOY/test/lcdb-wf-test rnaseq --run-workflow --star-1pass -k -r -p -j2 --use-conda --orig $ORIG
$DEPLOY/test/lcdb-wf-test rnaseq --run-workflow --pe -k -r -p -j2 --use-conda --orig $ORIG
$DEPLOY/test/lcdb-wf-test rnaseq --run-workflow --sra-pe -k -p -j2 --use-conda --orig $ORIG
$DEPLOY/test/lcdb-wf-test rnaseq --run-workflow --sra-se -k -p -j2 --use-conda --orig $ORIG
$DEPLOY/test/lcdb-wf-test rnaseq --run-workflow --strandedness-pe -k -p -j2 --use-conda --orig $ORIG
$DEPLOY/test/lcdb-wf-test rnaseq --run-workflow --star-2pass -k -p -j2 --use-conda --orig $ORIG
$DEPLOY/test/lcdb-wf-test rnaseq --run-workflow --star-1pass -k -p -j2 --use-conda --orig $ORIG
$DEPLOY/test/lcdb-wf-test rnaseq --run-workflow --pe -k -p -j2 --use-conda --orig $ORIG



Expand All @@ -299,9 +278,9 @@ variables:
name: colocalization workflow
command: |
cd $DEPLOY/workflows/colocalization
source /opt/mambaforge/etc/profile.d/conda.sh
source /opt/miniforge/etc/profile.d/conda.sh
conda activate $LCDBWF_ENV
$DEPLOY/test/lcdb-wf-test colocalization --run-workflow -k -r -p -j2 --use-conda --orig $ORIG
$DEPLOY/test/lcdb-wf-test colocalization --run-workflow -k -p -j2 --use-conda --orig $ORIG

# --------------------------------------------------------------------------
# Syntax note: All of the steps above, with their "&step-name" labels, can be
Expand Down Expand Up @@ -410,23 +389,23 @@ jobs:
- *get-data
- *rnaseq-misc-step

colocalization:
<<: *defaults
steps:
- checkout
- *restore_cache
- *set-path
- *get-data
- *colocalization-step

references:
<<: *defaults
steps:
- checkout
- *restore_cache
- *set-path
- *get-data
- *references-step
# colocalization:
# <<: *defaults
# steps:
# - checkout
# - *restore_cache
# - *set-path
# - *get-data
# - *colocalization-step

# references:
# <<: *defaults
# steps:
# - checkout
# - *restore_cache
# - *set-path
# - *get-data
# - *references-step

build-docs:
<<: *defaults
Expand All @@ -438,9 +417,9 @@ jobs:
- run:
name: Install sphinx
command: |
source /opt/mambaforge/etc/profile.d/conda.sh
source /opt/miniforge/etc/profile.d/conda.sh
conda activate lcdb-wf-test
mamba install -y sphinx make yaml
conda install -y sphinx make yaml
- run:
name: OK for unknown github host
command: mkdir -p ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
Expand All @@ -450,7 +429,7 @@ jobs:
- run:
name: Build and upload docs
command: |
source /opt/mambaforge/etc/profile.d/conda.sh
source /opt/miniforge/etc/profile.d/conda.sh
conda activate lcdb-wf-test
ci/build-docs.sh
- store_artifacts:
Expand All @@ -466,7 +445,7 @@ jobs:
- run:
name: Report environment
command: |
source /opt/mambaforge/etc/profile.d/conda.sh
source /opt/miniforge/etc/profile.d/conda.sh
conda env export -n lcdb-wf-test > /tmp/env.yaml
conda env export -n lcdb-wf-test-r > /tmp/env-r.yaml
- store_artifacts:
Expand Down Expand Up @@ -500,14 +479,14 @@ workflows:
requires:
- initial-setup
- pytest
- references:
requires:
- initial-setup
- pytest
- colocalization:
requires:
- initial-setup
- pytest
# - references:
# requires:
# - initial-setup
# - pytest
# - colocalization:
# requires:
# - initial-setup
# - pytest
- build-docs:
requires:
- initial-setup
Expand All @@ -518,4 +497,4 @@ workflows:
- chipseq
- chipseq-misc
- references
- colocalization
# - colocalization
Loading