cal_div=cal_div.py
data=combined
seq=cds
metainfo=cpc.hprc-afr.meta.txt

## all
outdir=${data}
log=log
mkdir -p ${outdir} ${log}

while read -r g
do
  divout=${outdir}/${g}.${seq}.div.txt
  maln=multiple.alignment/${outdir}/${g}.${seq}.clu.gz
  FILESIZE=$(stat -c%s "$maln")
  if [[ ${FILESIZE} -gt 30 ]]
  then
    sbatch --cpus-per-task=1 --mem 10G -J ${g} -o o.${g}.%j --wrap="
    ${python_sript} ${cal_div} ${maln} ${metainfo} > ${divout}
    mv o.${g}.* ${log}/
    "
  fi
done < 0.input/translist.txt
