diff --git a/submit_bcbio_trio_wes.sh b/submit_bcbio_trio_wes.sh index 984e80df6cbbc74496d43e04ee93ee0622569934..9fd1274f5dc57881732c7c6b9068ccb4df271b77 100755 --- a/submit_bcbio_trio_wes.sh +++ b/submit_bcbio_trio_wes.sh @@ -41,8 +41,11 @@ then #Â fix VCF output file names cd $OUTPUT_DIR/${DATE}_${PROJECT_ID}_${FAMILY_ID} - mv ${PROJECT_ID}${FAMILY_ID}-gatk-haplotype-annotated.vcf.gz ${PROJECT_ID}_${FAMILY_ID}-gatk-haplotype-annotated.vcf.gz - mv ${PROJECT_ID}${FAMILY_ID}-gatk-haplotype-annotated.vcf.gz.tbi ${PROJECT_ID}_${FAMILY_ID}-gatk-haplotype-annotated.vcf.gz.tbi + if [ -e ${PROJECT_ID}${FAMILY_ID}-gatk-haplotype-annotated.vcf.gz ] + then + mv ${PROJECT_ID}${FAMILY_ID}-gatk-haplotype-annotated.vcf.gz ${PROJECT_ID}_${FAMILY_ID}-gatk-haplotype-annotated.vcf.gz + mv ${PROJECT_ID}${FAMILY_ID}-gatk-haplotype-annotated.vcf.gz.tbi ${PROJECT_ID}_${FAMILY_ID}-gatk-haplotype-annotated.vcf.gz.tbi + fi else echo $OUTPUT_DIR/${DATE}_${PROJECT_ID}_${FAMILY_ID} does not exist.