genomewalker
2/17/2016 - 4:49 PM

Grep abundances SGE

Grep abundances SGE

#!/bin/bash
for SGE_TASK_ID in {1..242}; do
echo $SGE_TASK_ID
tail -n+${SGE_TASK_ID} tasks_sge-abun.txt | head -n1 > tmp.${SGE_TASK_ID}

chmod +x tmp.${SGE_TASK_ID}

#./tmp.${SGE_TASK_ID}

#rm tmp.${SGE_TASK_ID}

done
for i in TARA_*; do echo "LC_ALL=C grep -F -f <(zcat \"${i}/${i}.kegg_20140317.gz\" | cut -f1 -d ',' ) \"/bioinf/projects/megx/TARA/assemblies/mapping/${i}-mapping/${i}.orf-coverage.txt\" | gzip -1c > \"${i}/${i}.kegg_20140317.abundance.tsv.gz\""; done > tasks_sge-abun.txt
sh sge.sh
~/opt/parallel/bin/parallel --bar -j 16 ./{} ::: tmp.*