Repository 'isoem2_isode2'
hg clone https://toolshed.g2.bx.psu.edu/repos/saharlcc/isoem2_isode2

Changeset 20:ab5e4602bd28 (2017-05-26)
Previous changeset 19:532b1e5feb8f (2017-05-26) Next changeset 21:b07d4238ba9b (2017-06-04)
Commit message:
Added error checking for unequal number of replicates for the 2 conditions compared by IsoDE2
modified:
isoem2_isode2/isoDE2.sh
b
diff -r 532b1e5feb8f -r ab5e4602bd28 isoem2_isode2/isoDE2.sh
--- a/isoem2_isode2/isoDE2.sh Fri May 26 09:05:40 2017 -0400
+++ b/isoem2_isode2/isoDE2.sh Fri May 26 10:45:35 2017 -0400
[
@@ -13,6 +13,8 @@
 
 arg=($*)
 i=0
+rep1=1
+rep2=1
 while [ $i -lt $# ]
 do
         a=${arg[i]}
@@ -24,7 +26,6 @@
 
  ((i++))
   a=${arg[i]}
- rep=1
  while [[  `expr index "$a" "/"` -ne 0  && $i -lt $# ]]
  do
  condition1File=$a
@@ -34,7 +35,7 @@
  fpkmIsoformCommand="$fpkmIsoformCommand c1_rep${rep}_fpkm_I"
  tpmGeneCommand="$tpmGeneCommand c1_rep${rep}_tpm_G"
  tpmIsoformCommand="$tpmIsoformCommand c1_rep${rep}_tpm_I"
- ((rep++))
+ ((rep1++))
 
  ((i++))
   a=${arg[i]}
@@ -47,7 +48,6 @@
 
  ((i++))
   a=${arg[i]}
- rep=1
  while [[  `expr index "$a" "/"` -ne 0 &&  $i -lt $# ]]
                 do
  condition1File=$a
@@ -58,7 +58,7 @@
  fpkmIsoformCommand="$fpkmIsoformCommand c2_rep${rep}_fpkm_I"
  tpmGeneCommand="$tpmGeneCommand c2_rep${rep}_tpm_G"
  tpmIsoformCommand="$tpmIsoformCommand c2_rep${rep}_tpm_I"
- ((rep++))
+ ((rep2++))
 
                      ((i++))
                      a=${arg[i]}
@@ -95,7 +95,17 @@
  fi
 
 done
-((rep--))
+
+echo $rep1 $rep2 $isoTPMout_file $pval
+echo rep1 rep2 isoTPMout_file pval
+if [ $rep1 -ne $rep2 ] || [ $rep1 -eq 1 ] || [ "$isoTPMout_file" == "" ] || [ "$pval" == "" ] 
+then
+ echo "Make sure that the number of replicates for both conditions is the same and that all conditions are processed using the same IsoEM2 version"
+ exit;
+fi
+
+((rep1--))
+rep=$rep1
 bootstrap=$(($rep*$numberOfBootstrapIterationsPerSample))
 echo boostrap iterations $bootstrap
 #support=`java -cp ${supportCalcPath} support 200 200 $pval`