diff --git a/examples/example_run.sh b/examples/example_run.sh index b8b507a..dbdf448 100644 --- a/examples/example_run.sh +++ b/examples/example_run.sh @@ -5,7 +5,7 @@ ## Example #1. Overlay, intron shrinkage, gene annotation, PDF output, custom size and colors ../ggsashimi.py -b input_bams.tsv -c chr10:27040584-27048100 -g annotation.gtf -M 10 -C 3 -O 3 --shrink --alpha 0.25 --base-size=20 --ann-height=4 --height=3 --width=18 -P palette.txt -## Example #2. Median coverage and number of reads supporting inclusion and exclusion, no gene annotation, TIFF output (350 PPI), custom size, default colors, fixed y-scale -../ggsashimi.py -b input_bams.tsv -c chr10:27040584-27048100 -M 10 -C 3 -O 3 -A median --alpha 1 -F tiff -R 350 --base-size=16 --height=3 --width=18 --fix-y-scale +## Example #2. Mean coverage and number of reads supporting inclusion and exclusion, no gene annotation, TIFF output (350 PPI), custom size, default colors, fixed y-scale +../ggsashimi.py -b input_bams.tsv -c chr10:27040584-27048100 -M 10 -C 3 -O 3 -A mean --alpha 1 -F tiff -R 350 --base-size=16 --height=3 --width=18 --fix-y-scale diff --git a/ggsashimi.py b/ggsashimi.py index 41596ad..a850521 100755 --- a/ggsashimi.py +++ b/ggsashimi.py @@ -794,7 +794,7 @@ def get_debug_info(): row_i = c() if (nrow(junctions) >0 ) { junctions$jlabel = as.character(junctions$count) - junctions = setNames(junctions[,.(max(y), max(yend),round(mean(count)),paste(jlabel,collapse=",")), keyby=.(x,xend)], names(junctions)) + junctions = setNames(junctions[,.(max(y), max(yend),round(%(args.aggr)s(count)),paste(jlabel,collapse=",")), keyby=.(x,xend)], names(junctions)) if ("%(args.aggr)s" != "") { junctions = setNames(junctions[,.(max(y), max(yend),round(%(args.aggr)s(count)),round(%(args.aggr)s(count))), keyby=.(x,xend)], names(junctions)) } @@ -902,7 +902,7 @@ def get_debug_info(): if (nrow(junctions) >0 ) { junctions$jlabel = as.character(junctions$count) - junctions = setNames(junctions[,.(max(y), max(yend),round(mean(count)),paste(jlabel,collapse=",")), keyby=.(x,xend)], names(junctions)) + junctions = setNames(junctions[,.(max(y), max(yend),round(%(args.aggr)s(count)),paste(jlabel,collapse=",")), keyby=.(x,xend)], names(junctions)) if ("%(args.aggr)s" != "") { junctions = setNames(junctions[,.(max(y), max(yend),round(%(args.aggr)s(count)),round(%(args.aggr)s(count))), keyby=.(x,xend)], names(junctions)) }