Skip to content

Commit

Permalink
Added a test for invalid files
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp committed Feb 28, 2024
1 parent 1321d59 commit cb325c0
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
matrix:
NXF_VER:
- "23.04.0"
- "latest-everything"
RUN_CONFIG:
- "-profile test,docker"
- "-profile docker -c ./tests/stub/stub.config -stub"
- "-profile docker -params-file ./tests/invalid/params.json"
steps:
- name: Check out pipeline code
uses: actions/checkout@v4
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
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).

## v1.4dev - [20-Feb-2024]
## v1.4dev - [28-Feb-2024]

### `Added`

Expand All @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15. Refactored and cleaned data flows for all the custom sub-workflow
16. Started using nf-core template
17. Started using semantic versioning
18. Moved all python depending packages to 'docker.io/gallvp/python3npkgs:v0.6'

### `Fixed`

Expand Down
119 changes: 54 additions & 65 deletions bin/report_modules/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,68 +1,57 @@
<html>
{% include 'header.html' %}
{% include 'header.html' %}

<body>
<div class="report-header-wrapper">
<div class="report-header">AssemblyQC {{
all_stats_dicts['VERSIONS']['Workflow']['plant-food-research-open/assemblyqc'] }}</div>
</div>
<div class="tab" id="topNavBarButtons">
<button class="tablinks active" onclick="openTool(event, 'PARAMS')">PARAMS</button>
<button class="tablinks active" onclick="openTool(event, 'TOOLS')">TOOLS</button>
{% if 'FASTA_VALIDATE' in all_stats_dicts %}
<button class="tablinks active" onclick="openTool(event, 'FASTA_VALIDATE')">FASTA VALIDATE</button>
{% endif %}
{% if 'GFF3_VALIDATE' in all_stats_dicts %}
<button class="tablinks active" onclick="openTool(event, 'GFF3_VALIDATE')">GFF3 VALIDATE</button>
{% endif %}
{% if 'NCBI_FCS_ADAPTOR' in all_stats_dicts %}
<button class="tablinks active" onclick="openTool(event, 'NCBI_FCS_ADAPTOR')">NCBI FCS ADAPTOR</button>
{% endif %} {% if 'NCBI_FCS_GX' in all_stats_dicts %}<button class="tablinks"
onclick="openTool(event, 'NCBI_FCS_GX')">
NCBI FCS GX</button>{% endif %} {% if 'ASSEMBLATHON_STATS' in all_stats_dicts %}<button class="tablinks active"
onclick="openTool(event, 'ASSEMBLATHON_STATS')">
ASSEMBLATHON STATS</button>{% endif %} {% if 'GENOMETOOLS_GT_STAT' in all_stats_dicts %}<button
class="tablinks active" onclick="openTool(event, 'GENOMETOOLS_GT_STAT')">
GENOMETOOLS GT STAT</button>{% endif %} {% if 'BUSCO' in all_stats_dicts %}<button class="tablinks active"
onclick="openTool(event, 'BUSCO')">
BUSCO</button>{% endif %} {% if 'TIDK' in all_stats_dicts %}<button class="tablinks"
onclick="openTool(event, 'TIDK')">
TIDK</button>{% endif %} {% if 'LAI' in all_stats_dicts %}<button class="tablinks"
onclick="openTool(event, 'LAI')">
LAI</button>{% endif %} {% if 'KRAKEN2' in all_stats_dicts %}<button class="tablinks"
onclick="openTool(event, 'KRAKEN2')">
KRAKEN2</button>{% endif %} {% if 'HIC' in all_stats_dicts %}<button class="tablinks"
onclick="openTool(event, 'HIC')">
HIC</button>{% endif %} {% if 'CIRCOS' in all_stats_dicts %}<button class="tablinks"
onclick="openTool(event, 'CIRCOS')">
CIRCOS</button>{% endif %}
</div>
{% include 'params/params.html' %} {% include 'tools/tools.html' %} {% if 'FASTA_VALIDATE' in all_stats_dicts %}{%
include 'fasta_validate/fasta_validate.html' %}{% endif %}

{% if 'GFF3_VALIDATE' in all_stats_dicts %}{% include 'gff3_validate/gff3_validate.html' %}{% endif %}

{% if 'NCBI_FCS_ADAPTOR' in all_stats_dicts %}{%
include 'ncbi_fcs_adaptor/ncbi_fcs_adaptor.html' %}{% endif %} {% if 'NCBI_FCS_GX' in all_stats_dicts %}{%
include 'ncbi_fcs_gx/ncbi_fcs_gx.html' %}{% endif %} {% if 'ASSEMBLATHON_STATS' in all_stats_dicts %}{% include
'assemblathon_stats/assemblathon_stats.html' %}{% endif %} {% if 'GENOMETOOLS_GT_STAT' in all_stats_dicts %}{%
include 'genometools_gt_stat/genometools_gt_stat.html' %}{% endif %} {% if 'BUSCO' in all_stats_dicts %}{%
include 'busco/busco.html' %}{% endif %} {% if 'TIDK' in all_stats_dicts %}{% include 'tidk/tidk.html' %}{%
endif %} {% if 'LAI' in all_stats_dicts %}{% include 'lai/lai.html' %}{% endif %} {% if 'KRAKEN2' in
all_stats_dicts %}{% include 'kraken2/kraken2.html' %}{% endif %} {% if 'HIC' in all_stats_dicts %}{% include
'hic/hic.html' %}{% endif %} {% if 'CIRCOS' in all_stats_dicts %}{% include 'circos/circos.html' %}{% endif %}
</body>
{% include 'js.html' %}

<body>
<div class="report-header-wrapper">
<div class="report-header">AssemblyQC {{ all_stats_dicts['VERSIONS']['Workflow']['plant-food-research-open/assemblyqc'] }}</div>
</div>
<div class="tab" id="topNavBarButtons">
<button class="tablinks active" onclick="openTool(event, 'PARAMS')">PARAMS</button>
<button class="tablinks active" onclick="openTool(event, 'TOOLS')">TOOLS</button>
{% if 'GFF3_VALIDATE' in all_stats_dicts %}
<button class="tablinks active" onclick="openTool(event, 'GFF3_VALIDATE')">GFF3 VALIDATE</button>
{% endif %} {% if 'FASTA_VALIDATE' in all_stats_dicts %}
<button class="tablinks active" onclick="openTool(event, 'FASTA_VALIDATE')">FASTA VALIDATE</button>
{% endif %} {% if 'NCBI_FCS_ADAPTOR' in all_stats_dicts %}
<button class="tablinks active" onclick="openTool(event, 'NCBI_FCS_ADAPTOR')">NCBI FCS ADAPTOR</button>
{% endif %} {% if 'NCBI_FCS_GX' in all_stats_dicts %}<button
class="tablinks"
onclick="openTool(event, 'NCBI_FCS_GX')"
>
NCBI FCS GX</button
>{% endif %} {% if 'ASSEMBLATHON_STATS' in all_stats_dicts %}<button
class="tablinks active"
onclick="openTool(event, 'ASSEMBLATHON_STATS')"
>
ASSEMBLATHON STATS</button
>{% endif %} {% if 'GENOMETOOLS_GT_STAT' in all_stats_dicts %}<button
class="tablinks active"
onclick="openTool(event, 'GENOMETOOLS_GT_STAT')"
>
GENOMETOOLS GT STAT</button
>{% endif %} {% if 'BUSCO' in all_stats_dicts %}<button
class="tablinks active"
onclick="openTool(event, 'BUSCO')"
>
BUSCO</button
>{% endif %} {% if 'TIDK' in all_stats_dicts %}<button class="tablinks" onclick="openTool(event, 'TIDK')">
TIDK</button
>{% endif %} {% if 'LAI' in all_stats_dicts %}<button class="tablinks" onclick="openTool(event, 'LAI')">
LAI</button
>{% endif %} {% if 'KRAKEN2' in all_stats_dicts %}<button
class="tablinks"
onclick="openTool(event, 'KRAKEN2')"
>
KRAKEN2</button
>{% endif %} {% if 'HIC' in all_stats_dicts %}<button class="tablinks" onclick="openTool(event, 'HIC')">
HIC</button
>{% endif %} {% if 'CIRCOS' in all_stats_dicts %}<button
class="tablinks"
onclick="openTool(event, 'CIRCOS')"
>
CIRCOS</button
>{% endif %}
</div>
{% include 'params/params.html' %} {% include 'tools/tools.html' %} {% if 'GFF3_VALIDATE' in all_stats_dicts
%}{% include 'gff3_validate/gff3_validate.html' %}{% endif %} {% if 'FASTA_VALIDATE' in all_stats_dicts %}{%
include 'fasta_validate/fasta_validate.html' %}{% endif %} {% if 'NCBI_FCS_ADAPTOR' in all_stats_dicts %}{%
include 'ncbi_fcs_adaptor/ncbi_fcs_adaptor.html' %}{% endif %} {% if 'NCBI_FCS_GX' in all_stats_dicts %}{%
include 'ncbi_fcs_gx/ncbi_fcs_gx.html' %}{% endif %} {% if 'ASSEMBLATHON_STATS' in all_stats_dicts %}{% include
'assemblathon_stats/assemblathon_stats.html' %}{% endif %} {% if 'GENOMETOOLS_GT_STAT' in all_stats_dicts %}{%
include 'genometools_gt_stat/genometools_gt_stat.html' %}{% endif %} {% if 'BUSCO' in all_stats_dicts %}{%
include 'busco/busco.html' %}{% endif %} {% if 'TIDK' in all_stats_dicts %}{% include 'tidk/tidk.html' %}{%
endif %} {% if 'LAI' in all_stats_dicts %}{% include 'lai/lai.html' %}{% endif %} {% if 'KRAKEN2' in
all_stats_dicts %}{% include 'kraken2/kraken2.html' %}{% endif %} {% if 'HIC' in all_stats_dicts %}{% include
'hic/hic.html' %}{% endif %} {% if 'CIRCOS' in all_stats_dicts %}{% include 'circos/circos.html' %}{% endif %}
</body>
{% include 'js.html' %}
</html>
2 changes: 1 addition & 1 deletion modules/local/assembly2bedpe.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ process ASSEMBLY2BEDPE {
tag "$sample_id_on_tag"
label 'process_single'

container "docker.io/gallvp/python3npkgs:v0.4"
container "docker.io/gallvp/python3npkgs:v0.6"

input:
tuple val(sample_id_on_tag), path(agp_assembly_file)
Expand Down
2 changes: 1 addition & 1 deletion modules/local/colourbundlelinks.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ process COLOURBUNDLELINKS {
tag "${target_on_ref}"
label 'process_single'

container "docker.io/gallvp/python3npkgs:v0.4"
container "docker.io/gallvp/python3npkgs:v0.6"

input:
tuple val(target_on_ref), path(bundle_links)
Expand Down
2 changes: 1 addition & 1 deletion modules/local/hic2html.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ process HIC2HTML {
tag "$sample_id_on_tag"
label 'process_single'

container "docker.io/gallvp/python3npkgs:v0.4"
container "docker.io/gallvp/python3npkgs:v0.6"

input:
tuple val(sample_id_on_tag), path(hic_file)
Expand Down
2 changes: 1 addition & 1 deletion modules/local/relabelbundlelinks.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ process RELABELBUNDLELINKS {
tag "${target_on_ref}"
label 'process_single'

container "docker.io/gallvp/python3npkgs:v0.4"
container "docker.io/gallvp/python3npkgs:v0.6"

input:
tuple val(target_on_ref), path(coloured_bundle_links), path(target_seq_list), path(ref_seq_list)
Expand Down
2 changes: 1 addition & 1 deletion modules/local/relabelfastalength.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ process RELABELFASTALENGTH {
tag "${target_on_ref}"
label 'process_single'

container "docker.io/gallvp/python3npkgs:v0.4"
container "docker.io/gallvp/python3npkgs:v0.6"

input:
tuple val(target_on_ref), path(target_seq_lengths), path(ref_seq_lengths), path(target_seq_list), path(ref_seq_list)
Expand Down
4 changes: 4 additions & 0 deletions tests/invalid/assemblysheet.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tag,fasta,gff3,monoploid_ids,synteny_labels
FI1,https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003/814/445/GCA_003814445.1_ASM381444v1/GCA_003814445.1_ASM381444v1_genomic.fna.gz,https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003/814/445/GCA_003814445.1_ASM381444v1/GCA_003814445.1_ASM381444v1_genomic.gff.gz,,
TT_2021a,https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/021/950/295/GCA_021950295.1_ASM2195029v1/GCA_021950295.1_ASM2195029v1_genomic.fna.gz,https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003/814/445/GCA_003814445.1_ASM381444v1/GCA_003814445.1_ASM381444v1_genomic.gff.gz,,
MISC,tests/invalid/invalid.fsa.gz,,,
Binary file added tests/invalid/invalid.fsa.gz
Binary file not shown.
8 changes: 8 additions & 0 deletions tests/invalid/params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"config_profile_name": "Invalid profile",
"config_profile_description": "Profile to test invalid files",
"input": "tests/invalid/assemblysheet.csv",
"max_cpus": 2,
"max_memory": "6.GB",
"max_time": "6.h"
}

0 comments on commit cb325c0

Please sign in to comment.