
outdir=$1
readsID=$2
sortedBam=$3

curPath=$(dirname $(readlink -f "$0"))
subPath=$(dirname $(readlink -f $curPath))

target_gene_gtf=${subPath}/DB/target_gene_gtf.txt
blacklist_file=${subPath}/DB/FusionBlackList.txt
fusion_parterner=${subPath}/DB/fusion_gene_parterner_exonID.txt
homo_file=${subPath}/DB/primer_home_stat.txt
info_file=${subPath}/DB/primer_info_final.txt

python $subPath/py_script/breakpoint_search_v6.3.py -i $sortedBam -o $outdir;
python $subPath/py_script/breakpoint_stat_v6.3.py -i $outdir -r $readsID;
python $subPath/py_script/breakpoint_stat_single_v6.3.py -i $outdir -r $readsID -m $homo_file -f $info_file;
python $subPath/py_script/breakpoint_anno_v6.3.py -i $outdir/fusion_stat_final.txt -t $target_gene_gtf -o $outdir/fusion_stat_final_anno.txt;
python $subPath/py_script/breakpoint_anno_single_v6.3.py -i $outdir/single_stat.txt -t $target_gene_gtf -o $outdir/single_stat_anno.txt;
python $subPath/py_script/breakpoint_filter_v6.3.py -i $outdir -b $blacklist_file -t $fusion_parterner
