run_FMBY2_cnv_call_L2.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. set -e
  2. function usage() {
  3. echo "Usage: $0 [ -s <sample> ] [ -o <out_dir> ] [ -x <script_dir> ]
  4. [ -c <WES_CNV_outdir> ] [ -p <pseudo_panel> ]"
  5. echo "-s Sample Name"
  6. echo "-o Output dir"
  7. echo "-p Pseudo Panel[MBY2|FeBY2]"
  8. echo "-x script_dir"
  9. echo "-c WES CNV outdir"
  10. }
  11. if [ $# -eq 0 ]
  12. then
  13. usage
  14. exit
  15. fi
  16. while getopts ":s:o:p:x:c:h" opt; do
  17. case $opt in
  18. s)
  19. sample=$OPTARG
  20. ;;
  21. o)
  22. out_dir=$OPTARG
  23. ;;
  24. c)
  25. cnv_dir=$OPTARG
  26. ;;
  27. p)
  28. panel=$OPTARG
  29. ;;
  30. x)
  31. script_dir=$OPTARG
  32. ;;
  33. h)
  34. usage
  35. exit
  36. ;;
  37. \?)
  38. echo "Invalid option: -$OPTARG"
  39. usage
  40. exit
  41. ;;
  42. esac
  43. done
  44. if [ -d $cnv_dir ]
  45. then
  46. echo $cnv_dir.
  47. else
  48. echo $cnv_dir " NOT exist!"
  49. exit
  50. fi
  51. cd $cnv_dir
  52. echo "out_dir:" $out_dir
  53. . $script_dir/conf/conf.cfg
  54. ## CNV call
  55. sh $module/run_CNV_call.sh -s $sample -o $out_dir -x $script_dir -c $cnv_dir
  56. ## Merge,Filter,Annotation,Plot
  57. sh $module/run_CNV_trim.sh -s $sample -o $out_dir -x $script_dir -c $cnv_dir
  58. ## CNV plot
  59. #sh $module/run_CNV_plot.sh -s $sample -o $out_dir -x $script_dir -c $cnv_dir
  60. ## AZF
  61. if [ "$panel" = "MBY2" ]
  62. then
  63. . $module/run_MBY2AZF_hg19_200113.sh $sample
  64. fi