-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made the hic param pattern more flexible
- Loading branch information
Showing
17 changed files
with
211 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -30,10 +30,11 @@ jobs: | |
- invalid | ||
- stub | ||
- noltr | ||
- hicparam | ||
include: | ||
- OPTION_STUB: "" | ||
- OPTION_STUB: "-stub" | ||
TEST_PARAMS: stub | ||
TEST_PARAMS: [stub, hicparam] | ||
steps: | ||
- name: Check out pipeline code | ||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | ||
|
@@ -55,3 +56,31 @@ jobs: | |
-params-file \ | ||
./tests/${{ matrix.TEST_PARAMS }}/params.json \ | ||
${{ matrix.OPTION_STUB }} | ||
nf-test: | ||
name: Run nf-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 == 'plant-food-research-open/assemblyqc') }}" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
NXF_VER: | ||
- "23.04.0" | ||
steps: | ||
- name: Check out pipeline code | ||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | ||
|
||
- name: Install Nextflow | ||
uses: nf-core/setup-nextflow@v2 | ||
with: | ||
version: ${{ matrix.NXF_VER }} | ||
|
||
- name: Install nf-test | ||
uses: nf-core/[email protected] | ||
|
||
- name: Run nf-tests | ||
run: | | ||
nf-test \ | ||
test \ | ||
--verbose \ | ||
tests |
This file contains 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 |
---|---|---|
|
@@ -10,3 +10,7 @@ testing* | |
# PFR files | ||
*.stdout | ||
*.stderr | ||
|
||
# nf-test files | ||
.nf-test/ | ||
.nf-test.log |
This file contains 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 |
---|---|---|
|
@@ -3,6 +3,21 @@ | |
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## v2.1.1+dev - [19-Sep-2024] | ||
|
||
### `Added` | ||
|
||
1. Configured nf-test for function testing | ||
|
||
### `Fixed` | ||
|
||
1. Made the `hic` param pattern more flexible as `^SR\w+$|^\S+\{1,2\}[\w\.]*\.f(ast)?q\.gz$` | ||
|
||
### `Dependencies` | ||
|
||
1. Nextflow!>=23.04.0 | ||
2. [email protected] | ||
|
||
## v2.1.0 - [31-July-2024] | ||
|
||
### `Added` | ||
|
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -9,3 +9,7 @@ do | |
rm -rf "work/$i" | ||
done | ||
echo "Cleaned work..." | ||
|
||
rm -f .nf-test.log | ||
rm -rf .nf-test | ||
echo "Cleaned nf-test..." |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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,8 @@ | ||
config { | ||
|
||
testsDir "tests" | ||
workDir ".nf-test" | ||
configFile "nextflow.config" | ||
profile "" | ||
|
||
} |
This file contains 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,2 @@ | ||
tag,fasta | ||
test,tests/hicparam/test_genome.fa.gz |
Binary file not shown.
Binary file not shown.
This file contains 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,10 @@ | ||
import groovy.json.JsonSlurper | ||
|
||
def checkHiCParam(paramValue, schema) { | ||
def jsonSlurper = new JsonSlurper() | ||
def jsonContent = jsonSlurper.parse ( file ( schema, checkIfExists: true ) ) | ||
def pattern = jsonContent.definitions.hic_options.properties.hic.pattern | ||
def match = paramValue ==~ pattern | ||
|
||
return match | ||
} |
This file contains 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,118 @@ | ||
nextflow_function { | ||
|
||
name "checkHiCParam" | ||
script "./hicparam.nf" | ||
function "checkHiCParam" | ||
|
||
test("Dummy_hic.R{1,2}.fq.gz") { | ||
when { | ||
function { | ||
""" | ||
input[0] = "Dummy_hic.R{1,2}.fq.gz" | ||
input[1] = "$baseDir/nextflow_schema.json" | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert function.success | ||
assert function.result | ||
} | ||
} | ||
|
||
test("Dummy_hic.{1,2}.fq.gz") { | ||
when { | ||
function { | ||
""" | ||
input[0] = "Dummy_hic.{1,2}.fq.gz" | ||
input[1] = "$baseDir/nextflow_schema.json" | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert function.success | ||
assert function.result | ||
} | ||
} | ||
|
||
test("Dummy_hic{1,2}.fastq.gz") { | ||
when { | ||
function { | ||
""" | ||
input[0] = "Dummy_hic{1,2}.fastq.gz" | ||
input[1] = "$baseDir/nextflow_schema.json" | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert function.success | ||
assert function.result | ||
} | ||
} | ||
|
||
test("Dummy_hic.R{1,2}.merged.fq.gz") { | ||
when { | ||
function { | ||
""" | ||
input[0] = "Dummy_hic.R{1,2}.merged.fq.gz" | ||
input[1] = "$baseDir/nextflow_schema.json" | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert function.success | ||
assert function.result | ||
} | ||
} | ||
|
||
test("Dummy_hic{1,2}_merged.samtools._check.fq.gz") { | ||
when { | ||
function { | ||
""" | ||
input[0] = "Dummy_hic{1,2}_merged.samtools._check.fq.gz" | ||
input[1] = "$baseDir/nextflow_schema.json" | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert function.success | ||
assert function.result | ||
} | ||
} | ||
|
||
test("CK13_02_hic_R{1,2}.merged.fastq.gz") { | ||
when { | ||
function { | ||
""" | ||
input[0] = "CK13_02_hic_R{1,2}.merged.fastq.gz" | ||
input[1] = "$baseDir/nextflow_schema.json" | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert function.success | ||
assert function.result | ||
} | ||
} | ||
|
||
test("CK13_02_hic_1.merged.fastq.gz -- fail") { | ||
when { | ||
function { | ||
""" | ||
input[0] = "CK13_02_hic_1.merged.fastq.gz" | ||
input[1] = "$baseDir/nextflow_schema.json" | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert function.success | ||
assert ! function.result | ||
} | ||
} | ||
} |
This file contains 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,9 @@ | ||
{ | ||
"config_profile_name": "Test to verify hic param validation", | ||
"config_profile_description": "Test to verify hic param validation", | ||
"input": "tests/hicparam/assemblysheet.csv", | ||
"hic": "tests/hicparam/hic/Dummy_hic_{1,2}.merged.fq.gz", | ||
"max_cpus": 2, | ||
"max_memory": "6.GB", | ||
"max_time": "6.h" | ||
} |
Binary file not shown.