Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 38 lines (29 sloc) 637 Bytes
#!/bin/bash
SOFTWARE=$1
LAYOUT=$2
set -e
# remove "empty" inputs
for F in `ls *.fpkm`; do
SIZE=`du -sb $F | cut -f 1`
if [ $SIZE -lt 50 ]; then
echo "Removing $F due to it being empty"
rm $F
fi
done
echo
echo
ls -l
echo
echo
# no input files left
COUNT=`ls *.fpkm 2>/dev/null | wc -l`
if [ $COUNT = 0 ]; then
echo "No fpmk files left - creating an empty .tab"
touch merged_GEM.tab
exit 0
fi
# move all the input files into a subdir
mkdir inputs
mv *.fpkm inputs/
perl GEM_merge.pl inputs/ > merged_GEM.tab
python Log_merge.py $SOFTWARE $LAYOUT >> QC_Report.tab