basedir="/home/venus/mar/share_pesquisa/ana_regina/" 
for i in ${basedir}*.bam
do
    bn=$(basename $i)
    splitext=$(echo $bn | cut -d "." -f1)
    if [ -d "${splitext}/delly" ]
    then
		echo "directory exist"
    else	
		mkdir "${splitext}/delly"
    fi
    out=${splitext}/delly/delly.sv.vcf ;
#    if [ -f $out ]
#    then
#                echo "sv results file exist, skipping $i"
#    else
                echo "ruinning delly sv"
		date
		~/soft/delly/delly/src/delly call -g ~/common/hg38/Homo_sapiens_assembly38.fasta -x ~/common/hg38/human.hg38.excl.tsv $(realpath $i) > $out 
#    fi 
done
