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.'" 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 diff --git a/.github/workflows/test_dev.yml b/.github/workflows/test_dev.yml index ed83aa9..33a6a87 100644 --- a/.github/workflows/test_dev.yml +++ b/.github/workflows/test_dev.yml @@ -1,25 +1,32 @@ -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.'" + 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 ./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 carlisle-v9999.9999.9999-dev/bin/.test/config_lint.yaml \ + --directory output_carlisle" 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 diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..b940de0 --- /dev/null +++ b/CITATION.cff @@ -0,0 +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" + 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 +date-released: 2024-01-10 diff --git a/README.md b/README.md index 70fea14..6b2a25c 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,11 @@