-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support for Additional Profiles and Clusters #29
Merged
Merged
Changes from 7 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
e65a7ae
Enhanced pipeline to support integration of additional profiles and c…
kylacochrane a451b7f
Fixed linting and EC errors
kylacochrane c7d1127
Refactored tests to comply with updated processes
kylacochrane 73eb9c6
Created new test and data for appending profiles and clusters
kylacochrane 06952e3
Implemented validation for 'db_profiles' and 'db_clusters' parameters…
kylacochrane 0a91ec6
Updated documentation
kylacochrane 9f11883
Update nextflow_schema
kylacochrane 28c23ae
Update pipeline to append compressed (gz) files
kylacochrane bb91d0d
Add compressed test files
kylacochrane e030807
Updated schemas
kylacochrane f887f1a
Fixed linting issues
kylacochrane 72ab36d
Lint issue resolved
kylacochrane 1978efe
Enhance append_profiles and append_clusters to prevent sample ID over…
kylacochrane 8ae527f
Add tests to verify no sample ID overlap and loci mismatches in appen…
kylacochrane 3002b00
Add support for gzipped files in header check for append modules
kylacochrane 7d54942
Implement XOR logic to enforce both --db_profiles and --db_clusters m…
kylacochrane e0433c5
Update README for improved comprehension
kylacochrane 2d83257
Fixed liniting issues
kylacochrane 9780166
Fix duplicate removal by adding sort before csvtk uniq on sample_id
kylacochrane 7d2f30a
Updated tests to verify duplicate removal after sorting by sample_id
kylacochrane 0563a30
Enhance append database module to prefix duplicate sample IDs
kylacochrane 79924e2
Updated tests to validate correct prefixing of duplicated sample IDs
kylacochrane 8b5a418
Resolved merge conflict with CHANGELOG.md
kylacochrane a78a8ad
Fixed EC linting errors
kylacochrane 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 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,21 @@ | ||
process APPEND_CLUSTERS { | ||
tag "Append additional clusters from database" | ||
label 'process_single' | ||
|
||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/csvtk:0.22.0--h9ee0642_1' : | ||
'biocontainers/csvtk:0.22.0--h9ee0642_1' }" | ||
|
||
input: | ||
path(initial_clusters) | ||
path(additional_clusters) | ||
|
||
output: | ||
path("reference_clusters.tsv") | ||
|
||
script: | ||
""" | ||
csvtk concat -t ${initial_clusters} ${additional_clusters} > reference_clusters.tsv | ||
apetkau marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
""" | ||
} |
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,20 @@ | ||
process APPEND_PROFILES { | ||
tag "Append additional reference profiles" | ||
label 'process_single' | ||
|
||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/csvtk:0.22.0--h9ee0642_1' : | ||
'biocontainers/csvtk:0.22.0--h9ee0642_1' }" | ||
|
||
input: | ||
path(reference_profiles) | ||
path(additional_profiles) | ||
|
||
output: | ||
path("*.tsv") | ||
|
||
script: | ||
""" | ||
csvtk concat -t ${reference_profiles} ${additional_profiles} > profiles_ref.tsv | ||
apetkau marked this conversation as resolved.
Show resolved
Hide resolved
|
||
""" | ||
} |
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 @@ | ||
id address level_1 level_2 level_3 | ||
sample1 1.1.1 1 1 1 | ||
sample2 1.1.1 1 1 1 | ||
sample3 1.1.2 1 1 2 | ||
sampleA 1.1.1 1 1 1 | ||
sampleB 1.1.2 1 1 2 | ||
sampleC 2.1.1 2 1 1 | ||
sampleQ 1.1.3 1 1 3 |
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,7 @@ | ||
id address level_1 level_2 level_3 | ||
sample1 1.1.1 1 1 1 | ||
sample2 1.1.1 1 1 1 | ||
sample3 1.1.2 1 1 2 | ||
sampleA 1.1.1 1 1 1 | ||
sampleB 1.1.2 1 1 2 | ||
sampleC 2.1.1 2 1 1 |
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,4 @@ | ||
id address level_1 level_2 level_3 | ||
sampleA 1.1.1 1 1 1 | ||
sampleB 1.1.2 1 1 2 | ||
sampleC 2.1.1 2 1 1 |
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,4 @@ | ||
sample_id l1 l2 l3 | ||
sampleA 1 1 1 | ||
sampleB 1 1 2 | ||
sampleC 2 1 1 |
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 @@ | ||
query_id ref_id dist | ||
sampleQ sampleQ 0 | ||
sampleQ sample1 1 | ||
sampleQ sample2 1 | ||
sampleQ sampleA 1 | ||
sampleQ sample3 2 | ||
sampleQ sampleB 2 | ||
sampleQ sampleC 2 |
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,13 @@ | ||
{ | ||
"files": { | ||
"global": [], | ||
"samples": {} | ||
}, | ||
"metadata": { | ||
"samples": { | ||
"sampleQ": { | ||
"address": "1.1.3" | ||
} | ||
} | ||
} | ||
} |
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 @@ | ||
sample_id l1 l2 l3 | ||
sampleQ 1 2 1 | ||
sample1 1 1 1 | ||
sample2 1 1 1 | ||
sample3 1 1 2 | ||
sampleA 1 1 1 | ||
sampleB 1 1 2 | ||
sampleC 2 1 1 |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't have to change this, because it's probably easier to understand the way you have it, but you could do this with an XOR: true only if one of the two is true.
I don't think Python (edit: Nextflow/Groovy) has an actual logical XOR operator, so it might reduce to something like:
if bool(params.db_profiles) != bool(params.db_clusters):
but again, just a comment, not necessary to change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great suggestion Eric - played around a bit and got it working here: 7d54942