Last active
May 31, 2021 02:41
-
-
Save tahashmi/84927410a47fd0b76a66228c1b37a744 to your computer and use it in GitHub Desktop.
Merge VCFs
This file contains hidden or 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
#!/bin/bash | |
#Usage: ./vcfmerge.sh {PATH FOR VCFs} a/b/c/ | |
PICARDPATH=/usr/local/bin | |
STR="" | |
for f in ${1}*.dv.vcf.gz | |
do | |
if [[ $f != *.dv_merged.vcf.gz ]] | |
then | |
STR="${STR} INPUT=${f}" | |
fi | |
done | |
echo "java -jar $PICARDPATH/picard.jar MergeVcfs INPUT=$STR OUTPUT=${1}.dv_merged.vcf" | |
java -jar $PICARDPATH/picard.jar MergeVcfs $STR OUTPUT=${1}query.dv_merged.vcf.gz | |
################################################################################## | |
''' | |
STR="" | |
for f in ${1}*.haplotagged.vcf.gz | |
do | |
if [[ $f != *.haplotagged_merged.vcf.gz ]] | |
then | |
STR="${STR} INPUT=${f}" | |
fi | |
done | |
echo "java -jar $PICARDPATH/picard.jar MergeVcfs INPUT=$STR OUTPUT=${1}.haplotagged_merged.vcf" | |
java -jar $PICARDPATH/picard.jar MergeVcfs $STR OUTPUT=${1}query.haplotagged_merged.vcf.gz | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment