-
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
Sfitz vcf sample orders #237
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
29f12b2
in progress
sorelfitzgibbon 689ab27
in progress
sorelfitzgibbon f47305f
reorder samples moved to intersect
sorelfitzgibbon 53786f1
Merge branch 'main' of github.com:uclahs-cds/pipeline-call-sSNV into …
sorelfitzgibbon 97a2db4
fix reorder log output dir
sorelfitzgibbon 9ea2ee9
tidy up
sorelfitzgibbon f2aac72
tidier
sorelfitzgibbon 1bd4c83
add toolname to compress reordered log dirs
sorelfitzgibbon 975ab0a
remove unnecessary sorts
sorelfitzgibbon 6f42173
remove lingering comments
sorelfitzgibbon e6c037a
move filter_VCF_BCFtools to common
sorelfitzgibbon 81728fc
Merge branch 'sfitz-nftest-assertions' of github.com:uclahs-cds/pipel…
sorelfitzgibbon 279b3a5
update changelog
sorelfitzgibbon b9a0a8b
tidy up
sorelfitzgibbon a0fc5cc
typo
sorelfitzgibbon f1ea45a
Merge branch 'main' of github.com:uclahs-cds/pipeline-call-sSNV into …
sorelfitzgibbon 475d085
add two tools nftest
sorelfitzgibbon e9f60ea
add CODEOWNERS
sorelfitzgibbon 6b15501
getToolName function
sorelfitzgibbon fc27ff8
fix CODEOWNERS
sorelfitzgibbon 20fe628
fix CODEOWNERS
sorelfitzgibbon 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
Validating CODEOWNERS rules …
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 @@ | ||
# Test CODEOWNERS | ||
# Default owner(s) | ||
* @tyamaguchi-ucla @yashpatel6 @maotian06 @sorelfitzgibbon @uclahs-cds/nextflow-wg | ||
# Folder specific owner |
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 |
---|---|---|
|
@@ -10,6 +10,36 @@ Intersect Options: | |
- vcf2maf_extra_args: ${params.vcf2maf_extra_args} | ||
==================================== | ||
""" | ||
process reorder_samples_BCFtools { | ||
container params.docker_image_BCFtools | ||
publishDir path: "${params.workflow_output_dir}/intermediate/${task.process.split(':')[-1]}", | ||
mode: "copy", | ||
pattern: "*.vcf.gz", | ||
enabled: params.save_intermediate_files | ||
publishDir path: "${params.workflow_log_output_dir}", | ||
mode: "copy", | ||
pattern: ".command.*", | ||
saveAs: { "${task.process.split(':')[-1]}-${algorithm}/log${file(it).getName()}" } | ||
|
||
input: | ||
tuple val(algorithm), path(gzvcf) | ||
path indices | ||
val tumor_id | ||
val normal_id | ||
|
||
output: | ||
path "*-reorder.vcf.gz", emit: gzvcf | ||
path ".command.*" | ||
|
||
script: | ||
""" | ||
set -euo pipefail | ||
infile=\$(basename ${gzvcf} .vcf.gz) | ||
outfile="\${infile}-reorder.vcf.gz" | ||
bcftools view -s ${tumor_id},${normal_id} --output \${outfile} ${gzvcf} | ||
""" | ||
} | ||
|
||
process intersect_VCFs_BCFtools { | ||
container params.docker_image_BCFtools | ||
publishDir path: "${params.workflow_output_dir}/output", | ||
|
@@ -29,20 +59,20 @@ process intersect_VCFs_BCFtools { | |
saveAs: { "${task.process.split(':')[-1]}/log${file(it).getName()}" } | ||
|
||
input: | ||
path vcfs | ||
path gzvcf | ||
path indices | ||
path intersect_regions | ||
path intersect_regions_index | ||
|
||
output: | ||
path "*.vcf.gz", emit: intersect_vcf | ||
path "*.vcf.gz.tbi", emit: intersect_idx | ||
path "*.vcf.gz", emit: gzvcf | ||
path "*.vcf.gz.tbi", emit: idx | ||
path ".command.*" | ||
path "isec-2-or-more/*.txt" | ||
path "isec-1-or-more/*.txt", emit: isec | ||
|
||
script: | ||
vcf_list = vcfs.join(' ') | ||
vcf_list = gzvcf.join(' ') | ||
regions_command = params.use_intersect_regions ? "--regions-file ${intersect_regions}" : "" | ||
""" | ||
set -euo pipefail | ||
|
@@ -54,13 +84,13 @@ process intersect_VCFs_BCFtools { | |
${regions_command} \ | ||
${vcf_list} | ||
awk '/Using the following file names:/{x=1;next} x' isec-2-or-more/README.txt \ | ||
| sed 's/.vcf.gz\$/-intersect.vcf.gz/' \ | ||
| sed 's/-reorder.vcf.gz\$/-intersect.vcf.gz/' \ | ||
| while read a b c d; do | ||
mv \$a \$d | ||
mv \$a.tbi \$d.tbi | ||
done | ||
# intersect, keeping all variants, to create presence/absence list of variants in each VCF | ||
bcftools isec \ | ||
bcftools isec --nfiles +1\ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Testing with just two tools revealed that the default behavior of bcftools isec depends on the number of vcfs being intersected. Adding |
||
--output-type z \ | ||
--prefix isec-1-or-more \ | ||
${regions_command} \ | ||
|
@@ -109,7 +139,7 @@ process concat_VCFs_BCFtools { | |
path indices | ||
|
||
output: | ||
path "*concat.vcf", emit: concat_vcf | ||
path "*concat.vcf", emit: vcf | ||
path ".command.*" | ||
|
||
script: | ||
|
@@ -146,7 +176,7 @@ process convert_VCF_vcf2maf { | |
val tumor_id | ||
|
||
output: | ||
path "*.maf", emit: concat_maf | ||
path "*.maf", emit: maf | ||
path ".command.*" | ||
|
||
script: | ||
|
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.
Updating these names as I had failed to make them reflect the status of the compression and the channel (vs list), improving readability.