-
Notifications
You must be signed in to change notification settings - Fork 0
Added modules to enable iRODS operations #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Claptar
wants to merge
12
commits into
main
Choose a base branch
from
irods
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c0d1f84
Added module to get metadata from iRODS
a1b2db0
Updated snapshot with nf-core tool
571c199
Module to attach iRODS metadata
fae64b7
Added schema to make link command work
3b3248f
Add a process to aggregate iRODS metadata
27fdde7
Fix config file path and add new test configuration
fc11647
Module to concatenate csv files
d3df2d2
Module to store files on irods
65e5ec6
Add "modules_sangercellgeni" tag to test processes in CSV concatenati…
63281c0
Refactor metadata descriptions and improve formatting in iRODS modules
3ee4210
Refactor metadata handling in main.nf
Claptar 155b5cd
Removed file permission setting
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,279 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema", | ||
| "title": "Meta yaml", | ||
| "description": "Validate the meta yaml file for an nf-core module", | ||
| "type": "object", | ||
| "properties": { | ||
| "name": { | ||
| "type": "string", | ||
| "description": "Name of the module" | ||
| }, | ||
| "description": { | ||
| "type": "string", | ||
| "description": "Description of the module" | ||
| }, | ||
| "keywords": { | ||
| "type": "array", | ||
| "description": "Keywords for the module", | ||
| "items": { | ||
| "type": "string", | ||
| "not": { | ||
| "const": "example" | ||
| } | ||
| }, | ||
| "uniqueItems": true, | ||
| "minItems": 3 | ||
| }, | ||
| "authors": { | ||
| "type": "array", | ||
| "description": "Authors of the module", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "maintainers": { | ||
| "type": "array", | ||
| "description": "Maintainers of the module", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "extra_args": { | ||
| "type": "array", | ||
| "description": "Extra arguments for the module", | ||
| "items": { | ||
| "type": "object", | ||
| "properties": { | ||
| "description": { | ||
| "type": "string", | ||
| "description": "Description of the argument" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "input": { | ||
| "type": "array", | ||
| "description": "Input channels for the module", | ||
| "items": { | ||
| "oneOf": [ | ||
| { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "object", | ||
| "patternProperties": { | ||
| ".*": { | ||
| "$ref": "#/definitions/elementProperties" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "type": "object", | ||
| "patternProperties": { | ||
| ".*": { | ||
| "$ref": "#/definitions/elementProperties" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "output": { | ||
| "type": "object", | ||
| "description": "Output channels for the module", | ||
| "patternProperties": { | ||
| ".*": { | ||
| "type": "array", | ||
| "items": { | ||
| "oneOf": [ | ||
| { | ||
| "type": "object", | ||
| "patternProperties": { | ||
| ".*": { | ||
| "$ref": "#/definitions/elementProperties" | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "object", | ||
| "patternProperties": { | ||
| ".*": { | ||
| "$ref": "#/definitions/elementProperties" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "tools": { | ||
| "type": "array", | ||
| "description": "Tools used by the module", | ||
| "items": { | ||
| "type": "object", | ||
| "patternProperties": { | ||
| ".*": { | ||
| "type": "object", | ||
| "properties": { | ||
| "description": { | ||
| "type": "string", | ||
| "description": "Description of the output channel" | ||
| }, | ||
| "homepage": { | ||
| "type": "string", | ||
| "description": "Homepage of the tool", | ||
| "pattern": "^(http|https)://.*$" | ||
| }, | ||
| "documentation": { | ||
| "type": "string", | ||
| "description": "Documentation of the tool", | ||
| "pattern": "^(http|https|ftp)://.*$" | ||
| }, | ||
| "tool_dev_url": { | ||
| "type": "string", | ||
| "description": "URL of the development version of the tool's documentation", | ||
| "pattern": "^(http|https)://.*$" | ||
| }, | ||
| "doi": { | ||
| "description": "DOI of the tool", | ||
| "anyOf": [ | ||
| { | ||
| "type": "string", | ||
| "pattern": "^10\\.\\d{4,9}\\/[^,]+$" | ||
| }, | ||
| { | ||
| "type": "string", | ||
| "enum": [ | ||
| "no DOI available" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "licence": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| }, | ||
| "description": "Licence of the tool", | ||
| "minItems": 1, | ||
| "uniqueItems": true, | ||
| "message": "Licence must be an array of one or more entries, e.g. [\"MIT\"]" | ||
| }, | ||
| "identifier": { | ||
| "description": "bio.tools identifier of the tool", | ||
| "anyOf": [ | ||
| { | ||
| "type": "string", | ||
| "pattern": "^biotools:.*$" | ||
| }, | ||
| { | ||
| "type": "string", | ||
| "maxLength": 0 | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "required": [ | ||
| "description" | ||
| ], | ||
| "anyOf": [ | ||
| { | ||
| "required": [ | ||
| "homepage" | ||
| ] | ||
| }, | ||
| { | ||
| "required": [ | ||
| "documentation" | ||
| ] | ||
| }, | ||
| { | ||
| "required": [ | ||
| "tool_dev_url" | ||
| ] | ||
| }, | ||
| { | ||
| "required": [ | ||
| "doi" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "definitions": { | ||
| "elementProperties": { | ||
| "type": "object", | ||
| "properties": { | ||
| "type": { | ||
| "type": "string", | ||
| "description": "Type of the channel element", | ||
| "enum": [ | ||
| "map", | ||
| "file", | ||
| "directory", | ||
| "string", | ||
| "integer", | ||
| "float", | ||
| "boolean", | ||
| "list" | ||
| ] | ||
| }, | ||
| "description": { | ||
| "type": "string", | ||
| "description": "Description of the channel" | ||
| }, | ||
| "pattern": { | ||
| "type": "string", | ||
| "description": "Pattern of the channel, given in Java glob syntax" | ||
| }, | ||
| "enum": { | ||
| "type": "array", | ||
| "description": "List of allowed values for the channel", | ||
| "items": { | ||
| "type": [ | ||
| "string", | ||
| "number", | ||
| "boolean", | ||
| "array", | ||
| "object" | ||
| ] | ||
| }, | ||
| "uniqueItems": true | ||
| }, | ||
| "ontologies": { | ||
| "type": "array", | ||
| "description": "List of ontologies for the channel", | ||
| "uniqueItems": true, | ||
| "items": { | ||
| "type": "object", | ||
| "patternProperties": { | ||
| ".*": { | ||
| "type": "string", | ||
| "pattern": "^(http|https)://.*" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "required": [ | ||
| "type", | ||
| "description" | ||
| ] | ||
| } | ||
| }, | ||
| "required": [ | ||
| "name", | ||
| "description", | ||
| "keywords", | ||
| "authors", | ||
| "output", | ||
| "tools" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| process CSV_CONCAT { | ||
| tag "Concatenating CSV files" | ||
| container 'docker://quay.io/cellgeni/metacells-python:latest' | ||
|
|
||
| input: | ||
| tuple val(meta), path(csv_files, name: "input/*.csv") | ||
|
|
||
| output: | ||
| tuple val(meta), path("*.csv"), emit: csv | ||
| tuple val(meta), path("*.json"), emit: json | ||
| path "versions.yml", emit: versions | ||
|
|
||
| script: | ||
| def prefix = task.ext.prefix ?: "concatenated" | ||
| def args = task.ext.args ?: "" | ||
| """ | ||
| concat.py --input ${csv_files} --prefix "${prefix}" ${args} | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| python: \$(python --version | awk '{print \$2}') | ||
| pandas: \$( python -c "import pandas; print(pandas.__version__)" ) | ||
| END_VERSIONS | ||
| """ | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
| name: "csv_concat" | ||
| description: | ||
| "Module to concatenate multiple CSV files into a single CSV and JSON | ||
| output" | ||
| keywords: | ||
| - csv | ||
| - concatenate | ||
| - merge | ||
| - pandas | ||
| - json | ||
| tools: | ||
| - pandas: | ||
| description: Powerful data structures for data analysis, time series, and | ||
| statistics | ||
| homepage: https://pandas.pydata.org/ | ||
| documentation: https://pandas.pydata.org/docs/ | ||
| licence: ["BSD-3-Clause"] | ||
| identifier: "biotools:pandas" | ||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - csv_files: | ||
| type: file | ||
| description: "Multiple CSV files to be concatenated" | ||
| pattern: "*.csv" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3752 # CSV | ||
| output: | ||
| csv: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - "*.csv": | ||
| type: file | ||
| description: "Concatenated CSV file" | ||
| pattern: "*.csv" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3752 # CSV | ||
| json: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - "*.json": | ||
| type: file | ||
| description: "Concatenated data in JSON format" | ||
| pattern: "*.json" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3464 # JSON | ||
| versions: | ||
| - versions.yml: | ||
| type: file | ||
| description: "YAML file containing software versions used" | ||
| pattern: "versions.yml" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3750 # YAML | ||
| authors: | ||
| - "@claptar" | ||
| maintainers: | ||
| - "@claptar" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| process { | ||
| withName: CSV_CONCAT { | ||
| ext.prefix = "metadata" | ||
| ext.args = { | ||
| [ | ||
| "--axis 'index'", | ||
| "--join 'outer'", | ||
| ].join(' ') | ||
| } | ||
| queue = 'normal' | ||
| cpus = 1 | ||
| memory = '2 GB' | ||
| publishDir = [ | ||
| mode: 'link', | ||
| path: 'results', | ||
| pattern: '*.{csv,json}', | ||
| overwrite: true, | ||
| ] | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The quotes around 'index' are unnecessary and inconsistent. Since this is being passed as a command-line argument, simple quoting (without the inner quotes) would be cleaner:
--axis index