-
Notifications
You must be signed in to change notification settings - Fork 3
ENSGENOMIO-12 Module for running TRF #40
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
0265d4d
Initial commit of TRF module
markquintontulloch a43bd15
Update process name
markquintontulloch d061602
Fix typo
markquintontulloch bd3a249
Add tests and meta
markquintontulloch 174b29c
Use TRF v4.10.0-rc2 to ensure 0 exit code on success
markquintontulloch 3847805
Merge branch 'main' into ENSGENOMIO-12
markquintontulloch 445a685
Update container
markquintontulloch 2ab2d8e
Refactor TRF arg input
markquintontulloch fdd9434
Test and versioning updates
markquintontulloch 13b3bbe
Bump environment version
markquintontulloch b843348
Fix TRF versions
markquintontulloch e66f12e
TRF version fix
markquintontulloch 5ac0ebc
Enforce -h option
markquintontulloch 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,5 @@ | ||
| channels: | ||
| - conda-forge | ||
| - bioconda | ||
| dependencies: | ||
| - trf=4.10.0rc2 |
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,45 @@ | ||
| // See the NOTICE file distributed with this work for additional information | ||
| // regarding copyright ownership. | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| process FEATURES_TRF { | ||
| tag "${meta.id}" | ||
| label 'process_medium' | ||
|
|
||
| conda "${moduleDir}/environment.yml" | ||
| container "quay.io/biocontainers/trf:4.10.0rc2--h7b50bb2_0" | ||
|
|
||
| input: | ||
| tuple val(meta), path(fasta) | ||
|
|
||
| output: | ||
| tuple val(meta), path("*.dat"), emit: dat | ||
| tuple val("${task.process}"), val('trf'), eval("trf -v 2>&1 | grep -oE '[0-9]+(\\.[0-9]+)+(rc[0-9]+)?(-[0-9]+)?' || echo 4.10.0"), emit: versions_trf, topic: versions | ||
|
JAlvarezJarreta marked this conversation as resolved.
|
||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| def args = task.ext.args ?: '2 7 7 80 10 100 500 -d' | ||
| """ | ||
| trf '${fasta}' ${args} -h | ||
| """ | ||
|
|
||
| stub: | ||
| """ | ||
| cat > "${fasta.name}.dat" << 'EOF' | ||
| Sequence: ${fasta.name} | ||
| EOF | ||
| """ | ||
| } | ||
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,66 @@ | ||
| --- | ||
| name: "features_trf" | ||
| description: Detect tandem repeats in FASTA sequences with Tandem Repeats Finder. | ||
| keywords: | ||
| - fasta | ||
| - features | ||
| - repeats | ||
| - tandem repeats | ||
| - trf | ||
| - genomio | ||
| tools: | ||
| - "trf": | ||
| description: "Tandem Repeats Finder detects and reports tandem repeats in DNA sequences." | ||
| homepage: "https://tandem.bu.edu/trf/trf.html" | ||
| documentation: "https://tandem.bu.edu/trf/trf.html" | ||
| tool_dev_url: "https://tandem.bu.edu/trf/trf.html" | ||
| licence: ["custom"] | ||
| identifier: "biotools:trf" | ||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'sample1' ]` | ||
| - fasta: | ||
| type: file | ||
| description: FASTA file containing DNA sequence(s) | ||
| pattern: "*.{fa,fasta,fna}" | ||
| ontologies: | ||
| - edam: "http://edamontology.org/format_1929" # FASTA | ||
| output: | ||
| dat: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'sample1' ]` | ||
| - "*.dat": | ||
| type: file | ||
| description: TRF repeat annotations in DAT format | ||
| pattern: "*.dat" | ||
| versions_trf: | ||
| - - ${task.process}: | ||
| type: string | ||
| description: The process the versions were collected from | ||
|
JAlvarezJarreta marked this conversation as resolved.
|
||
| - trf: | ||
| type: string | ||
| description: The tool name | ||
|
JAlvarezJarreta marked this conversation as resolved.
|
||
| - trf -v 2>&1 | grep -oE '[0-9]+(\\.[0-9]+)+(rc[0-9]+)?(-[0-9]+)?' || echo 4.10.0: | ||
| type: eval | ||
| description: The expression to obtain the TRF version | ||
| topics: | ||
| versions: | ||
| - - ${task.process}: | ||
| type: string | ||
| description: The process the versions were collected from | ||
|
JAlvarezJarreta marked this conversation as resolved.
|
||
| - trf: | ||
| type: string | ||
| description: The tool name | ||
|
JAlvarezJarreta marked this conversation as resolved.
|
||
| - trf -v 2>&1 | grep -oE '[0-9]+(\\.[0-9]+)+(rc[0-9]+)?(-[0-9]+)?' || echo 4.10.0: | ||
| type: eval | ||
| description: The expression to obtain the TRF version | ||
| authors: | ||
| - "ensembl-dev@ebi.ac.uk" | ||
| maintainers: | ||
| - "ensembl-dev@ebi.ac.uk" | ||
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,48 @@ | ||
| // See the NOTICE file distributed with this work for additional information | ||
| // regarding copyright ownership. | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| // nf-core modules test features/trf | ||
| nextflow_process { | ||
|
|
||
| name "Test Process FEATURES_TRF" | ||
| script "../main.nf" | ||
| process "FEATURES_TRF" | ||
|
|
||
| tag "features" | ||
| tag "features/trf" | ||
|
|
||
| test("Stub: TRF") { | ||
| when { | ||
| options "-stub" | ||
|
|
||
| process { | ||
| """ | ||
| input[0] = [[ id: 'test' ],file('dummy.fa') | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assert snapshot(process.out).match() | ||
| assert process.out.dat.size() == 1 | ||
| assert process.out.dat[0][0] == [ id: 'test' ] | ||
| assert file(process.out.dat[0][1]).name == 'dummy.fa.dat' | ||
| assert file(process.out.dat[0][1]).size() > 0 | ||
| assert process.out.versions_trf.size() == 1 | ||
| } | ||
| } | ||
| } |
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,43 @@ | ||
| { | ||
| "Stub: TRF": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "dummy.fa.dat:md5,7afa5cc8da76212b28fe6a2c4db74917" | ||
| ] | ||
| ], | ||
| "1": [ | ||
| [ | ||
| "FEATURES_TRF", | ||
| "trf", | ||
| "4.10.0" | ||
| ] | ||
| ], | ||
| "dat": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "dummy.fa.dat:md5,7afa5cc8da76212b28fe6a2c4db74917" | ||
| ] | ||
| ], | ||
| "versions_trf": [ | ||
| [ | ||
| "FEATURES_TRF", | ||
| "trf", | ||
| "4.10.0" | ||
| ] | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-06-25T13:50:41.590756", | ||
| "meta": { | ||
| "nf-test": "0.9.5", | ||
| "nextflow": "26.04.3" | ||
| } | ||
| } | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.