-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from TRON-Bioinformatics/whatshap
Integrate whatshap for phasing and fix bcftools csq
- Loading branch information
Showing
9 changed files
with
84 additions
and
3 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,5 @@ jobs: | |
run: conda config --show-sources | ||
- name: Run tests | ||
run: | | ||
export NXF_VER=22.04.5 | ||
make |
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,33 @@ | ||
params.phasing_sample = false | ||
params.cpus = 1 | ||
params.memory = '3g' | ||
|
||
|
||
process WHATSHAP { | ||
cpus params.cpus | ||
memory params.memory | ||
tag "${patient_name}" | ||
publishDir "${params.output}/${patient_name}", mode: "copy" | ||
|
||
conda (params.enable_conda ? "bioconda::whatshap=1.4" : null) | ||
|
||
input: | ||
tuple val(patient_name), file(vcf), val(bams) | ||
|
||
output: | ||
tuple val(patient_name), file("${patient_name}.phased.vcf"), emit: phased_vcf | ||
|
||
script: | ||
phasing_bams = bams.toList().stream() | ||
.filter{ b -> b.split(':')[0] == "${params.phasing_sample}" } | ||
.collect{ b -> b.split(":")[1] } | ||
.join(" ") ; | ||
""" | ||
whatshap phase \ | ||
--indel \ | ||
-o ${patient_name}.phased.vcf \ | ||
--reference=${params.reference} \ | ||
${vcf} \ | ||
${phasing_bams} | ||
""" | ||
} |
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 @@ | ||
single_sample test/data/test_single_sample.vcf |
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,16 @@ | ||
#!/bin/bash | ||
|
||
|
||
source test/scripts/assert.sh | ||
output_folder=test/output/test14 | ||
echo -e "tumor_normal\tprimary:"`pwd`"/test/data/TESTX_S1_L001.bam" > test/data/test_bams.txt | ||
echo -e "tumor_normal\tnormal:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test/data/test_bams.txt | ||
echo -e "single_sample\ttumor:"`pwd`"/test/data/TESTX_S1_L001.bam" >> test/data/test_bams.txt | ||
echo -e "single_sample\ttumor:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test/data/test_bams.txt | ||
echo -e "single_sample\tnormal:"`pwd`"/test/data/TESTX_S1_L001.bam" >> test/data/test_bams.txt | ||
echo -e "single_sample\tnormal:"`pwd`"/test/data/TESTX_S1_L002.bam" >> test/data/test_bams.txt | ||
|
||
nextflow main.nf -profile test,conda --output $output_folder --input_bams test/data/test_bams.txt \ | ||
--phasing_sample normal --input_vcfs test/data/test_input_single_sample.txt | ||
|
||
test -s $output_folder/single_sample/single_sample.phased.vcf || { echo "Missing test 10 output file!"; exit 1; } |