diff --git a/scripts/Spike/2b_SV.sh b/scripts/Spike/2b_SV.sh index 6edcbe9..b7527bd 100644 --- a/scripts/Spike/2b_SV.sh +++ b/scripts/Spike/2b_SV.sh @@ -8,13 +8,17 @@ READ_LENGTH=$1 VAF=$2 -MERGED_VCF=$3 -MOD_BAM=$4 -OUTPUT_VCF=$5 -REFERENCE=$6 -OUTPUT_PFX=$7 +VCF_A=$3 +VCF_B=$4 +MOD_BAM=$5 +OUTPUT_VCF=$6 +REFERENCE=$7 +OUTPUT_PFX=$8 + +echo "VCF_A: $VCF_A" +echo "VCF_B: $VCF_B" +echo "MOD_BAM: $MOD_BAM" -# Descide which READ_LENGTH was selected if [ "$READ_LENGTH" = "short" ]; then # https://github.com/Illumina/paragraph @@ -24,7 +28,12 @@ if [ "$READ_LENGTH" = "short" ]; then elif [ "$READ_LENGTH" = "long" ]; then echo "Input is 'long' starting Sniffles2" - sniffles --input $MOD_BAM --genotype-vcf $MERGED_VCF --sample-id mosaicSim --vcf $OUTPUT_VCF + sniffles --input $MOD_BAM --genotype-vcf $VCF_A --sample-id mosaicSim --vcf "${OUTPUT_VCF}.vcf1.vcf" + sniffles --input $MOD_BAM --genotype-vcf $VCF_B --sample-id mosaicSim --vcf "${OUTPUT_VCF}.vcf2.vcf" + + # Merge the two VCF files with bcftools + bcftools merge --force-samples -O z --write-index -o $OUTPUT_VCF $VCF_A $VCF_B + else echo "Error: Invalid input" fi