Skip to content

Commit

Permalink
Updating naming convention
Browse files Browse the repository at this point in the history
Changed naming von VCF_1 to VCF_A and VCF_2 to VCF_B
  • Loading branch information
philippesanio authored Mar 14, 2024
1 parent 1d683f0 commit 41b1763
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/Spike/2b_re-genotyping_main.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Input variables are: VARIANT, VAF, VCF_1, VCF_2, MOD_BAM, OUTPUT_DIR, READ_LENGTH
# Input variables are: VARIANT, VAF, VCF_A, VCF_B, MOD_BAM, OUTPUT_DIR, READ_LENGTH
# VARIANT can be either SNV or SV
# READ_LENGTH can be either SHORT or LONG for SVs

Expand All @@ -14,8 +14,8 @@

VARIANT=$1
VAF=$2
VCF_1=$3
VCF_2=$4
VCF_A=$3
VCF_B=$4
MOD_BAM=$5
OUTPUT_DIR=$6
READ_LENGTH=$7
Expand All @@ -24,15 +24,17 @@ OUTPUT_VCF="${OUTPUT_DIR}/output_genotypes.vcf"
OUTPUT_VCF_FILTERED="${OUTPUT_DIR}/output_genotypes_filtered.vcf"
REFERENCE=${8}

mkdir -p $OUTPUT_DIR

# Merge the two VCF files with bcf tools
bcftools merge --force-samples -O z --write-index -o $MERGED_VCF $VCF_1 $VCF_2
bcftools merge --force-samples -O z --write-index -o $MERGED_VCF $VCF_A $VCF_B

if [ "$VARIANT" = "SNV" ]; then
echo "Input is 'SNV'"
./2b_SNV.sh $READ_LENGTH $VAF $MERGED_VCF $MOD_BAM $OUTPUT_VCF $REFERENCE
elif [ "$VARIANT" = "SV" ]; then
echo "Input is 'SV'"
./2b_SV.sh $READ_LENGTH $VAF $MERGED_VCF $MOD_BAM $OUTPUT_VCF $REFERENCE "Spike_out"
./2b_SV2.sh $READ_LENGTH $VAF $VCF_A $VCF_B $OUTPUT_VCF "${OUTPUT_DIR}/output_genotypes" $REFERENCE "Spike_out"
else
echo "Error: Invalid input"
fi
Expand Down

0 comments on commit 41b1763

Please sign in to comment.