#! /bin/bash
# This script checks if f is a directory. If it is, f is entered, and MacroBam analysis is carried out in that directory.
# The loop finishes by going back to preceding directory.
# This allows for MacroBam analysis of all barcode folders with one execution.
# Pre-requisites: at least about 650 GB free space and MacroBam_v3.2.sh needs to be copied to each folder which is to be analysed.
for f in *; do
if [ -d $f ];
then
cd -- "$f";
echo "Executing script in folder `pwd`";
bash MacroBam_v3.2.sh;
cd ..;
fi;
done;