Skip to content

Commit

Permalink
formating vcf to match purple sample names
Browse files Browse the repository at this point in the history
  • Loading branch information
adigenova committed Oct 27, 2021
1 parent 773ecc2 commit 9cea68b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ process HQ_VCF{
bcftools view -Oz -e 'FORMAT/AD[1:0]<5 | TYPE!="snps"' ${vcf} -o ${vcf.baseName}_filter.vcf.gz
#we reheader the vcf file to match purple, cobalt, and amber sample names
zcat ${vcf.baseName}_filter.vcf.gz | egrep "^#CHR" |\
awk -v tid=${tumor_id} '{print tid"_N "\$(NF-1); print tid"_T "\$NF}' > rename_sample.txt
awk -v tid=${tumor_id} '{print \$(NF-1)" "tid"_N"; print \$NF" "tid"_T"}' > rename_sample.txt
bcftools reheader -s rename_sample.txt -o ${vcf.baseName}_highconf.vcf.gz ${vcf.baseName}_filter.vcf.gz
"""
}else{
Expand Down

0 comments on commit 9cea68b

Please sign in to comment.