diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 62ad6c259efad78784730845c6e83ac9e7b158ab..25ef2ed3c3c87f3ab115e92de6d830fdb6718b4d 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -9,9 +9,7 @@ Please use the pre-filled template to save time. However, don't be put off by this template - other more general issues and suggestions are welcome! Contributions to the code are even more welcome ;) -> If you need help using or modifying nf-core/hic then the best place to ask is on the nf-core -Slack [#hic](https://nfcore.slack.com/channels/hic) channel ([join our Slack here](https://nf-co.re/join/slack)). - +> If you need help using or modifying nf-core/hic then the best place to ask is on the nf-core Slack [#hic](https://nfcore.slack.com/channels/hic) channel ([join our Slack here](https://nf-co.re/join/slack)). ## Contribution workflow @@ -20,8 +18,9 @@ If you'd like to write some code for nf-core/hic, the standard workflow is as fo 1. Check that there isn't already an issue about your idea in the [nf-core/hic issues](https://github.com/nf-core/hic/issues) to avoid duplicating work * If there isn't one already, please create one so that others know you're working on this 2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [nf-core/hic repository](https://github.com/nf-core/hic) to your GitHub account -3. Make the necessary changes / additions within your forked repository -4. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged +3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions) +4. Use `nf-core schema build .` and add any new parameters to the pipeline JSON schema (requires [nf-core tools](https://github.com/nf-core/tools) >= 1.10). +5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged If you're not used to this workflow with git, you can start with some [docs from GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests) or even their [excellent `git` resources](https://try.github.io/). @@ -32,14 +31,14 @@ Typically, pull-requests are only fully reviewed when these tests are passing, t There are typically two types of tests that run: -### Lint Tests +### Lint tests `nf-core` has a [set of guidelines](https://nf-co.re/developers/guidelines) which all pipelines must adhere to. To enforce these and ensure that all pipelines stay in sync, we have developed a helper tool which runs checks on the pipeline code. This is in the [nf-core/tools repository](https://github.com/nf-core/tools) and once installed can be run locally with the `nf-core lint <pipeline-directory>` command. If any failures or warnings are encountered, please follow the listed URL for more documentation. -### Pipeline Tests +### Pipeline tests Each `nf-core` pipeline should be set up with a minimal set of test-data. `GitHub Actions` then runs the pipeline on this data to ensure that it exits successfully. @@ -55,8 +54,75 @@ These tests are run both with the latest available version of `Nextflow` and als * A PR should be made on `master` from patch to directly this particular bug. ## Getting help -For further information/help, please consult the [nf-core/hic documentation](https://nf-co.re/nf-core/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)). For further information/help, please consult the [nf-core/hic documentation](https://nf-co.re/hic/usage) 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)). + +## Pipeline contribution conventions + +To make the nf-core/hic code and processing logic more understandable for new contributors and to ensure quality, we semi-standardise the way the code and other contributions are written. + +### Adding a new step + +If you wish to contribute a new step, please use the following coding standards: + +1. Define the corresponding input channel into your new process from the expected previous process channel +2. Write the process block (see below). +3. Define the output channel if needed (see below). +4. Add any new flags/options to `nextflow.config` with a default (see below). +5. Add any new flags/options to `nextflow_schema.json` with help text (with `nf-core schema build .`) +6. Add any new flags/options to the help message (for integer/text parameters, print to help the corresponding `nextflow.config` parameter). +7. Add sanity checks for all relevant parameters. +8. Add any new software to the `scrape_software_versions.py` script in `bin/` and the version command to the `scrape_software_versions` process in `main.nf`. +9. Do local tests that the new code works properly and as expected. +10. Add a new test command in `.github/workflow/ci.yaml`. +11. If applicable add a [MultiQC](https://https://multiqc.info/) module. +12. Update MultiQC config `assets/multiqc_config.yaml` so relevant suffixes, name clean up, General Statistics Table column order, and module figures are in the right order. +13. Optional: Add any descriptions of MultiQC report sections and output files to `docs/output.md`. + +### Default values + +Parameters should be initialised / defined with default values in `nextflow.config` under the `params` scope. + +Once there, use `nf-core schema build .` to add to `nextflow_schema.json`. + +### Default processes resource requirements + +Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/master/nf_core/pipeline-template/%7B%7Bcookiecutter.name_noslash%7D%7D/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels. + +The process resources can be passed on to the tool dynamically within the process with the `${task.cpu}` and `${task.memory}` variables in the `script:` block. + +### Naming schemes + +Please use the following naming schemes, to make it easy to understand what is going where. + +* initial process channel: `ch_output_from_<process>` +* intermediate and terminal channels: `ch_<previousprocess>_for_<nextprocess>` + +### Nextflow version bumping + +If you are using a new feature from core Nextflow, you may bump the minimum required version of nextflow in the pipeline with: `nf-core bump-version --nextflow . [min-nf-version]` + +### Software version reporting + +If you add a new tool to the pipeline, please ensure you add the information of the tool to the `get_software_version` process. + +Add to the script block of the process, something like the following: + +```bash +<YOUR_TOOL> --version &> v_<YOUR_TOOL>.txt 2>&1 || true +``` + +or + +```bash +<YOUR_TOOL> --help | head -n 1 &> v_<YOUR_TOOL>.txt 2>&1 || true +``` + +You then need to edit the script `bin/scrape_software_versions.py` to: + +1. Add a Python regex for your tool's `--version` output (as in stored in the `v_<YOUR_TOOL>.txt` file), to ensure the version is reported as a `v` and the version number e.g. `v2.1.1` +2. Add a HTML entry to the `OrderedDict` for formatting in MultiQC. + +### Images and figures + +For overview images and other documents we follow the nf-core [style guidelines and examples](https://nf-co.re/developers/design_guidelines). diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 78c45d55dcf3cc4514fc8facc7a7a21be8f5d220..5ac2f7f52734df2cde27f756dcf7de5e4525463c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -13,6 +13,13 @@ Thanks for telling us about a problem with the pipeline. Please delete this text and anything that's not relevant from the template below: --> +## Check Documentation + +I have checked the following places for your error: + +- [ ] [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting) +- [ ] [nf-core/hic pipeline documentation](https://nf-co.re/nf-core/hic/usage) + ## Description of the bug <!-- A clear and concise description of what the bug is. --> @@ -28,6 +35,13 @@ Steps to reproduce the behaviour: <!-- A clear and concise description of what you expected to happen. --> +## Log files + +Have you provided the following extra information/files: + +- [ ] The command used to run the pipeline +- [ ] The `.nextflow.log` file <!-- this is a hidden file in the directory where you launched the pipeline --> + ## System - Hardware: <!-- [e.g. HPC, Desktop, Cloud...] --> diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 1a92849358ce849acd440d8a6806aeeb8a8e92fc..2e01a5fe11f6ed4f3e5bfb4bcaff8c8b7bdc56d5 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -11,7 +11,6 @@ Hi there! Thanks for suggesting a new feature for the pipeline! Please delete this text and anything that's not relevant from the template below: - --> ## Is your feature request related to a problem? Please describe diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0bdd57579b660e0b42eaa248a2b5e1a163ed95e3..fe95321696a9a5b3a88b419e21e2e593e375d493 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -13,9 +13,15 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/hic/ ## PR checklist -- [ ] This comment contains a description of changes (with reason) -- [ ] `CHANGELOG.md` is updated +- [ ] This comment contains a description of changes (with reason). - [ ] If you've fixed a bug or added code that should be tested, add tests! -- [ ] Documentation in `docs` 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) + - [ ] If you've added a new tool - add to the software_versions process and a regex to `scrape_software_versions.py` + - [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/hic/tree/master/.github/CONTRIBUTING.md) + - [ ] If necessary, also make a PR on the nf-core/hic _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository. +- [ ] Make sure your code lints (`nf-core lint .`). +- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker`). +- [ ] Usage Documentation in `docs/usage.md` is updated. +- [ ] Output Documentation in `docs/output.md` is updated. +- [ ] `CHANGELOG.md` is updated. +- [ ] `README.md` is updated (including new tool citations and authors/contributors). diff --git a/.github/markdownlint.yml b/.github/markdownlint.yml index 96b12a70398f6870ef306f4d8a5afcebc8f96ba8..8d7eb53b07463c24bd981a479a7d0591fabf7463 100644 --- a/.github/markdownlint.yml +++ b/.github/markdownlint.yml @@ -1,5 +1,12 @@ # Markdownlint configuration file -default: true, +default: true line-length: false no-duplicate-header: siblings_only: true +no-inline-html: + allowed_elements: + - img + - p + - kbd + - details + - summary diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 6367daba8be05f3cb37649750dad86f8dc88a3c6..6f2be6b08786ec7559b42df36d16c10790e60172 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -33,8 +33,10 @@ jobs: nf-core: runs-on: ubuntu-latest steps: + - name: Check out pipeline code uses: actions/checkout@v2 + - name: Install Nextflow env: CAPSULE_LOG: none @@ -72,5 +74,3 @@ jobs: lint_log.txt lint_results.md PR_number.txt - - diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ea324166000ae82243653f594f1438ee217745f..19ed9e966b9ead356c0c9e7341c459bcb79c3f87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Fix bug in `--bin_size` parameter (#85) * `--min_mapq` is ignored if `--keep_multi` is used -### Deprecated +### `Deprecated` * `--rm_dup` and `--rm_multi` are replaced by `--keep_dup` and `--keep_multi` @@ -130,3 +130,4 @@ if not provided. * Normalization of the contact maps using the ICE algorithm * Generation of cooler file for visualization on [higlass](https://higlass.io/) * Quality report based on HiC-Pro MultiQC module + diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 9d68eed2ae8c493a162c2294cdb7e5f229df6283..daea9ea82d791ff54b2b19755a09371e0ae330cc 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -54,13 +54,7 @@ project may be further defined and clarified by project maintainers. ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team on -[Slack](https://nf-co.re/join/slack). The project team will review -and investigate all complaints, and will respond in a way that it deems -appropriate to the circumstances. The project team is obligated to maintain -confidentiality with regard to the reporter of an incident. Further details -of specific enforcement policies may be posted separately. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team on [Slack](https://nf-co.re/join/slack). The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other @@ -68,9 +62,7 @@ members of the project's leadership. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 1.4, available at -[https://www.contributor-covenant.org/version/1/4/code-of-conduct/][version] +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct/][version] [homepage]: https://contributor-covenant.org [version]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/ diff --git a/Dockerfile b/Dockerfile index 422e2e16938a79677dc89d9e0dce16d24d1e9a4c..874771838e23d8ccfefcc7e1ba2d2ea4ce93b21f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ LABEL authors="Nicolas Servant" \ ## Install gcc for pip iced install RUN apt-get update && apt-get install -y gcc g++ && apt-get clean -y +# Install the conda environment COPY environment.yml / RUN conda env create --quiet -f /environment.yml && conda clean -a diff --git a/README.md b/README.md index 280a06a8d35806051c44260ff7646dd627ce8a16..c0c8f5b44b3f849ab040dc712131950f1c4e22f8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -#  +#  **Analysis of Chromosome Conformation Capture data (Hi-C)**. @@ -70,8 +70,6 @@ sites ([`bowtie2`](http://bowtie-bio.sourceforge.net/bowtie2/index.shtml)) nextflow run nf-core/hic -profile <docker/singularity/podman/conda/institute> --input '*_R{1,2}.fastq.gz' --genome GRCh37 ``` -See [usage docs](https://nf-co.re/hic/usage) for all of the available options when running the pipeline. - ## Documentation The nf-core/hic pipeline comes with documentation about the pipeline: [usage](https://nf-co.re/hic/usage) and [output](https://nf-co.re/hic/output). @@ -87,9 +85,7 @@ 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). -For further information or help, don't hesitate to get in touch on the -[Slack `#hic` channel](https://nfcore.slack.com/channels/hic) -(you can join with [this invite](https://nf-co.re/join/slack)). +For further information or help, don't hesitate to get in touch on the [Slack `#hic` channel](https://nfcore.slack.com/channels/hic) (you can join with [this invite](https://nf-co.re/join/slack)). ## Citation @@ -100,8 +96,16 @@ You can cite the `nf-core` publication as follows: > **The nf-core framework for community-curated bioinformatics pipelines.** > -> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, -Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen. +> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen. > > _Nat Biotechnol._ 2020 Feb 13. 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) + +In addition, references of tools and data used in this pipeline are as follows: + +> **HiC-Pro: An optimized and flexible pipeline for Hi-C processing.** +> +> Nicolas Servant, Nelle Varoquaux, Bryan R. Lajoie, Eric Viara, Chongjian Chen, Jean-Philippe Vert, Job Dekker, Edith Heard, Emmanuel Barillot. +> +> Genome Biology 2015, 16:259 doi: [10.1186/s13059-015-0831-x](https://dx.doi.org/10.1186/s13059-015-0831-x) + diff --git a/bin/scrape_software_versions.py b/bin/scrape_software_versions.py index f882f23325768249c6f6f0122f0d238bd9a7df37..5ff3fcfe270923ed0aeeec220e82a348a529b3e4 100755 --- a/bin/scrape_software_versions.py +++ b/bin/scrape_software_versions.py @@ -36,11 +36,6 @@ for k in list(results): if not results[k]: del results[k] -# Remove software set to false in results -for k in results: - if not results[k]: - del(results[k]) - # Dump to YAML print( """ @@ -61,4 +56,3 @@ print(" </dl>") with open("software_versions.csv", "w") as f: for k, v in results.items(): f.write("{}\t{}\n".format(k, v)) - diff --git a/conf/base.config b/conf/base.config index 157dd9548a110b9f2f710d3072850608fa9c2de5..c301031e67fecd8f4899b5bbc53f2c3adae9dcd3 100644 --- a/conf/base.config +++ b/conf/base.config @@ -10,7 +10,6 @@ */ process { - // nf-core: Check the defaults for all processes cpus = { check_max( 1 * task.attempt, 'cpus' ) } memory = { check_max( 7.GB * task.attempt, 'memory' ) } time = { check_max( 4.h * task.attempt, 'time' ) } diff --git a/conf/test.config b/conf/test.config index 5b3ac0e1395c89032ebfe04e8688e62d1abb660f..37d07472584abe385353731bd7c741490892f049 100644 --- a/conf/test.config +++ b/conf/test.config @@ -8,8 +8,7 @@ */ params { - -config_profile_name = 'Hi-C test data from Schalbetter et al. (2017)' + config_profile_name = 'Hi-C test data from Schalbetter et al. (2017)' config_profile_description = 'Minimal test dataset to check pipeline function' // Limit resources so that this can run on Travis @@ -30,7 +29,4 @@ config_profile_name = 'Hi-C test data from Schalbetter et al. (2017)' max_restriction_fragment_size = 100000 min_insert_size = 100 max_insert_size = 600 - - // Options - skip_cool = true } diff --git a/conf/test_full.config b/conf/test_full.config index 47d31760585c66025666f112dcd03a23faeac543..65dcbf8f5ddbce6c5e46c3160461e87a3ee56e98 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -11,6 +11,8 @@ params { config_profile_name = 'Full test profile' config_profile_description = 'Full test dataset to check pipeline function' + // TODO nf-core: Specify the paths to your full test data ( on nf-core/test-datasets or directly in repositories, e.g. SRA) + // TODO nf-core: Give any required params for the test so that command line flags are not needed // Input data for full size test 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']] diff --git a/docs/README.md b/docs/README.md index bdbc92abc939ff716f3fcaba1b5069be471c9049..a6889549c7f27bda0aed81947685713781fe2d1b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,11 +3,8 @@ The nf-core/hic documentation is split into the following pages: * [Usage](usage.md) - * An overview of how the pipeline works, how to run it and a - description of all of the different command-line flags. + * An overview of how the pipeline works, how to run it and a description of all of the different command-line flags. * [Output](output.md) - * An overview of the different results produced by the pipeline - and how to interpret them. + * An overview of the different results produced by the pipeline and how to interpret them. -You can find a lot more documentation about installing, configuring -and running nf-core pipelines on the website: [https://nf-co.re](https://nf-co.re) +You can find a lot more documentation about installing, configuring and running nf-core pipelines on the website: [https://nf-co.re](https://nf-co.re) diff --git a/docs/output.md b/docs/output.md index 895a4f2a16d75e7ca0dfb21c13d0cccc7ea3a322..d4092a050ff5954e5782bd0a8b12ffa0bdfe37a4 100644 --- a/docs/output.md +++ b/docs/output.md @@ -7,10 +7,7 @@ ## Introduction This document describes the output produced by the pipeline. Most of the plots are taken from the MultiQC report, which summarises results at the end of the pipeline. - -The directories listed below will be created in the results directory -after the pipeline has finished. All paths are relative to the top-level -results directory. +The directories listed below will be created in the results directory after the pipeline has finished. All paths are relative to the top-level results directory. ## Pipeline overview diff --git a/docs/usage.md b/docs/usage.md index be630a4298976e67bec49659f6dc6bc38ac86cc6..5e644c7e9ed8b59f76d73512777bef739723112b 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -28,12 +28,8 @@ results # Finished results (configurable, see below) ### Updating the pipeline -When you run the above command, Nextflow automatically pulls the pipeline code -from GitHub and stores it as a cached version. When running the pipeline after -this, it will always use the cached version if available - even if the pipeline -has been updated since. To make sure that you're running the latest version of -the pipeline, make sure that you regularly update the cached version of the -pipeline: +When you run the above command, Nextflow automatically pulls the pipeline code from GitHub and stores it as a cached version. When running the pipeline after this, it will always use the cached version if available - even if the pipeline has been updated since. To make sure that you're running the latest version of the pipeline, make sure that you regularly update the cached version of the pipeline: + ```bash nextflow pull nf-core/hic @@ -41,17 +37,7 @@ nextflow pull nf-core/hic ### Reproducibility -It's a good idea to specify a pipeline version when running the pipeline on -your data. This ensures that a specific version of the pipeline code and -software are used when you run your pipeline. If you keep using the same tag, -you'll be running the same version of the pipeline, even if there have been -changes to the code since. - -It's a good idea to specify a pipeline version when running the pipeline on -your data. This ensures that a specific version of the pipeline code and -software are used when you run your pipeline. If you keep using the same tag, -you'll be running the same version of the pipeline, even if there have been -changes to the code since. +It's a good idea to specify a pipeline version when running the pipeline on your data. This ensures that a specific version of the pipeline code and software are used when you run your pipeline. If you keep using the same tag, you'll be running the same version of the pipeline, even if there have been changes to the code since. First, go to the [nf-core/hic releases page](https://github.com/nf-core/hic/releases) and find diff --git a/environment.yml b/environment.yml index 6ee111e3beddb0e3c014d31ceec9d4a64bff25e6..90d9eea12420ed6e6066608aadc55d16120e8dfa 100644 --- a/environment.yml +++ b/environment.yml @@ -27,4 +27,4 @@ dependencies: - conda-forge::cython=0.29.19 - pip: - cooltools==0.3.2 - - fanc==0.8.30 \ No newline at end of file + - fanc==0.8.30 diff --git a/main.nf b/main.nf index 91c3cf7612358bed8dc813ad7513d84813ba3515..24f9138e0fc770b6211553f142817328608a7714 100644 --- a/main.nf +++ b/main.nf @@ -10,7 +10,6 @@ */ def helpMessage() { - // Add to this help message with new command line parameters log.info nfcoreHeader() log.info""" @@ -143,13 +142,10 @@ ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multi ch_output_docs = file("$projectDir/docs/output.md", checkIfExists: true) ch_output_docs_images = file("$projectDir/docs/images/", checkIfExists: true) -/********************************************************** - * SET UP CHANNELS - */ - /* * input read files */ + if (params.input_paths){ raw_reads = Channel.create() @@ -382,26 +378,6 @@ process get_software_versions { """ } -def create_workflow_summary(summary) { - - def yaml_file = workDir.resolve('workflow_summary_mqc.yaml') - yaml_file.text = """ - id: 'nf-core-hic-summary' - description: " - this information is collected when the pipeline is started." - section_name: 'nf-core/hic Workflow Summary' - section_href: 'https://github.com/nf-core/hic' - plot_type: 'html' - data: | - <dl class=\"dl-horizontal\"> -${summary.collect { k,v -> " <dt>$k</dt><dd><samp>${v ?: '<span style=\"color:#999999;\">N/A</a>'}</samp></dd>" }.join("\n")} - </dl> - """.stripIndent() - - return yaml_file -} - - - /**************************************************** * PRE-PROCESSING */ @@ -674,7 +650,6 @@ process combine_mates{ """ } - /* * HiC-Pro - detect valid interaction from aligned data */ @@ -747,7 +722,6 @@ else{ } } - /* * Remove duplicates */ @@ -1146,8 +1120,9 @@ process multiqc { """ } + /* - * STEP 7 - Output Description HTML + * Output Description HTML */ process output_documentation { publishDir "${params.outdir}/pipeline_info", mode: params.publish_dir_mode @@ -1156,13 +1131,13 @@ process output_documentation { file output_docs from ch_output_docs file images from ch_output_docs_images - output: - file "results_description.html" + output: + file "results_description.html" - script: - """ - markdown_to_html.py $output_docs -o results_description.html - """ + script: + """ + markdown_to_html.py $output_docs -o results_description.html + """ } /* @@ -1199,7 +1174,6 @@ workflow.onComplete { email_fields['summary']['Nextflow Build'] = workflow.nextflow.build email_fields['summary']['Nextflow Compile Timestamp'] = workflow.nextflow.timestamp - // If not using MultiQC, strip out this code (including params.maxMultiqcEmailFileSize) // On success try attach the multiqc report def mqc_report = null try { @@ -1282,7 +1256,6 @@ workflow.onComplete { checkHostname() log.info "-${c_purple}[nf-core/hic]${c_red} Pipeline completed with errors${c_reset}-" } - } diff --git a/nextflow.config b/nextflow.config index 57b95c5761e675f4a89fa043662449b17b5b688a..4ef6edc0aa2a9e0fdb9fd170fde4a84c3a004142 100644 --- a/nextflow.config +++ b/nextflow.config @@ -7,7 +7,6 @@ // Global default params, used in configs params { - // Inputs / outputs genome = false input = "data/*{1,2}.fastq.gz" @@ -94,6 +93,7 @@ params { tracedir = "${params.outdir}/pipeline_info" igenomes_ignore = false + //Config custom_config_version = 'master' custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" hostnames = false diff --git a/nextflow_schema.json b/nextflow_schema.json index c0733c3263055245da9996ae775173c488c5f03e..8f22525115802a670e7fa7d371c29fc7e1384ea7 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -5,11 +5,11 @@ "description": "Analysis of Chromosome Conformation Capture data (Hi-C)", "type": "object", "definitions": { - "mandatory_arguments": { - "title": "Mandatory arguments", + "input_output_options": { + "title": "Input/output options", "type": "object", "fa_icon": "fas fa-terminal", - "description": "Mandatory arguments to run the pipeline", + "description": "Define where the pipeline should find input data and save output data.", "required": [ "input" ], @@ -53,6 +53,12 @@ "fa_icon": "fas fa-dna", "description": "Options for the reference genome indices used to align reads.", "properties": { + "genome": { + "type": "string", + "description": "Name of iGenomes reference.", + "fa_icon": "fas fa-book", + "help_text": "If using a reference genome configured in the pipeline using iGenomes, use this parameter to give the ID for the reference. This is then used to build the full paths for all required reference genome files e.g. `--genome GRCh38`.\n\nSee the [nf-core website docs](https://nf-co.re/usage/reference_genomes) for more details." + }, "fasta": { "type": "string", "fa_icon": "fas fa-font", @@ -445,7 +451,8 @@ }, "allOf": [ { - "$ref": "#/definitions/mandatory_arguments" + + "$ref": "#/definitions/input_output_options" }, { "$ref": "#/definitions/reference_genome_options" @@ -478,4 +485,4 @@ "$ref": "#/definitions/institutional_config_options" } ] -} \ No newline at end of file +}