# HG changeset patch # User davidvanzessen # Date 1477904726 14400 # Node ID 477e95b098fda88ee772b52c294a283705843c7f # Parent 275ab5175fd6f13ef3a164fe6314437b927ebb63 Uploaded diff -r 275ab5175fd6 -r 477e95b098fd shm_csr.r --- 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 diff -r 275ab5175fd6 -r 477e95b098fd wrapper.sh --- 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 ----------------
" >> $log