added function to calculate cross sample assembly shell script