2 echo 'buildMatrix.sh: version 1.1'
9 truncateRPKM="-truncate "$3
13 truncateRPKM="-rescale -truncate "$3
17 echo 'usage: buildMatrix.sh name datalist.file [truncateRPKM] [-rescale]'
19 echo 'where the datalist file is a comma-delimited list of prefix and rds-files'
22 python $ERANGEPATH/recordLog.py buildMatrix.log buildMatrix.sh "with parameters: $1 $2 $truncateRPKM"
25 prefix=`echo $line | cut -f 1 -d ','`
26 filename=$prefix.partcount
27 if [ -e $filename ]; then
28 if [ $indexCur -lt 1 ]; then
29 echo "building $1.step0"
30 echo -e '\t' > $1.step0
31 cut -f 1 $filename >> $1.step0
34 python $ERANGEPATH/buildMatrix.py $1.step$indexPrev $filename $1.step$indexCur $truncateRPKM
36 let indexPrev=indexPrev+1
37 let indexCur=indexCur+1
39 echo "could not find $filename - skipping"
40 python $ERANGEPATH/recordLog.py buildMatrix.log buildMatrix.sh "could not find $rds - skipping"
43 mv $1.step$indexPrev $1.matrix.tab