updated run_pipeline.sh and added R script