From 8adc7cc3df18971e3e3b9c694f54bb1b5c8780ec Mon Sep 17 00:00:00 2001 From: slsevilla Date: Fri, 29 Sep 2023 11:16:37 -0400 Subject: [PATCH 01/26] fix: scratch path update, log file dir update --- workflow/scripts/_spooker | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/workflow/scripts/_spooker b/workflow/scripts/_spooker index d772359..9d2fd8a 100644 --- a/workflow/scripts/_spooker +++ b/workflow/scripts/_spooker @@ -35,10 +35,10 @@ if [[ $ISBIOWULF == true || $ISFRCE == true ]];then fi fi echo "spook is now in PATH:$SPOOK" - SPOOK_COPY2DIR="/scratch/carlisle" + SPOOK_COPY2DIR="/scratch/ccbrpipeliner" fi if [[ $ISFRCE == true ]];then - SPOOK_COPY2DIR="/mnt/projects/CCBR-Pipelines/pipelines/userdata/carlisle" + SPOOK_COPY2DIR="/mnt/projects/CCBR-Pipelines/pipelines/userdata/ccbrpipeliner" fi DT=$(date +%y%m%d%H%M%S) @@ -63,8 +63,8 @@ if [[ $ISBIOWULF == true || $ISFRCE == true ]];then tree $PIPELINE_OUTDIR >> $treefile cmd="$cmd $treefile" - if [[ -d "${PIPELINE_OUTDIR}/logfiles" ]];then - logdir="${PIPELINE_OUTDIR}/logfiles" + if [[ -d "${PIPELINE_OUTDIR}/logs" ]];then + logdir="${PIPELINE_OUTDIR}/logs" for thisfile in "snakemake.log" "snakemake.log.jobby" "master.log" "runtime_statistics.json";do absthisfile="${logdir}/${thisfile}" if [[ -f "$absthisfile" ]];then From 10967f45fb66eba463eaff5673d711578cb5fba0 Mon Sep 17 00:00:00 2001 From: slsevilla Date: Mon, 16 Oct 2023 12:32:47 -0400 Subject: [PATCH 02/26] run all rules --- workflow/Snakefile | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/workflow/Snakefile b/workflow/Snakefile index 1669890..1cc9346 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -197,30 +197,30 @@ rule all: # ALIGN / deeptools_heatmap unpack(run_deeptools_heatmap), - # # ALIGN / create_library_norm_scales - # unpack(run_library_norm), + # ALIGN / create_library_norm_scales + unpack(run_library_norm), - # # ALIGN / alignstats - # expand(join(RESULTSDIR,"alignment_stats","{replicate}.alignment_stats.yaml"),replicate=REPLICATES), + # ALIGN / alignstats + expand(join(RESULTSDIR,"alignment_stats","{replicate}.alignment_stats.yaml"),replicate=REPLICATES), - # # ALIGN / gather_alignstats - # join(RESULTSDIR,"alignment_stats","alignment_stats.tsv"), + # ALIGN / gather_alignstats + join(RESULTSDIR,"alignment_stats","alignment_stats.tsv"), - # # PEAKCALLS / macs2_narrow, macs2_broad, seacr_stringent, seacr_relaxed, gopeaks_narrow, gopeaks_broad - # unpack(run_macs2), - # unpack(run_seacr), - # unpack(run_gopeaks), + # PEAKCALLS / macs2_narrow, macs2_broad, seacr_stringent, seacr_relaxed, gopeaks_narrow, gopeaks_broad + unpack(run_macs2), + unpack(run_seacr), + unpack(run_gopeaks), - # # QC - # unpack(run_qc), + # QC + unpack(run_qc), - # # DIFF / create_contrast_data_files - # unpack(run_contrasts), + # DIFF / create_contrast_data_files + unpack(run_contrasts), - # # ANNOTATION / findMotif, rose, create_contrast_peakcaller_files, go_enrichment - # unpack(get_motifs), - # unpack(get_rose), - # unpack(get_enrichment) + # ANNOTATION / findMotif, rose, create_contrast_peakcaller_files, go_enrichment + unpack(get_motifs), + unpack(get_rose), + unpack(get_enrichment) # create jobby tables ## command for jobby: bash scripts/_run_jobby_on_snakemake_log logs/snakemake.log _jobby.py | tee logs/snakemake.log.jobby | cut -f2,3,18 > logs/snakemake.log.jobby.short From f79b1725fa16a84195672c4041bc1646448b2cb1 Mon Sep 17 00:00:00 2001 From: slsevilla Date: Mon, 16 Oct 2023 12:34:27 -0400 Subject: [PATCH 03/26] check for exact matches in configs --- carlisle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/carlisle b/carlisle index 7872439..175df12 100755 --- a/carlisle +++ b/carlisle @@ -194,8 +194,9 @@ function controlcheck(){ check2=`awk '{print $2}' ${WORKDIR}/config/contrasts.tsv` for sample_id in ${control_list[@]}; do - if [[ $check1 =~ $sample_id || $check2 =~ $sample_id ]]; then + if [[ $check1 == $sample_id || $check2 == $sample_id ]]; then echo "Controls ($sample_id) cannot be listed in contrast.csv - update and re-run" + echo "$check1 okkk $check2" exit 0 fi done From 1005fa03f6ba406e6016288166540d6faf25f716 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Tue, 17 Oct 2023 09:00:09 -0400 Subject: [PATCH 04/26] feat: create 'install' script --- install.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 install.sh diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..55b4aa9 --- /dev/null +++ b/install.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# usage: +# ./install.sh new/path/to/install +# examples +# ./install.sh .v2.4.0 +# /data/CCBR_Pipeliner/Pipelines/CARLISLE/dev/install.sh /data/CCBR_Pipeliner/Pipelines/CARLISLE/.v2.5.0-a +set -euo pipefail + +VERSION=$1 +mkdir -p ${VERSION}/bin +INSTALL_PATH=$(readlink -f ${VERSION}/bin) +DIRNAME=$(readlink -f $(dirname $0)) + +if [ -n "$(ls -A $INSTALL_PATH 2>/dev/null)" ] +then + echo "ERROR: directory not empty: ${INSTALL_PATH}" + echo $(ls $INSTALL_PATH) + exit 1 +fi + +# copy essential files & directories + +## carlisle CLI script +cp $DIRNAME/carlisle $INSTALL_PATH/ + +## all config & workflow scripts; +for subdir in config workflow/scripts +do + mkdir -p ${INSTALL_PATH}/$subdir + cp ${DIRNAME}/$subdir/* ${INSTALL_PATH}/$subdir +done +cp ${DIRNAME}/workflow/Snakefile ${INSTALL_PATH}/workflow + +## selected resources +mkdir -p ${INSTALL_PATH}/resources/ +cp ${DIRNAME}/resources/*.yaml ${INSTALL_PATH}/resources/ + +# export path +if [[ ":$PATH:" != *":${INSTALL_PATH}:"* ]];then + export PATH="${PATH}:${INSTALL_PATH}" +fi + +echo "${INSTALL_PATH}" From 4f75a9783dc3965d755b075277d1f53d36efe76b Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Tue, 17 Oct 2023 09:03:51 -0400 Subject: [PATCH 05/26] ci: run linter on PRs too --- .github/workflows/lintr.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lintr.yaml b/.github/workflows/lintr.yaml index ab839dc..03da921 100644 --- a/.github/workflows/lintr.yaml +++ b/.github/workflows/lintr.yaml @@ -4,6 +4,11 @@ on: branches: - master - dev + pull_request: + branches: + - master + - dev + jobs: Lintr: runs-on: ubuntu-latest @@ -22,4 +27,4 @@ jobs: touch hg38.fa genes.gtf hg38.bed hg38.tss.bed hg38_refseq.ucsc Ecoli_GCF_000005845.2_ASM584v2_genomic.fna adapters.fa && \ snakemake --lint -s /opt2/workflow/Snakefile \ -d /opt2/output_carlisle --configfile /opt2/.test/config_lint.yaml || \ - echo 'There may have been a few warnings or errors. Please read through the log to determine if its harmless.'" \ No newline at end of file + echo 'There may have been a few warnings or errors. Please read through the log to determine if its harmless.'" From 698328042116cb5b4a98d98b3e4ca2e2c6e70720 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Tue, 17 Oct 2023 09:07:07 -0400 Subject: [PATCH 06/26] ci: do a dryrun --- .github/workflows/test_dev.yml | 38 ++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test_dev.yml b/.github/workflows/test_dev.yml index ed83aa9..4d08b34 100644 --- a/.github/workflows/test_dev.yml +++ b/.github/workflows/test_dev.yml @@ -1,25 +1,37 @@ -name: DevTesting +name: test on: push: branches: + - master - dev + pull_request: + branches: + - master + - dev + jobs: deploy: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4.1.0 - uses: docker://snakemake/snakemake:v7.19.1 with: directory: '.test' - - name: Dev Testing Workflow - continue-on-error: true + - name: dryrun + shell: bash {0} run: | - docker run -v $PWD:/opt2 snakemake/snakemake:v7.19.1 /bin/bash -c \ - "mkdir -p /opt2/output_carlisle/config /opt2/output_carlisle/annotation && \ - cp -r /opt2/workflow/scripts/ /opt2/output_carlisle/ && \ - cp /opt2/resources/cluster_biowulf.yaml /opt2/output_carlisle/config/cluster.yaml && \ - cp /opt2/resources/tools_biowulf.yaml /opt2/output_carlisle/config/tools.yaml && \ - cd /opt2/output_carlisle/annotation && \ - touch hg38.fa genes.gtf hg38.bed hg38.tss.bed hg38_refseq.ucsc Ecoli_GCF_000005845.2_ASM584v2_genomic.fna adapters.fa && \ - snakemake --lint -s /opt2/workflow/Snakefile \ - -d /opt2/output_carlisle --configfile /opt2/.test/config_lint.yaml || \ - echo 'There may have been a few warnings or errors. Please read through the log to determine if its harmless.'" + # TODO: install & use `carlisle init` instead of manually copying files + mkdir output_carlisle + for dir in workflow workflow/scripts config resources + do + cp -r $dir output_carlisle + done + mkdir output_carlisle/annotation + for f in hg38.fa genes.gtf hg38.bed hg38.tss.bed hg38_refseq.ucsc Ecoli_GCF_000005845.2_ASM584v2_genomic.fna adapters.fa + do + touch output_carlisle/annotation/$f + done + # TODO: use `carlisle run --mode dryrun` + cd output_carlisle + docker run -v $PWD:/opt2/output_carlisle snakemake/snakemake:v7.19.1 /bin/bash -c \ + "cd /opt2/output_carlisle && snakemake --dryrun --configfile .test/config_lint.yaml" From 921f17bd659a7979d27641a6f721dd883f4c9c76 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Tue, 17 Oct 2023 09:19:43 -0400 Subject: [PATCH 07/26] ci: action to add issues/PRs to personal project boards --- .github/workflows/projects.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/projects.yml diff --git a/.github/workflows/projects.yml b/.github/workflows/projects.yml new file mode 100644 index 0000000..61a2816 --- /dev/null +++ b/.github/workflows/projects.yml @@ -0,0 +1,14 @@ +name: Add issues/PRs to user projects + +on: + issues: + types: + - assigned + pull_request: + types: + - assigned + +jobs: + add-to-project: + uses: CCBR/.github/.github/workflows/auto-add-user-project.yml@v0.1.0 + secrets: inherit From e2360c7853beedf732a48e34262c9affead528b3 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Wed, 18 Oct 2023 14:28:12 -0400 Subject: [PATCH 08/26] fix: don't call module purge or else it unloads ccbrpipeliner --- carlisle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/carlisle b/carlisle index 175df12..35b523a 100755 --- a/carlisle +++ b/carlisle @@ -14,7 +14,6 @@ SNAKEMAKE_VERSION="snakemake/7.19.1" SINGULARITY_VERSION="singularity/3.10.5" set -eo pipefail -module purge SCRIPTNAME="$0" SCRIPTBASENAME=$(readlink -f $(basename $0)) @@ -443,4 +442,4 @@ function main(){ } # call the main function -main "$@" \ No newline at end of file +main "$@" From af8c132c2c877e6e77f82619442157359d27b729 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Wed, 18 Oct 2023 14:29:26 -0400 Subject: [PATCH 09/26] fix: copy annotation dir --- carlisle | 2 +- install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/carlisle b/carlisle index 35b523a..6e0b37c 100755 --- a/carlisle +++ b/carlisle @@ -28,7 +28,7 @@ tools_specific_yaml="tools_biowulf.yaml" # these are relative to the workflows' base folder # these are copied into the WORKDIR ESSENTIAL_FILES="config/config.yaml config/samples.tsv config/contrasts.tsv config/fqscreen_config.conf config/multiqc_config.yaml resources/cluster_* resources/tools_*" -ESSENTIAL_FOLDERS="workflow/scripts" +ESSENTIAL_FOLDERS="workflow/scripts annotation" # set extra singularity bindings EXTRA_SINGULARITY_BINDS="-B /data/CCBR_Pipeliner/,/lscratch" diff --git a/install.sh b/install.sh index 55b4aa9..431a869 100755 --- a/install.sh +++ b/install.sh @@ -24,7 +24,7 @@ fi cp $DIRNAME/carlisle $INSTALL_PATH/ ## all config & workflow scripts; -for subdir in config workflow/scripts +for subdir in config workflow/scripts annotation do mkdir -p ${INSTALL_PATH}/$subdir cp ${DIRNAME}/$subdir/* ${INSTALL_PATH}/$subdir From 57f7d79ff4bd5062ff776134d69346250328d148 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Wed, 18 Oct 2023 14:31:32 -0400 Subject: [PATCH 10/26] fix: copy .test dir --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 431a869..976c916 100755 --- a/install.sh +++ b/install.sh @@ -24,7 +24,7 @@ fi cp $DIRNAME/carlisle $INSTALL_PATH/ ## all config & workflow scripts; -for subdir in config workflow/scripts annotation +for subdir in config workflow/scripts annotation .test do mkdir -p ${INSTALL_PATH}/$subdir cp ${DIRNAME}/$subdir/* ${INSTALL_PATH}/$subdir From 6df550e59ab8986faea56c81d6dac8b85a318c04 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Wed, 18 Oct 2023 14:42:38 -0400 Subject: [PATCH 11/26] fix: just copy the entire git repo dir during 'installation' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤷🏻‍♀️ --- install.sh | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index 976c916..810e05b 100755 --- a/install.sh +++ b/install.sh @@ -18,22 +18,8 @@ then exit 1 fi -# copy essential files & directories - -## carlisle CLI script -cp $DIRNAME/carlisle $INSTALL_PATH/ - -## all config & workflow scripts; -for subdir in config workflow/scripts annotation .test -do - mkdir -p ${INSTALL_PATH}/$subdir - cp ${DIRNAME}/$subdir/* ${INSTALL_PATH}/$subdir -done -cp ${DIRNAME}/workflow/Snakefile ${INSTALL_PATH}/workflow - -## selected resources -mkdir -p ${INSTALL_PATH}/resources/ -cp ${DIRNAME}/resources/*.yaml ${INSTALL_PATH}/resources/ +# copy entire repo, including dotfiles +cp -r ${DIRNAME}/. ${INSTALL_PATH} # export path if [[ ":$PATH:" != *":${INSTALL_PATH}:"* ]];then From 0041346c678010a79188eb0064d6f3289044c40e Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Wed, 18 Oct 2023 14:50:43 -0400 Subject: [PATCH 12/26] fix: copy cluster-specific config & tool yaml files without wildcards --- carlisle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/carlisle b/carlisle index 6e0b37c..b5f8d30 100755 --- a/carlisle +++ b/carlisle @@ -27,7 +27,7 @@ tools_specific_yaml="tools_biowulf.yaml" # essential files # these are relative to the workflows' base folder # these are copied into the WORKDIR -ESSENTIAL_FILES="config/config.yaml config/samples.tsv config/contrasts.tsv config/fqscreen_config.conf config/multiqc_config.yaml resources/cluster_* resources/tools_*" +ESSENTIAL_FILES="config/config.yaml config/samples.tsv config/contrasts.tsv config/fqscreen_config.conf config/multiqc_config.yaml" ESSENTIAL_FOLDERS="workflow/scripts annotation" # set extra singularity bindings EXTRA_SINGULARITY_BINDS="-B /data/CCBR_Pipeliner/,/lscratch" @@ -103,8 +103,8 @@ function init() { done # rename config dependent on partition used - cp $WORKDIR/config/$cluster_specific_yaml $WORKDIR/config/cluster.yaml - cp $WORKDIR/config/$tools_specific_yaml $WORKDIR/config/tools.yaml + cp ${PIPELINE_HOME}/config/$cluster_specific_yaml $WORKDIR/config/cluster.yaml + cp ${PIPELINE_HOME}/config/$tools_specific_yaml $WORKDIR/config/tools.yaml # copy essential folders for f in $ESSENTIAL_FOLDERS;do From 25c0b1af20e6301b5bdebd64c994c3b6c1e6eeaa Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 19 Oct 2023 08:27:03 -0400 Subject: [PATCH 13/26] fix: copy cluster/tool conf from resources --- carlisle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/carlisle b/carlisle index b5f8d30..37a50e0 100755 --- a/carlisle +++ b/carlisle @@ -103,8 +103,8 @@ function init() { done # rename config dependent on partition used - cp ${PIPELINE_HOME}/config/$cluster_specific_yaml $WORKDIR/config/cluster.yaml - cp ${PIPELINE_HOME}/config/$tools_specific_yaml $WORKDIR/config/tools.yaml + cp ${PIPELINE_HOME}/resources/$cluster_specific_yaml $WORKDIR/config/cluster.yaml + cp ${PIPELINE_HOME}/resources/$tools_specific_yaml $WORKDIR/config/tools.yaml # copy essential folders for f in $ESSENTIAL_FOLDERS;do From 01230a86dd928fd3fe1f07dc9182400295826776 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 19 Oct 2023 08:27:19 -0400 Subject: [PATCH 14/26] Revert "fix: just copy the entire git repo dir during 'installation'" This reverts commit 6df550e59ab8986faea56c81d6dac8b85a318c04. --- install.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 810e05b..976c916 100755 --- a/install.sh +++ b/install.sh @@ -18,8 +18,22 @@ then exit 1 fi -# copy entire repo, including dotfiles -cp -r ${DIRNAME}/. ${INSTALL_PATH} +# copy essential files & directories + +## carlisle CLI script +cp $DIRNAME/carlisle $INSTALL_PATH/ + +## all config & workflow scripts; +for subdir in config workflow/scripts annotation .test +do + mkdir -p ${INSTALL_PATH}/$subdir + cp ${DIRNAME}/$subdir/* ${INSTALL_PATH}/$subdir +done +cp ${DIRNAME}/workflow/Snakefile ${INSTALL_PATH}/workflow + +## selected resources +mkdir -p ${INSTALL_PATH}/resources/ +cp ${DIRNAME}/resources/*.yaml ${INSTALL_PATH}/resources/ # export path if [[ ":$PATH:" != *":${INSTALL_PATH}:"* ]];then From d4952ee7cd05c86cc9bf0320ab12ca348d0b1f60 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 19 Oct 2023 09:10:04 -0400 Subject: [PATCH 15/26] refactor!: get version from installation path VERSION will be blank if it doesn't match the semantic versioning format https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string --- carlisle | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/carlisle b/carlisle index 37a50e0..c24238f 100755 --- a/carlisle +++ b/carlisle @@ -32,24 +32,22 @@ ESSENTIAL_FOLDERS="workflow/scripts annotation" # set extra singularity bindings EXTRA_SINGULARITY_BINDS="-B /data/CCBR_Pipeliner/,/lscratch" -function get_git_commitid_tag() { - # This function gets the latest git commit id and tag - # Input is PIPELINE_HOME folder which is a git folder - cd $1 - gid=$(git rev-parse HEAD) - tag=$(git describe --tags $gid 2>/dev/null) - echo -ne "$gid\t$tag" -} - # ## setting PIPELINE_HOME PIPELINE_HOME=$(readlink -f $(dirname "$0")) echo "Pipeline Dir: $PIPELINE_HOME" # set snakefile SNAKEFILE="${PIPELINE_HOME}/workflow/Snakefile" -# get github commit tag -GIT_COMMIT_TAG=$(get_git_commitid_tag $PIPELINE_HOME) -echo "Git Commit/Tag: $GIT_COMMIT_TAG" +function get_version_from_path() { + PIPELINE_HOME=$1 + VERSION="$(echo $PIPELINE_HOME | grep -oP 'v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?' - )" + echo -ne $VERSION +} + +# get version from directory name +# regex source: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string +#echo "Version: $VERSION" +echo "Version: $(get_version_from_path $PIPELINE_HOME)" function usage() { # This function prints generic usage of the wrapper script. From 852c79f40e0a013a3d7ed4cf7cf5ed5c455f28a1 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 19 Oct 2023 09:15:30 -0400 Subject: [PATCH 16/26] fix: recursively copy most directories --- install.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 976c916..59e7a29 100755 --- a/install.sh +++ b/install.sh @@ -24,16 +24,11 @@ fi cp $DIRNAME/carlisle $INSTALL_PATH/ ## all config & workflow scripts; -for subdir in config workflow/scripts annotation .test +for subdir in annotation config workflow resources .test do mkdir -p ${INSTALL_PATH}/$subdir - cp ${DIRNAME}/$subdir/* ${INSTALL_PATH}/$subdir + cp -r ${DIRNAME}/$subdir/* ${INSTALL_PATH}/$subdir done -cp ${DIRNAME}/workflow/Snakefile ${INSTALL_PATH}/workflow - -## selected resources -mkdir -p ${INSTALL_PATH}/resources/ -cp ${DIRNAME}/resources/*.yaml ${INSTALL_PATH}/resources/ # export path if [[ ":$PATH:" != *":${INSTALL_PATH}:"* ]];then From 272e2622fd7478208721747ee5cf7d26e56c573f Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 19 Oct 2023 09:32:15 -0400 Subject: [PATCH 17/26] ci: use install script & carlisle init --- .github/workflows/test_dev.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test_dev.yml b/.github/workflows/test_dev.yml index 4d08b34..5e27cb0 100644 --- a/.github/workflows/test_dev.yml +++ b/.github/workflows/test_dev.yml @@ -20,18 +20,8 @@ jobs: - name: dryrun shell: bash {0} run: | - # TODO: install & use `carlisle init` instead of manually copying files - mkdir output_carlisle - for dir in workflow workflow/scripts config resources - do - cp -r $dir output_carlisle - done - mkdir output_carlisle/annotation - for f in hg38.fa genes.gtf hg38.bed hg38.tss.bed hg38_refseq.ucsc Ecoli_GCF_000005845.2_ASM584v2_genomic.fna adapters.fa - do - touch output_carlisle/annotation/$f - done + bash ./install.sh ./carlisle-v9999.9999.9999-dev + ./carlisle-v9999.9999.9999-dev/bin/carlisle --runmode=init --workdir=./output_carlisle # TODO: use `carlisle run --mode dryrun` - cd output_carlisle - docker run -v $PWD:/opt2/output_carlisle snakemake/snakemake:v7.19.1 /bin/bash -c \ + docker run -v ./output_carlisle:/opt2/output_carlisle snakemake/snakemake:v7.19.1 /bin/bash -c \ "cd /opt2/output_carlisle && snakemake --dryrun --configfile .test/config_lint.yaml" From e48957133ef61f62e21ae4d4c3ac0c74e47cc046 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 19 Oct 2023 09:58:25 -0400 Subject: [PATCH 18/26] ci: make installed carlisle available to docker --- .github/workflows/test_dev.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_dev.yml b/.github/workflows/test_dev.yml index 5e27cb0..4bee8c1 100644 --- a/.github/workflows/test_dev.yml +++ b/.github/workflows/test_dev.yml @@ -20,8 +20,13 @@ jobs: - name: dryrun shell: bash {0} run: | - bash ./install.sh ./carlisle-v9999.9999.9999-dev - ./carlisle-v9999.9999.9999-dev/bin/carlisle --runmode=init --workdir=./output_carlisle + bash ./install.sh ./test-workdir/carlisle-v9999.9999.9999-dev + ./test-workdir/carlisle-v9999.9999.9999-dev/bin/carlisle --runmode=init --workdir=./test-workdir/output_carlisle + cp ./test-workdir/carlisle-v9999.9999.9999-dev/bin/.test/config_lint.yaml ./test-workdir/output_carlisle/config/config.yaml # TODO: use `carlisle run --mode dryrun` - docker run -v ./output_carlisle:/opt2/output_carlisle snakemake/snakemake:v7.19.1 /bin/bash -c \ - "cd /opt2/output_carlisle && snakemake --dryrun --configfile .test/config_lint.yaml" + docker run -v ./test-workdir/:/opt2 snakemake/snakemake:v7.19.1 /bin/bash -c \ + "cd /opt2 && snakemake \ + -s ./carlisle-v9999.9999.9999-dev/bin/workflow/Snakefile \ + --dryrun \ + --configfile .test/config_lint.yaml\ + --workdir /opt2/test-workdir/output_carlisle" From 82fd7cd3aba0f7206868c56df66237b437863ec8 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 19 Oct 2023 10:03:58 -0400 Subject: [PATCH 19/26] fix: directory snakemake arg --- .github/workflows/test_dev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_dev.yml b/.github/workflows/test_dev.yml index 4bee8c1..33a6a87 100644 --- a/.github/workflows/test_dev.yml +++ b/.github/workflows/test_dev.yml @@ -28,5 +28,5 @@ jobs: "cd /opt2 && snakemake \ -s ./carlisle-v9999.9999.9999-dev/bin/workflow/Snakefile \ --dryrun \ - --configfile .test/config_lint.yaml\ - --workdir /opt2/test-workdir/output_carlisle" + --configfile carlisle-v9999.9999.9999-dev/bin/.test/config_lint.yaml \ + --directory output_carlisle" From 0fb95c25b079898517eaa686f102243ad06753c3 Mon Sep 17 00:00:00 2001 From: slsevilla Date: Mon, 8 Jan 2024 18:00:13 -0500 Subject: [PATCH 20/26] docs: adding citation file --- CITATION.cff | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 CITATION.cff diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..9ea2218 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,21 @@ +cff-version: 1.2.0 +message: "If you use CARLISLE, please cite it as below." +authors: +- family-names: "Sevilla" + given-names: "Samantha" + orcid: "https://orcid.org/0000-0002-8734-9875" +- family-names: "Koparde" + given-names: "Vishal" + orcid: "https://orcid.org/0000-0001-8978-8495" +- family-names: "Chou" + given-names: "Hsien-chao" + orcid: "https://orcid.org/0000-0002-4870-9663" +- family-names: "Kim" + given-names: "Sohyoung" +- family-names: "Hu" + given-names: "Yue" +- family-names: "Saloura" + given-names: "Vassiliki" +title: "Cut And Run anaLysIS pipeLinE (CARLISLE)" +version: 2.4.1 +url: "https://github.com/CCBR/CARLISLE" \ No newline at end of file From 463b23d6e906e4017a9d9b1c3ad5996df8fc649d Mon Sep 17 00:00:00 2001 From: slsevilla Date: Mon, 8 Jan 2024 18:01:17 -0500 Subject: [PATCH 21/26] docs: creating version docs --- VERSION | 1 + 1 file changed, 1 insertion(+) create mode 100644 VERSION diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..005119b --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +2.4.1 From 04c0a702f7d296215f83b234cdbe08340f82b2ee Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 11 Jan 2024 12:21:21 -0500 Subject: [PATCH 22/26] chore: add pre-commit & prettier config files --- .pre-commit-config.yaml | 48 +++++++++++++++++++++++++++++++++++++++++ .prettierignore | 8 +++++++ .prettierrc | 7 ++++++ 3 files changed, 63 insertions(+) create mode 100644 .pre-commit-config.yaml create mode 100644 .prettierignore create mode 100644 .prettierrc diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..12dc373 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,48 @@ +default_install_hook_types: [pre-commit, commit-msg] +default_stages: [pre-commit] +exclude: | + (?x)( + ^assets/| + ^docs/.*.html| + ^_extensions/ + ) +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v1.2.3 + hooks: + - id: check-added-large-files + - id: end-of-file-fixer + - id: trailing-whitespace + - id: check-json + # spell check + - repo: https://github.com/codespell-project/codespell + rev: v2.2.4 + hooks: + - id: codespell + # https://github.com/codespell-project/codespell/issues/1498 + # Python formatting + - repo: https://github.com/psf/black + rev: 23.7.0 + hooks: + - id: black + # R formatting + - repo: https://github.com/lorenzwalthert/precommit + rev: v0.1.2 + hooks: + - id: style-files + # general linting + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v2.7.1 + hooks: + - id: prettier + # enforce commit format + - repo: https://github.com/compilerla/conventional-pre-commit + rev: v2.3.0 + hooks: + - id: conventional-pre-commit + stages: [commit-msg] + args: [] + - repo: https://github.com/citation-file-format/cffconvert + rev: 054bda51dbe278b3e86f27c890e3f3ac877d616c + hooks: + - id: validate-cff diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..f0a6037 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,8 @@ +# gitignore +.nextflow* +work/ +data/ +results/ +.DS_Store +*.code-workspace +assets/*.html diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..81ee40a --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +overrides: + - files: + - "*.md" + - "*.cff" + - ".prettierrc" + options: + tabWidth: 2 From 4f451fabfaafea2594501a3772bdd5e2a19b51a0 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 11 Jan 2024 12:22:02 -0500 Subject: [PATCH 23/26] chore: update citation cff w/ zenodo DOI, affiliations, release date --- CITATION.cff | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 9ea2218..b940de0 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,21 +1,29 @@ cff-version: 1.2.0 message: "If you use CARLISLE, please cite it as below." authors: -- family-names: "Sevilla" - given-names: "Samantha" - orcid: "https://orcid.org/0000-0002-8734-9875" -- family-names: "Koparde" - given-names: "Vishal" - orcid: "https://orcid.org/0000-0001-8978-8495" -- family-names: "Chou" - given-names: "Hsien-chao" - orcid: "https://orcid.org/0000-0002-4870-9663" -- family-names: "Kim" - given-names: "Sohyoung" -- family-names: "Hu" - given-names: "Yue" -- family-names: "Saloura" - given-names: "Vassiliki" + - family-names: "Sevilla" + given-names: "Samantha" + orcid: "https://orcid.org/0000-0002-8734-9875" + affiliation: Advanced Biomedical Computational Science, Frederick National Laboratory for Cancer Research, Frederick, MD 21702, USA + - family-names: "Koparde" + given-names: "Vishal" + orcid: "https://orcid.org/0000-0001-8978-8495" + affiliation: Advanced Biomedical Computational Science, Frederick National Laboratory for Cancer Research, Frederick, MD 21702, USA + - family-names: "Chou" + given-names: "Hsien-chao" + orcid: "https://orcid.org/0000-0002-4870-9663" + - family-names: "Kim" + given-names: "Sohyoung" + - family-names: "Hu" + given-names: "Yue" + - family-names: "Saloura" + given-names: "Vassiliki" title: "Cut And Run anaLysIS pipeLinE (CARLISLE)" +url: https://ccbr.github.io/CARLISLE/ +repository-code: https://github.com/CCBR/CARLISLE +identifiers: + - description: Archived snapshots of all versions + type: doi + value: 10.5281/zenodo.10483876 version: 2.4.1 -url: "https://github.com/CCBR/CARLISLE" \ No newline at end of file +date-released: 2024-01-10 From 5c88b7c4aea464e36827bb9ff7924015471b98e2 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 11 Jan 2024 12:25:02 -0500 Subject: [PATCH 24/26] docs: add DOI to readme --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 70fea14..86643fd 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,11 @@
- - [![GitHub releases](https://img.shields.io/github/release/CCBR/CARLISLE)](https://github.com/CCBR/CARLISLE/releases) [![GitHub issues](https://img.shields.io/github/issues/CCBR/CARLISLE)](https://github.com/CCBR/CARLISLE/issues) [![GitHub license](https://img.shields.io/github/license/CCBR/CARLISLE)](https://github.com/CCBR/CARLISLE/blob/master/LICENSE) + +[![GitHub releases](https://img.shields.io/github/release/CCBR/CARLISLE)](https://github.com/CCBR/CARLISLE/releases) +[![GitHub issues](https://img.shields.io/github/issues/CCBR/CARLISLE)](https://github.com/CCBR/CARLISLE/issues) +[![GitHub license](https://img.shields.io/github/license/CCBR/CARLISLE)](https://github.com/CCBR/CARLISLE/blob/master/LICENSE) +[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10483876.svg)](https://doi.org/10.5281/zenodo.10483876)
From 72e6108eca64efdc5ae769892a8d9bb0e36f2a4b Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 11 Jan 2024 12:25:41 -0500 Subject: [PATCH 25/26] style: move badges outside center div --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 86643fd..7baa755 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,13 @@
+
[![GitHub releases](https://img.shields.io/github/release/CCBR/CARLISLE)](https://github.com/CCBR/CARLISLE/releases) [![GitHub issues](https://img.shields.io/github/issues/CCBR/CARLISLE)](https://github.com/CCBR/CARLISLE/issues) [![GitHub license](https://img.shields.io/github/license/CCBR/CARLISLE)](https://github.com/CCBR/CARLISLE/blob/master/LICENSE) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10483876.svg)](https://doi.org/10.5281/zenodo.10483876) - - This snakemake pipeline is built to run on [Biowulf](https://hpc.nih.gov/). For comments/suggestions/advice please reach out to [Samantha Chill](mailto:samantha.sevilla@nih.gov). From 390d6c187391e28b3682f45741e99a1fae153ec7 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 11 Jan 2024 12:29:30 -0500 Subject: [PATCH 26/26] style: fix whitespace for badge center alignment --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7baa755..6b2a25c 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,14 @@
-
-[![GitHub releases](https://img.shields.io/github/release/CCBR/CARLISLE)](https://github.com/CCBR/CARLISLE/releases) +[![GitHub releases](https://img.shields.io/github/release/CCBR/CARLISLE)](https://github.com/CCBR/CARLISLE/releases) [![GitHub issues](https://img.shields.io/github/issues/CCBR/CARLISLE)](https://github.com/CCBR/CARLISLE/issues) -[![GitHub license](https://img.shields.io/github/license/CCBR/CARLISLE)](https://github.com/CCBR/CARLISLE/blob/master/LICENSE) +[![GitHub license](https://img.shields.io/github/license/CCBR/CARLISLE)](https://github.com/CCBR/CARLISLE/blob/master/LICENSE) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10483876.svg)](https://doi.org/10.5281/zenodo.10483876) + + This snakemake pipeline is built to run on [Biowulf](https://hpc.nih.gov/). For comments/suggestions/advice please reach out to [Samantha Chill](mailto:samantha.sevilla@nih.gov).