Skip to content

Corrected CNVnator verbose output for final vcf move. #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
21 changes: 18 additions & 3 deletions bin/speedseq
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,7 @@ sv options:
-x FILE BED file to exclude
-g genotype SV breakends with svtyper
-d calculate read-depth with CNVnator
-w INT CNVnator window size [100]
-A annotate the vcf with VEP
-P output LUMPY probability curves in VCF
-m INT minimum sample weight for a call [4]
Expand Down Expand Up @@ -1189,7 +1190,7 @@ global options:
MAX_SPLIT_COUNT=2
MIN_NON_OVERLAP=20

while getopts ":hB:S:D:R:o:m:r:x:T:t:AdgPkvK:" OPTION
while getopts ":hB:S:D:R:o:m:r:x:T:t:Adw:gPkvK:" OPTION
do
case "${OPTION}" in
h)
Expand Down Expand Up @@ -1235,6 +1236,9 @@ global options:
d)
READDEPTH=1
;;
w)
WINDOW_SIZE="$OPTARG"
;;
g)
GENOTYPE=1
;;
Expand Down Expand Up @@ -1342,8 +1346,20 @@ global options:
sv_usage
echo -e "Error: annotate_rd.py executable not found. Please set path in $SPEEDSEQ_DIR/speedseq.config file\n"
exit 1
elif [[ -z "$WINDOW_SIZE"]]
then
WINDOW_SIZE=100
echo -e "Using default window size: 100\n"
fi
fi

# if window size specified, check CNVnator is also specified
if [[ -n "$WINDOW_SIZE" ]] && [[ "$READDEPTH" -ne 1 ]]
then
sv_usage
echo -e "CNVnator window size passed without CNVnator; please use -d in conjunction with -w"
exit 1
fi

# check for required python modules (pysam, numpy, scipy, etc)
check_python_modules $PYTHON
Expand Down Expand Up @@ -1439,7 +1455,6 @@ global options:
if [[ "$READDEPTH" -eq 1 ]]
then
echo "Calculating read depth"
WINDOW_SIZE=100

for i in $( seq 0 $(( ${#FULL_BAM_LIST[@]}-1 )) )
do
Expand Down Expand Up @@ -1468,7 +1483,7 @@ global options:

if [[ "$VERBOSE" -eq 1 ]]
then
echo "mv $TEMP_DIR/$OUTBASE.rd.sv.vcf $TEMP_DIR/$OUTBASE.rd.sv.vcf"
echo "mv $TEMP_DIR/$OUTBASE.rd.sv.vcf $TEMP_DIR/$OUTBASE.sv.vcf"
echo "mv $TEMP_DIR/$FULL_BASE.readdepth.txt $OUTPUT.$FULL_BASE.sv.readdepth.txt"
echo "mv $TEMP_DIR/$FULL_BASE.readdepth.bed $OUTPUT.$FULL_BASE.sv.readdepth.bed"
fi
Expand Down