Skip to content
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

Fix test syntax issues. #530

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
Database for Busco Lineage: v5
outputs:
Hifiasm HiC hap1:
assert:
has_n_line:
asserts:
has_n_lines:
n: 168
Estimated Genome size: 2288021
Busco Summary Hap1:
Expand All @@ -49,8 +49,8 @@
value: 65000
delta: 10000
usable hap1 gfa:
assert:
has_n_line:
asserts:
has_n_lines:
n: 173
Assembly statistics for Hap1 and Hap2:
asserts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
value: 68000
delta: 5000
mitogenome_genbank:
assert:
has_n_line:
asserts:
has_n_lines:
n: 480
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,18 @@
Ploidy: 1
outputs:
GenomeScope linear plot:
class: File
file: test-data/GenomeScope_Linear_plot.png
compare: sim_size
delta: 10000
GenomeScope log plot:
class: File
file: test-data/GenomeScope_Log_plot.png
compare: sim_size
delta: 10000
GenomeScope transformed linear plot:
class: File
file: test-data/GenomeScope_Transformed_linear_plot.png
compare: sim_size
delta: 10000
GenomeScope transformed log plot:
class: File
file: test-data/GenomeScope_Transformed_log_plot.png
compare: sim_size
delta: 10000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,14 @@
Ploidy: 1
outputs:
GenomeScope linear plot (maternal):
class: File
file: test-data/GenomeScope_Linear_plot_maternal.png
compare: sim_size
delta: 15000
GenomeScope linear plot (paternal):
class: File
file: test-data/GenomeScope_Linear_plot_paternal.png
compare: sim_size
delta: 15000
GenomeScope linear plot (child):
class: File
file: test-data/GenomeScope_Linear_plot_child.png
compare: sim_size
delta: 15000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,55 +5,55 @@
path: https://zenodo.org/records/11488310/files/shovill_contigs_fasta
outputs:
staramr_detailed_summary:
assert:
has_text:
text: "Resistance"
has_n_columns:
n: 12
asserts:
has_text:
text: "Resistance"
has_n_columns:
n: 12
staramr_resfinder_report:
assert:
has_text:
text: "tetracycline"
has_n_columns:
n: 13
asserts:
has_text:
text: "tetracycline"
has_n_columns:
n: 13
staramr_mlst_report:
assert:
asserts:
has_text:
text: "efaecalis"
has_n_columns:
n: 10
staramr_plasmidfinder_report:
assert:
asserts:
has_text:
text: "CP002494"
has_n_columns:
n: 9
staramr_summary:
assert:
asserts:
has_text:
text: "streptomycin"
has_n_columns:
n: 12
amrfinderplus_report:
assert:
asserts:
has_text:
text: "Enterococcus faecalis quinolone resistant ParC"
has_n_columns:
n: 23
amrfinderplus_mutation:
assert:
asserts:
has_text:
text: "cardiolipin synthase Cls"
has_n_columns:
n: 23
abricate_virulence_report:
assert:
asserts:
has_text:
text: "endocarditis specific antigen"
has_n_columns:
n: 15
tooldistillator_summarize:
assert:
asserts:
has_text:
text: "% Identity to reference sequence"
has_text:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,51 @@
Select a AMRFinderPlus database: amrfinderplus_V3.12_2024-05-02.2
outputs:
integronfinder2_logfile_text:
assert:
asserts:
has_text:
text: "Writing out results for replicon"
integronfinder2_summary:
assert:
asserts:
has_n_columns:
n: 6
integronfinder2_results_tabular:
assert:
asserts:
has_n_columns:
n: 14
bakta_hypothetical_tabular:
assert:
asserts:
has_n_columns:
n: 9
bakta_annotation_json:
assert:
asserts:
has_text:
text: "aa_hexdigest"
bakta_annotation_tabular:
assert:
asserts:
has_n_columns:
n: 9
isescan_results_tabular:
assert:
asserts:
has_n_columns:
n: 24
isescan_summary_tabular:
assert:
asserts:
has_text:
text: "nIS"
isescan_logfile_text:
assert:
asserts:
has_text:
text: "Both complete and partial IS elements are reported."
plasmidfinder_result_json:
assert:
asserts:
has_text:
text: "positions_in_contig"
plasmidfinder_results_tabular:
assert:
asserts:
has_n_columns:
n: 8
tooldistillator_summarize:
assert:
asserts:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

below there are multiple 'has_text' and only the last one will be tested, right?

has_text:
text: "CDS12738(DOp1)"
has_text:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
SuCOS threshold: 0
outputs:
Scored and filtered poses:
class: File
assert:
has_line: "$$$$"
n: 4
assert:
has_test: "SuCOS_Score"
n: 4
asserts:
has_line:
line: "$$$$"
n: 4
asserts:
has_text:
text: "SuCOS_Score"
n: 4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will only test the last one, do you have a check for this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that's really checkable as that's a yaml language issue, we don't go that deep.

Comment on lines +24 to +31
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
asserts:
has_line:
line: "$$$$"
n: 4
asserts:
has_text:
text: "SuCOS_Score"
n: 4
asserts:
has_line:
line: "$$$$"
n: 4
has_text:
text: "SuCOS_Score"
n: 4

Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,19 @@
XTC files:
element_tests:
split_file_000000.txt:
assert:
has_size: 138900
delta: 500
asserts:
has_size:
size: 138900
delta: 500
Free energy data:
class: 'File'
assert:
has_n_lines: 101
has_n_columns: 5
asserts:
has_n_lines:
n: 101
has_n_columns:
n: 5
Friction data:
class: 'File'
assert:
has_n_lines: 101
has_n_columns: 5
asserts:
has_n_lines:
n: 101
has_n_columns:
n: 5
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,21 @@
Salt concentration: 0.1
outputs:
MMGBSA free energy:
class: 'File'
assert:
has_n_lines: 2
asserts:
has_n_lines:
n: 2
MMGBSA statistics:
element_tests:
split_file_000000.txt:
assert:
has_text: 'DELTA TOTAL'
has_text: 'Generalized Born ESURF calculated using LCPO'
asserts:
- that: has_text
text: 'DELTA TOTAL'
- that: has_text
text: 'Generalized Born ESURF calculated using LCPO'
XTC files:
element_tests:
split_file_000000.txt:
assert:
has_size: 138900
delta: 500
asserts:
has_size:
size: 138900
delta: 500
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
bin_size: 50
outputs:
average_bigwigs:
class: Collection
collection_type: list
attributes:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the model behind this ? attributes seems kind of odd, shouldn't this nest directly under the output ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should and I will implement that in follow ups but that is an enhancement - this version of the models just reflects what actually works with current planemo. I don't think anyone ever thought this through and so it is a pretty low-level mapping to the XML parsing outputs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't ask my why I put this test... I cannot remember.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I think I am the only one to use this type of test)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

collection_type: list
element_tests:
ATAC_HH19_PT:
asserts:
Expand Down
20 changes: 12 additions & 8 deletions workflows/epigenetics/cutandrun/cutandrun-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@
MACS2 summits:
element_tests:
Rep1:
has_n_lines:
n: 1856
asserts:
has_n_lines:
n: 1856
MACS2 narrowPeak:
element_tests:
Rep1:
has_n_lines:
n: 1856
asserts:
has_n_lines:
n: 1856
MACS2 peaks xls:
element_tests:
Rep1:
Expand Down Expand Up @@ -109,13 +111,15 @@
MACS2 summits:
element_tests:
Rep1:
has_n_lines:
n: 3261
asserts:
has_n_lines:
n: 3261
MACS2 narrowPeak:
element_tests:
Rep1:
has_n_lines:
n: 3261
asserts:
has_n_lines:
n: 3261
MACS2 peaks xls:
element_tests:
Rep1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
value: 47830
delta: 4000
plot with pyGenomeTracks:
class: File
file: test-data/plot_chic.png
compare: sim_size
delta: 1500
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
value: 149349
delta: 10000
plot with pyGenomeTracks:
class: File
file: test-data/plot_hic.png
compare: sim_size
delta: 1500
Loading
Loading