# HG changeset patch # User saharlcc # Date 1495809935 14400 # Node ID ab5e4602bd28a9e475b1940b22a9cf2028017ad2 # Parent 532b1e5feb8f92d50e181a2278d4c40914289c6f Added error checking for unequal number of replicates for the 2 conditions compared by IsoDE2 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`