Skip to content

Commit

Permalink
Merge pull request #4 from phac-nml/define-queryref
Browse files Browse the repository at this point in the history
Define Query & Reference Samples
  • Loading branch information
sgsutcliffe authored Dec 13, 2024
2 parents 25f22dd + c82c6f9 commit 484c1b6
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 273 deletions.
4 changes: 3 additions & 1 deletion modules/local/locidex/merge/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ process LOCIDEX_MERGE {

input:
path input_values // [file(sample1), file(sample2), file(sample3), etc...]
val combined_dir
val query_ref

output:
path("${combined_dir}/*.tsv"), emit: combined_profiles
path "versions.yml", emit: versions

script:
combined_dir = "merged"
"""
locidex merge -i ${input_values.join(' ')} -o ${combined_dir}
mv ${combined_dir}/profile.tsv ${combined_dir}/profile_${query_ref}.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
locidex merge: \$(echo \$(locidex search -V 2>&1) | sed 's/^.*locidex //' )
Expand Down
3 changes: 2 additions & 1 deletion modules/local/profile_dists/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ process PROFILE_DISTS{

input:
path query
path reference
val mapping_format
path mapping_file
path columns
Expand Down Expand Up @@ -40,7 +41,7 @@ process PROFILE_DISTS{
}
prefix = "distances"
"""
profile_dists --query $query --ref $query $args --outfmt $mapping_format \\
profile_dists --query $query --ref $reference $args --outfmt $mapping_format \\
--force \\
--distm $params.pd_distm \\
--file_type $params.pd_file_type \\
Expand Down
10 changes: 0 additions & 10 deletions tests/data/distances/expected_dists-hamming.tsv

This file was deleted.

4 changes: 0 additions & 4 deletions tests/data/profiles/expected-profile-hamming.tsv

This file was deleted.

4 changes: 0 additions & 4 deletions tests/data/samplesheets/samplesheet-hamming.csv

This file was deleted.

7 changes: 4 additions & 3 deletions tests/pipelines/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ nextflow_pipeline {
then {
assert workflow.success
assert path("$launchDir/results").exists()

/*
// Check ID correction:
def sampleA_report = path("$launchDir/results/input/sampleA_error_report.csv")
def sampleB_report = path("$launchDir/results/input/sampleB_error_report.csv")
Expand All @@ -46,10 +46,10 @@ nextflow_pipeline {
assert actual_distances.exists()
def expected_distances = path("$baseDir/tests/data/distances/expected_dists.tsv")
assert actual_distances.text == expected_distances.text

*/
}
}

/*
test("Small-scale test of full pipeline hamming distances") {
tag "pipeline_hamming"
Expand Down Expand Up @@ -449,4 +449,5 @@ nextflow_pipeline {
assert iridanext_metadata.isEmpty()
}
}
*/
}
238 changes: 0 additions & 238 deletions tests/pipelines/main_gm_thresholds.nf.test

This file was deleted.

7 changes: 4 additions & 3 deletions tests/pipelines/main_missing_alleles.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ nextflow_pipeline {
then {
assert workflow.success
assert path("$launchDir/results").exists()

/*
// Check MLST files
def actual_profile_tsv = path("$launchDir/results/merged/locidex.merge.profile.tsv")
def expected_profile_tsv = path("$baseDir/tests/data/profiles/expected-profile-hash-missing.tsv")
Expand All @@ -28,10 +28,10 @@ nextflow_pipeline {
def actual_distances = path("$launchDir/results/distances/profile_dists.results.text")
def expected_distances = path("$baseDir/tests/data/distances/expected_dists-hash-missing.tsv")
assert actual_distances.text == expected_distances.text

*/
}
}

/*
test("Full pipeline hashes and missing data count missing as differences") {
tag "pipeline_hashes_missing_count_missing"
Expand Down Expand Up @@ -261,4 +261,5 @@ nextflow_pipeline {
assert workflow.failed
}
}
*/
}
Loading

0 comments on commit 484c1b6

Please sign in to comment.