Skip to content
Snippets Groups Projects
Unverified Commit dd40c69e authored by Nicolas Servant's avatar Nicolas Servant Committed by GitHub
Browse files

Merge pull request #72 from nservant/dev

Bump v1.2.2 - Template fix
parents aed01737 12edacc2
No related branches found
No related tags found
No related merge requests found
Showing
with 294 additions and 93 deletions
# Dockstore config version, not pipeline version
version: 1.2
workflows:
- subclass: nfl
primaryDescriptorPath: /nextflow.config
...@@ -48,7 +48,7 @@ These tests are run both with the latest available version of `Nextflow` and als ...@@ -48,7 +48,7 @@ These tests are run both with the latest available version of `Nextflow` and als
## Patch ## Patch
: warning: Only in the unlikely and regretful event of a release happening with a bug. :warning: Only in the unlikely and regretful event of a release happening with a bug.
* On your own fork, make a new branch `patch` based on `upstream/master`. * On your own fork, make a new branch `patch` based on `upstream/master`.
* Fix the bug, and bump version (X.Y.Z+1). * Fix the bug, and bump version (X.Y.Z+1).
...@@ -59,3 +59,4 @@ For further information/help, please consult the [nf-core/hic documentation](htt ...@@ -59,3 +59,4 @@ For further information/help, please consult the [nf-core/hic documentation](htt
don't hesitate to get in touch on the nf-core Slack [#hic](https://nfcore.slack.com/channels/hic) channel don't hesitate to get in touch on the nf-core Slack [#hic](https://nfcore.slack.com/channels/hic) channel
([join our Slack here](https://nf-co.re/join/slack)). ([join our Slack here](https://nf-co.re/join/slack)).
For further information/help, please consult the [nf-core/hic documentation](https://nf-co.re/hic/docs) and don't hesitate to get in touch on the nf-core Slack [#hic](https://nfcore.slack.com/channels/hic) channel ([join our Slack here](https://nf-co.re/join/slack)).
<!--
# nf-core/hic bug report # nf-core/hic bug report
Hi there! Hi there!
Thanks for telling us about a problem with the pipeline. Thanks for telling us about a problem with the pipeline.
Please delete this text and anything that's not relevant from the template below: Please delete this text and anything that's not relevant from the template below:
-->
## Describe the bug ## Description of the bug
A clear and concise description of what the bug is. <!-- A clear and concise description of what the bug is. -->
## Steps to reproduce ## Steps to reproduce
Steps to reproduce the behaviour: Steps to reproduce the behaviour:
1. Command line: `nextflow run ...` 1. Command line: <!-- [e.g. `nextflow run ...`] -->
2. See error: _Please provide your error message_ 2. See error: <!-- [Please provide your error message] -->
## Expected behaviour ## Expected behaviour
A clear and concise description of what you expected to happen. <!-- A clear and concise description of what you expected to happen. -->
## System ## System
...@@ -39,4 +41,4 @@ A clear and concise description of what you expected to happen. ...@@ -39,4 +41,4 @@ A clear and concise description of what you expected to happen.
## Additional context ## Additional context
Add any other context about the problem here. <!-- Add any other context about the problem here. -->
<!--
# nf-core/hic feature request # nf-core/hic feature request
Hi there! Hi there!
...@@ -5,20 +6,23 @@ Hi there! ...@@ -5,20 +6,23 @@ Hi there!
Thanks for suggesting a new feature for the pipeline! Thanks for suggesting a new feature for the pipeline!
Please delete this text and anything that's not relevant from the template below: Please delete this text and anything that's not relevant from the template below:
-->
## Is your feature request related to a problem? Please describe ## Is your feature request related to a problem? Please describe
A clear and concise description of what the problem is. <!-- A clear and concise description of what the problem is. -->
Ex. I'm always frustrated when [...] <!-- e.g. [I'm always frustrated when ...] -->
## Describe the solution you'd like ## Describe the solution you'd like
A clear and concise description of what you want to happen. <!-- A clear and concise description of what you want to happen. -->
## Describe alternatives you've considered ## Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered. <!-- A clear and concise description of any alternative solutions or features you've considered. -->
## Additional context ## Additional context
Add any other context about the feature request here. <!-- Add any other context about the feature request here. -->
<!--
# nf-core/hic pull request # nf-core/hic pull request
Many thanks for contributing to nf-core/hic! Many thanks for contributing to nf-core/hic!
...@@ -5,15 +6,16 @@ Many thanks for contributing to nf-core/hic! ...@@ -5,15 +6,16 @@ Many thanks for contributing to nf-core/hic!
Please fill in the appropriate checklist below (delete whatever is not relevant). Please fill in the appropriate checklist below (delete whatever is not relevant).
These are the most common things requested on pull requests (PRs). These are the most common things requested on pull requests (PRs).
Remember that PRs should be made against the dev branch, unless you're preparing a pipeline release.
Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/hic/tree/master/.github/CONTRIBUTING.md)
-->
## PR checklist ## PR checklist
- [ ] This comment contains a description of changes (with reason) - [ ] This comment contains a description of changes (with reason)
- [ ] `CHANGELOG.md` is updated
- [ ] If you've fixed a bug or added code that should be tested, add tests! - [ ] If you've fixed a bug or added code that should be tested, add tests!
- [ ] If necessary, also make a PR on the [nf-core/hic branch on the nf-core/test-datasets repo](https://github.com/nf-core/test-datasets/pull/new/nf-core/hic)
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker`).
- [ ] Make sure your code lints (`nf-core lint .`).
- [ ] Documentation in `docs` is updated - [ ] Documentation in `docs` is updated
- [ ] `CHANGELOG.md` is updated - [ ] If necessary, also make a PR on the [nf-core/hic branch on the nf-core/test-datasets repo](https://github.com/nf-core/test-datasets/pull/new/nf-core/hic)
- [ ] `README.md` is updated
**Learn more about contributing:** [CONTRIBUTING.md](https://github.com/nf-core/hic/tree/master/.github/CONTRIBUTING.md)
\ No newline at end of file
name: nf-core AWS full size tests
# This workflow is triggered on push to the master branch.
# It runs the -profile 'test_full' on AWS batch
on:
release:
types: [published]
jobs:
run-awstest:
name: Run AWS full tests
if: github.repository == 'nf-core/hic'
runs-on: ubuntu-latest
steps:
- name: Setup Miniconda
uses: goanpeca/setup-miniconda@v1.0.2
with:
auto-update-conda: true
python-version: 3.7
- name: Install awscli
run: conda install -c conda-forge awscli
- name: Start AWS batch job
# Add full size test data (but still relatively small datasets for few samples)
# on the `test_full.config` test runs with only one set of parameters
# Then specify `-profile test_full` instead of `-profile test` on the AWS batch command
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TOWER_ACCESS_TOKEN: ${{ secrets.AWS_TOWER_TOKEN }}
AWS_JOB_DEFINITION: ${{ secrets.AWS_JOB_DEFINITION }}
AWS_JOB_QUEUE: ${{ secrets.AWS_JOB_QUEUE }}
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
run: |
aws batch submit-job \
--region eu-west-1 \
--job-name nf-core-hic \
--job-queue $AWS_JOB_QUEUE \
--job-definition $AWS_JOB_DEFINITION \
--container-overrides '{"command": ["nf-core/hic", "-r '"${GITHUB_SHA}"' -profile test --outdir s3://'"${AWS_S3_BUCKET}"'/hic/results-'"${GITHUB_SHA}"' -w s3://'"${AWS_S3_BUCKET}"'/hic/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}'
name: nf-core AWS test
# This workflow is triggered on push to the master branch.
# It runs the -profile 'test' on AWS batch
on:
push:
branches:
- master
jobs:
run-awstest:
name: Run AWS tests
if: github.repository == 'nf-core/hic'
runs-on: ubuntu-latest
steps:
- name: Setup Miniconda
uses: goanpeca/setup-miniconda@v1.0.2
with:
auto-update-conda: true
python-version: 3.7
- name: Install awscli
run: conda install -c conda-forge awscli
- name: Start AWS batch job
# For example: adding multiple test runs with different parameters
# Remember that you can parallelise this by using strategy.matrix
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TOWER_ACCESS_TOKEN: ${{ secrets.AWS_TOWER_TOKEN }}
AWS_JOB_DEFINITION: ${{ secrets.AWS_JOB_DEFINITION }}
AWS_JOB_QUEUE: ${{ secrets.AWS_JOB_QUEUE }}
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
run: |
aws batch submit-job \
--region eu-west-1 \
--job-name nf-core-hic \
--job-queue $AWS_JOB_QUEUE \
--job-definition $AWS_JOB_DEFINITION \
--container-overrides '{"command": ["nf-core/hic", "-r '"${GITHUB_SHA}"' -profile test --outdir s3://'"${AWS_S3_BUCKET}"'/hic/results-'"${GITHUB_SHA}"' -w s3://'"${AWS_S3_BUCKET}"'/hic/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}'hic/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}'
...@@ -3,14 +3,35 @@ name: nf-core branch protection ...@@ -3,14 +3,35 @@ name: nf-core branch protection
# It fails when someone tries to make a PR against the nf-core `master` branch instead of `dev` # It fails when someone tries to make a PR against the nf-core `master` branch instead of `dev`
on: on:
pull_request: pull_request:
branches: branches: [master]
- master
jobs: jobs:
test: test:
runs-on: ubuntu-18.04 runs-on: ubuntu-latest
steps: steps:
# PRs are only ok if coming from an nf-core `dev` branch or a fork `patch` branch # PRs to the nf-core repo master branch are only ok if coming from the nf-core repo `dev` or any `patch` branches
- name: Check PRs - name: Check PRs
if: github.repository == 'nf-core/hic'
run: | run: |
{ [[ $(git remote get-url origin) == *nf-core/hic ]] && [[ ${GITHUB_HEAD_REF} = "dev" ]]; } || [[ ${GITHUB_HEAD_REF} == "patch" ]] { [[ ${{github.event.pull_request.head.repo.full_name}} == nf-core/hic ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
# If the above check failed, post a comment on the PR explaining the failure
# NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets
- name: Post PR comment
if: failure()
uses: mshick/add-pr-comment@v1
with:
message: |
Hi @${{ github.event.pull_request.user.login }},
It looks like this pull-request is has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch.
The `master` branch on nf-core repositories should always contain code from the latest release.
Because of this, PRs to `master` are only allowed if they come from the ${{github.event.pull_request.head.repo.full_name}} `dev` branch.
You do not need to close this PR, you can change the target branch to `dev` by clicking the _"Edit"_ button at the top of this page.
Thanks again for your contribution!
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: false
name: nf-core CI name: nf-core CI
# This workflow is triggered on pushes and PRs to the repository. # This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors
# It runs the pipeline with the minimal test dataset to check that it completes without any syntax errors on:
on: [push, pull_request] push:
branches:
- dev
pull_request:
release:
types: [published]
jobs: jobs:
test: test:
name: Run workflow tests
# Only run on push if this is the nf-core dev branch (merged PRs)
if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/hic') }}
runs-on: ubuntu-latest
env: env:
NXF_VER: ${{ matrix.nxf_ver }} NXF_VER: ${{ matrix.nxf_ver }}
NXF_ANSI_LOG: false NXF_ANSI_LOG: false
runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
# Nextflow versions: check pipeline minimum and current latest # Nextflow versions: check pipeline minimum and current latest
nxf_ver: ['19.10.0', ''] nxf_ver: ['19.10.0', '']
steps: steps:
- uses: actions/checkout@v2 - name: Check out pipeline code
uses: actions/checkout@v2
- name: Check if Dockerfile or Conda environment changed
uses: technote-space/get-diff-action@v1
with:
PREFIX_FILTER: |
Dockerfile
environment.yml
- name: Build new docker image
if: env.GIT_DIFF
run: docker build --no-cache . -t nfcore/hic:1.2.2
- name: Pull docker image
if: ${{ !env.GIT_DIFF }}
run: |
docker pull nfcore/hic:dev
docker tag nfcore/hic:dev nfcore/hic:1.2.2
- name: Install Nextflow - name: Install Nextflow
run: | run: |
wget -qO- get.nextflow.io | bash wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/ sudo mv nextflow /usr/local/bin/
- name: Pull docker image
run: |
docker pull nfcore/hic:dev
docker tag nfcore/hic:dev nfcore/hic:1.2.1
- name: Run pipeline with test data - name: Run pipeline with test data
run: | run: |
# nf-core: You can customise CI pipeline run tests as required
# (eg. adding multiple test runs with different parameters)
nextflow run ${GITHUB_WORKSPACE} -profile test,docker nextflow run ${GITHUB_WORKSPACE} -profile test,docker
...@@ -33,18 +33,33 @@ jobs: ...@@ -33,18 +33,33 @@ jobs:
nf-core: nf-core:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - name: Check out pipeline code
uses: actions/checkout@v2
- name: Install Nextflow - name: Install Nextflow
run: | run: |
wget -qO- get.nextflow.io | bash wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/ sudo mv nextflow /usr/local/bin/
- uses: actions/setup-python@v1 - uses: actions/setup-python@v1
with: with:
python-version: '3.6' python-version: '3.6'
architecture: 'x64' architecture: 'x64'
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install nf-core pip install nf-core
- name: Run nf-core lint - name: Run nf-core lint
run: nf-core lint ${GITHUB_WORKSPACE} env:
GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }}
run: nf-core -l lint_log.txt lint ${GITHUB_WORKSPACE}
- name: Upload linting log file artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: linting-log-file
path: lint_log.txt
name: nf-core Docker push
# This builds the docker image and pushes it to DockerHub
# Runs on nf-core repo releases and push event to 'dev' branch (PR merges)
on:
push:
branches:
- dev
release:
types: [published]
jobs:
push_dockerhub:
name: Push new Docker image to Docker Hub
runs-on: ubuntu-latest
# Only run for the nf-core repo, for releases and merged PRs
if: ${{ github.repository == 'nf-core/hic' }}
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
steps:
- name: Check out pipeline code
uses: actions/checkout@v2
- name: Build new docker image
run: docker build --no-cache . -t nfcore/hic:latest
- name: Push Docker image to DockerHub (dev)
if: ${{ github.event_name == 'push' }}
run: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
docker tag nfcore/hic:latest nfcore/hic:dev
docker push nfcore/hic:dev
- name: Push Docker image to DockerHub (release)
if: ${{ github.event_name == 'release' }}
run: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
docker push nfcore/hic:latest
docker tag nfcore/hic:latest nfcore/hic:${{ github.event.release.tag_name }}
docker push nfcore/hic:${{ github.event.release.tag_name }}
...@@ -5,4 +5,5 @@ results/ ...@@ -5,4 +5,5 @@ results/
.DS_Store .DS_Store
tests/ tests/
testing/ testing/
testing*
*.pyc *.pyc
# nf-core/hic: Changelog # nf-core/hic: Changelog
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## v1.2.2 - 2020-08-07
### `Added`
* Template update for nf-core/tools v1.10.2
### `Fixed`
* Bug in `--split_fastq` option not recognized
## v1.2.1 - 2020-07-06 ## v1.2.1 - 2020-07-06
......
...@@ -70,7 +70,7 @@ members of the project's leadership. ...@@ -70,7 +70,7 @@ members of the project's leadership.
This Code of Conduct is adapted from the [Contributor Covenant][homepage], This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at version 1.4, available at
[http://contributor-covenant.org/version/1/4][version] [https://www.contributor-covenant.org/version/1/4/code-of-conduct/][version]
[homepage]: http://contributor-covenant.org [homepage]: https://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/ [version]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/
FROM nfcore/base:1.9 FROM nfcore/base:1.10.2
LABEL authors="Nicolas Servant" \ LABEL authors="Nicolas Servant" \
description="Docker image containing all software requirements for the nf-core/hic pipeline" description="Docker image containing all software requirements for the nf-core/hic pipeline"
...@@ -6,9 +7,14 @@ LABEL authors="Nicolas Servant" \ ...@@ -6,9 +7,14 @@ LABEL authors="Nicolas Servant" \
RUN apt-get update && apt-get install -y gcc g++ && apt-get clean -y RUN apt-get update && apt-get install -y gcc g++ && apt-get clean -y
COPY environment.yml / COPY environment.yml /
RUN conda env create -f /environment.yml && conda clean -a RUN conda env create --quiet -f /environment.yml && conda clean -a
ENV PATH /opt/conda/envs/nf-core-hic-1.2.1/bin:$PATH
# Add conda installation dir to PATH (instead of doing 'conda activate')
ENV PATH /opt/conda/envs/nf-core-hic-1.2.2/bin:$PATH
# Dump the details of the installed packages to a file for posterity # Dump the details of the installed packages to a file for posterity
RUN conda env export --name nf-core-hic-1.2.1 > nf-core-hic-1.2.1.yml RUN conda env export --name nf-core-hic-1.2.2 > nf-core-hic-1.2.2.yml
# Instruct R processes to use these empty files instead of clashing with a local version
RUN touch .Rprofile
RUN touch .Renviron
...@@ -6,10 +6,11 @@ ...@@ -6,10 +6,11 @@
[![GitHub Actions Linting Status](https://github.com/nf-core/hic/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/hic/actions) [![GitHub Actions Linting Status](https://github.com/nf-core/hic/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/hic/actions)
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A519.10.0-brightgreen.svg)](https://www.nextflow.io/) [![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A519.10.0-brightgreen.svg)](https://www.nextflow.io/)
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg)](http://bioconda.github.io/) [![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg)](https://bioconda.github.io/)
[![Docker](https://img.shields.io/docker/automated/nfcore/hic.svg)](https://hub.docker.com/r/nfcore/hic) [![Docker](https://img.shields.io/docker/automated/nfcore/hic.svg)](https://hub.docker.com/r/nfcore/hic)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2669513.svg)](https://doi.org/10.5281/zenodo.2669513) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2669513.svg)](https://doi.org/10.5281/zenodo.2669513)
[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23hic-4A154B?logo=slack)](https://nfcore.slack.com/channels/hic)
## Introduction ## Introduction
...@@ -66,7 +67,8 @@ iv. Start running your own analysis! ...@@ -66,7 +67,8 @@ iv. Start running your own analysis!
nextflow run nf-core/hic -profile <docker/singularity/conda/institute> --reads '*_R{1,2}.fastq.gz' --genome GRCh37 nextflow run nf-core/hic -profile <docker/singularity/conda/institute> --reads '*_R{1,2}.fastq.gz' --genome GRCh37
``` ```
See [usage docs](docs/usage.md) for all of the available options when running the pipeline. See [usage docs](docs/usage.md) for all of the available options when running
the pipeline.
## Documentation ## Documentation
...@@ -82,6 +84,10 @@ found in the `docs/` directory: ...@@ -82,6 +84,10 @@ found in the `docs/` directory:
4. [Output and how to interpret the results](docs/output.md) 4. [Output and how to interpret the results](docs/output.md)
5. [Troubleshooting](https://nf-co.re/usage/troubleshooting) 5. [Troubleshooting](https://nf-co.re/usage/troubleshooting)
The nf-core/hic pipeline comes with documentation about the pipeline which
you can read at [https://nf-core/hic/docs](https://nf-core/hic/docs) or
find in the [`docs/` directory](docs).
For further information or help, don't hesitate to get in touch on For further information or help, don't hesitate to get in touch on
[Slack](https://nfcore.slack.com/channels/hic). [Slack](https://nfcore.slack.com/channels/hic).
You can join with [this invite](https://nf-co.re/join/slack). You can join with [this invite](https://nf-co.re/join/slack).
...@@ -94,9 +100,9 @@ nf-core/hic was originally written by Nicolas Servant. ...@@ -94,9 +100,9 @@ nf-core/hic was originally written by Nicolas Servant.
If you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md). If you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).
For further information or help, don't hesitate to get in touch on For further information or help, don't hesitate to get in touch on the
[Slack](https://nfcore.slack.com/channels/hic) (you can join with [Slack `#hic` channel](https://nfcore.slack.com/channels/hic)
[this invite](https://nf-co.re/join/slack)). (you can join with [this invite](https://nf-co.re/join/slack)).
## Citation ## Citation
...@@ -110,6 +116,5 @@ You can cite the `nf-core` publication as follows: ...@@ -110,6 +116,5 @@ You can cite the `nf-core` publication as follows:
> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, > Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg,
Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen. Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.
> >
> _Nat Biotechnol._ 2020 Feb 13. > _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).
doi:[10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).
> ReadCube: [Full Access Link](https://rdcu.be/b1GjZ) > ReadCube: [Full Access Link](https://rdcu.be/b1GjZ)
...@@ -4,33 +4,23 @@ import argparse ...@@ -4,33 +4,23 @@ import argparse
import markdown import markdown
import os import os
import sys import sys
import io
def convert_markdown(in_fn): def convert_markdown(in_fn):
input_md = open(in_fn, mode="r", encoding="utf-8").read() input_md = io.open(in_fn, mode="r", encoding="utf-8").read()
html = markdown.markdown( html = markdown.markdown(
"[TOC]\n" + input_md, "[TOC]\n" + input_md,
extensions = [ extensions=["pymdownx.extra", "pymdownx.b64", "pymdownx.highlight", "pymdownx.emoji", "pymdownx.tilde", "toc"],
'pymdownx.extra', extension_configs={
'pymdownx.b64', "pymdownx.b64": {"base_path": os.path.dirname(in_fn)},
'pymdownx.highlight', "pymdownx.highlight": {"noclasses": True},
'pymdownx.emoji', "toc": {"title": "Table of Contents"},
'pymdownx.tilde', },
'toc'
],
extension_configs = {
'pymdownx.b64': {
'base_path': os.path.dirname(in_fn)
},
'pymdownx.highlight': {
'noclasses': True
},
'toc': {
'title': 'Table of Contents'
}
}
) )
return html return html
def wrap_html(contents): def wrap_html(contents):
header = """<!DOCTYPE html><html> header = """<!DOCTYPE html><html>
<head> <head>
...@@ -83,18 +73,19 @@ def wrap_html(contents): ...@@ -83,18 +73,19 @@ def wrap_html(contents):
def parse_args(args=None): def parse_args(args=None):
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('mdfile', type=argparse.FileType('r'), nargs='?', parser.add_argument("mdfile", type=argparse.FileType("r"), nargs="?", help="File to convert. Defaults to stdin.")
help='File to convert. Defaults to stdin.') parser.add_argument(
parser.add_argument('-o', '--out', type=argparse.FileType('w'), "-o", "--out", type=argparse.FileType("w"), default=sys.stdout, help="Output file name. Defaults to stdout."
default=sys.stdout, )
help='Output file name. Defaults to stdout.')
return parser.parse_args(args) return parser.parse_args(args)
def main(args=None): def main(args=None):
args = parse_args(args) args = parse_args(args)
converted_md = convert_markdown(args.mdfile.name) converted_md = convert_markdown(args.mdfile.name)
html = wrap_html(converted_md) html = wrap_html(converted_md)
args.out.write(html) args.out.write(html)
if __name__ == '__main__':
if __name__ == "__main__":
sys.exit(main()) sys.exit(main())
...@@ -34,7 +34,7 @@ for k, v in regexes.items(): ...@@ -34,7 +34,7 @@ for k, v in regexes.items():
# Remove software set to false in results # Remove software set to false in results
for k in list(results): for k in list(results):
if not results[k]: if not results[k]:
del(results[k]) del results[k]
# Remove software set to false in results # Remove software set to false in results
for k in results: for k in results:
...@@ -42,7 +42,8 @@ for k in results: ...@@ -42,7 +42,8 @@ for k in results:
del(results[k]) del(results[k])
# Dump to YAML # Dump to YAML
print (''' print(
"""
id: 'software_versions' id: 'software_versions'
section_name: 'nf-core/hic Software Versions' section_name: 'nf-core/hic Software Versions'
section_href: 'https://github.com/nf-core/hic' section_href: 'https://github.com/nf-core/hic'
...@@ -50,12 +51,14 @@ plot_type: 'html' ...@@ -50,12 +51,14 @@ plot_type: 'html'
description: 'are collected at run time from the software output.' description: 'are collected at run time from the software output.'
data: | data: |
<dl class="dl-horizontal"> <dl class="dl-horizontal">
''') """
for k,v in results.items(): )
print(" <dt>{}</dt><dd><samp>{}</samp></dd>".format(k,v)) for k, v in results.items():
print (" </dl>") print(" <dt>{}</dt><dd><samp>{}</samp></dd>".format(k, v))
print(" </dl>")
# Write out regexes as csv file: # Write out regexes as csv file:
with open('software_versions.csv', 'w') as f: with open("software_versions.csv", "w") as f:
for k,v in results.items(): for k, v in results.items():
f.write("{}\t{}\n".format(k,v)) f.write("{}\t{}\n".format(k, v))
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
params { params {
// Alignment options // Alignment options
splitFastq = false
bwt2_opts_end2end = '--very-sensitive -L 30 --score-min L,-0.6,-0.2 --end-to-end --reorder' bwt2_opts_end2end = '--very-sensitive -L 30 --score-min L,-0.6,-0.2 --end-to-end --reorder'
bwt2_opts_trimmed = '--very-sensitive -L 20 --score-min L,-0.6,-0.2 --end-to-end --reorder' bwt2_opts_trimmed = '--very-sensitive -L 20 --score-min L,-0.6,-0.2 --end-to-end --reorder'
min_mapq = 10 min_mapq = 10
...@@ -35,9 +34,5 @@ params { ...@@ -35,9 +34,5 @@ params {
ice_filer_low_count_perc = 0.02 ice_filer_low_count_perc = 0.02
ice_filer_high_count_perc = 0 ice_filer_high_count_perc = 0
ice_eps = 0.1 ice_eps = 0.1
saveReference = false
saveAlignedIntermediates = false
saveInteractionBAM = false
} }
...@@ -18,7 +18,7 @@ config_profile_name = 'Hi-C test data from Schalbetter et al. (2017)' ...@@ -18,7 +18,7 @@ config_profile_name = 'Hi-C test data from Schalbetter et al. (2017)'
max_time = 1.h max_time = 1.h
// Input data // Input data
readPaths = [ input_paths = [
['SRR4292758_00', ['https://github.com/nf-core/test-datasets/raw/hic/data/SRR4292758_00_R1.fastq.gz', 'https://github.com/nf-core/test-datasets/raw/hic/data/SRR4292758_00_R2.fastq.gz']] ['SRR4292758_00', ['https://github.com/nf-core/test-datasets/raw/hic/data/SRR4292758_00_R1.fastq.gz', 'https://github.com/nf-core/test-datasets/raw/hic/data/SRR4292758_00_R2.fastq.gz']]
] ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment