Skip to content

Commit

Permalink
Change Sniffles regenotyping pipeline
Browse files Browse the repository at this point in the history
Individually regenotyping of the imported VCF files with Sniffles. The two resulting VCFs are then merged together.
  • Loading branch information
philippesanio authored Mar 14, 2024
1 parent 41b1763 commit 9e2a019
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions scripts/Spike/2b_SV.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9e2a019

Please sign in to comment.