nf-core / nf-core/website

A guide for developers of common implementation patterns

Open
#2,242 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
MDX
Stars
98
Forks
298
Avg merge
14h 38m
Merged PRs (30d)
38

Description

Is your feature request related to a problem? Please describe.

It would be good to have a place to describe implementation patterns to common issues encountered by developers.

Describe the solution you'd like

A page with the implementation patterns that's easy to look up.

Additional context

Going through some code reviews, some common implementation issues pop up, that are sometimes addressed in strange ways. It would be nice to provide some best practice ways to deal with certain scenarios.

Examples:

  • How to implement collectFile with meta information.
        Channel.of( [ id: 'test', taxid: 1234 ] )
            .tap { ch_data }
            .collectFile( newLine: true ) { meta -> [ "${meta.id}.tsv", "$meta.taxid" ] }
            .map{ file -> [ file.baseName , file ] }
            .join( ch_data.map { meta -> [ meta.id, meta ] }, by: 0 )
            .map{ id, idfile, meta -> [ meta, idfile ] }
    
  • How should database's be handled for future use.
    Separate the database download and use storeDir instead of publishDir.
  • How should one map to multiple databases/references.
    Use combine to make a Cartesian product of inputs vs indexes, and map and + to merge metadata appropriately.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the website's existing documentation pages and the conventions used for guides. Use the issue's collectFile, storeDir, publishDir, combine, map, and metadata examples as the proposed topics. Done means a discoverable guide covering agreed implementation patterns with clear best-practice examples.

Written by the indexing model from the issue text.

Assessment

Domain
content, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.