changeset 4:477e95b098fd draft

Uploaded
author davidvanzessen
date Mon, 31 Oct 2016 05:05:26 -0400
parents 275ab5175fd6
children 012a738edf5a
files shm_csr.r wrapper.sh
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/shm_csr.r	Thu Oct 27 09:40:45 2016 -0400
+++ b/shm_csr.r	Mon Oct 31 05:05:26 2016 -0400
@@ -280,8 +280,10 @@
 		transition2 = merge(transition2, base.order, by.x="variable", by.y="base")
 
 		transition2[is.na(transition2$value),]$value = 0
+		
+		print(transition2)
 
-		if(any(transition2$value == 0)){ #having rows of data but a transition table filled with 0 is bad
+		if(any(transition2$value != 0)){ #having rows of data but a transition table filled with 0 is bad
 			print("Plotting stacked transition")
 			png(filename=paste("transitions_stacked_", name, ".png", sep=""))
 			p = ggplot(transition2, aes(factor(reorder(id, order.x)), y=value, fill=factor(reorder(variable, order.y)))) + geom_bar(position="fill", stat="identity", colour="black") #stacked bar
--- a/wrapper.sh	Thu Oct 27 09:40:45 2016 -0400
+++ b/wrapper.sh	Mon Oct 31 05:05:26 2016 -0400
@@ -160,7 +160,6 @@
 echo "R mutation analysis"
 Rscript $dir/shm_csr.r $outdir/merged.txt $classes $outdir ${empty_region_filter} 2>&1
 
-
 echo "---------------- shm_csr.py ----------------"
 echo "---------------- shm_csr.py ----------------<br />" >> $log