annotate lib/parse.args.r @ 0:3ca58369469c draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
author artbio
date Wed, 06 Dec 2017 19:01:53 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
1 # Parse command line arguments and extract them into an associate array.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
2 # Check if the required arguments are all satisfied.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
3 parseArgs <- function(args, manditories) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
4 if(length(args) %% 2 == 1 || length(args) == 0) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
5 cat('Unpaired argument and value.\n')
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
6 return(NULL)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
7 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
8 n.i <- seq(1, length(args), by=2)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
9 v.i <- seq(2, length(args), by=2)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
10 args.name <- args[n.i]
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
11 args.value <- args[v.i]
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
12
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
13 # Check if required argument values are supplied.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
14 miss_tag <- F
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
15 man.bool <- manditories %in% args.name
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
16 if(!all(man.bool)){
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
17 cat(paste('Missing argument: ', paste(manditories[!man.bool],
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
18 collapse=','), '.', sep='')
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
19 )
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
20 miss_tag <- T
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
21 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
22 if(miss_tag){
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
23 res <- NULL
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
24 }else{
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
25 res <- args.value
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
26 names(res) <- args.name
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
27 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
28 res
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
29 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
30
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
31 ConfigTbl <- function(args.tbl, fraglen) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
32 # Create configuration table from "-C" argument.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
33 # Args:
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
34 # args.tbl: named vector of program arguments.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
35 # fraglen: fragment length.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
36 # Returns: dataframe of configuration.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
37
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
38 covfile <- args.tbl['-C']
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
39
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
40 suppressWarnings(
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
41 ctg.tbl <- tryCatch(
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
42 read.table(covfile, colClasses='character', comment.char='#'),
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
43 error=function(e) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
44 if('-E' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
45 glist <- args.tbl['-E']
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
46 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
47 glist <- '-1'
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
48 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
49 if('-T' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
50 title <- args.tbl['-T']
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
51 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
52 title <- 'Noname'
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
53 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
54 data.frame(cov=covfile, glist=glist, title=title,
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
55 fraglen=as.character(fraglen),
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
56 color=NA, stringsAsFactors=F)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
57 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
58 )
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
59 )
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
60
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
61 # Read a config file.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
62 if(ncol(ctg.tbl) < 3) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
63 stop("Configuration file must contain at least 3 columns!
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
64 Insufficient information provided.\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
65 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
66 colnames(ctg.tbl)[1:3] <- c('cov', 'glist', 'title')
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
67 if(ncol(ctg.tbl) >= 4) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
68 colnames(ctg.tbl)[4] <- 'fraglen'
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
69 fraglen.sp <- strsplit(ctg.tbl$fraglen, ":")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
70 if(!all(sapply(fraglen.sp, function(x) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
71 length(x) == 1 || length(x) == 2}))) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
72 stop("Fragment length format must be X or X:Y; X and Y are
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
73 integers.\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
74 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
75 if(!all(as.integer(unlist(fraglen.sp)) > 0)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
76 stop("Fragment length must be positive integers! Check your
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
77 configuration file.\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
78 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
79 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
80 ctg.tbl <- data.frame(ctg.tbl, fraglen=as.character(fraglen),
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
81 stringsAsFactors=F)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
82 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
83 if(ncol(ctg.tbl) >= 5) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
84 colnames(ctg.tbl)[5] <- 'color'
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
85 # Validate color specifications.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
86 col.validated <- col2rgb(ctg.tbl$color)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
87 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
88 ctg.tbl <- data.frame(ctg.tbl, color=NA)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
89 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
90 ctg.tbl
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
91 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
92
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
93 CheckRegionAllowed <- function(reg2plot, anno.tbl) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
94 # Check if region to plot is an allowed value.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
95
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
96 region.allowed <- c(as.vector(unique(anno.tbl$Region)), "bed")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
97 if(!reg2plot %in% region.allowed) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
98 stop(paste(c("Unknown region specified. Must be one of:",
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
99 region.allowed, "\n"), collapse=" "))
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
100 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
101 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
102
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
103 CoverageVars <- function(args.tbl, reg2plot) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
104 # Setup variables from program arguments.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
105 # Args:
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
106 # args.tbl: named vector of program arguments.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
107 # reg2plot: string describing region to plot.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
108 # Returns: list of variables.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
109
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
110 vl <- list() # vl: configured variable list
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
111
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
112 #### Switch for debug ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
113 if('-Debug' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
114 stopifnot(as.integer(args.tbl['-Debug']) >= 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
115 vl$debug <- as.integer(args.tbl['-Debug'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
116 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
117 vl$debug <- as.integer(0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
118 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
119
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
120 #### Switch for Galaxy usage ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
121 if('-Galaxy' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
122 stopifnot(as.integer(args.tbl['-Galaxy']) >= 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
123 vl$galaxy <- as.integer(args.tbl['-Galaxy'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
124 vl$avgname <- args.tbl['-O2']
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
125 vl$heatmapname <- args.tbl['-O3']
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
126 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
127 vl$galaxy <- as.integer(0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
128 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
129
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
130 ######## Coverage-generation parameters ########
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
131 #### Flanking region size. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
132 if('-L' %in% names(args.tbl)){
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
133 vl$flanksize <- as.integer(args.tbl['-L'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
134 stopifnot(vl$flanksize >= 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
135 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
136 flank.tbl <- setNames(
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
137 c(2000, 2000, 2000, 500, 500, 1500, 1000, 1000),
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
138 c('tss','tes','genebody','exon','cgi', 'enhancer', 'dhs','bed'))
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
139 vl$flanksize <- as.integer(flank.tbl[reg2plot])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
140 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
141
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
142 #### Flanking size factor. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
143 if('-N' %in% names(args.tbl) && !('-L' %in% names(args.tbl))) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
144 stopifnot(as.numeric(args.tbl['-N']) >= 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
145 vl$flankfactor <- as.numeric(args.tbl['-N'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
146 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
147 vl$flankfactor <- 0.0
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
148 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
149
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
150 #### Robust statistics. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
151 if('-RB' %in% names(args.tbl)){
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
152 stopifnot(as.numeric(args.tbl['-RB']) >= 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
153 vl$robust <- as.numeric(args.tbl['-RB'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
154 }else{
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
155 vl$robust <- .0 # percentage to be trimmed on both ends.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
156 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
157
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
158 #### Random sampling rate. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
159 if('-S' %in% names(args.tbl)){
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
160 vl$samprate <- as.numeric(args.tbl['-S'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
161 stopifnot(vl$samprate > 0 && vl$samprate <= 1)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
162 }else{
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
163 vl$samprate <- 1.0
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
164 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
165
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
166 ##### Set cores number. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
167 if('-P' %in% names(args.tbl)){
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
168 stopifnot(as.integer(args.tbl['-P']) >= 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
169 vl$cores.number <- as.integer(args.tbl['-P'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
170 }else{
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
171 vl$cores.number <- as.integer(0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
172 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
173
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
174 #### Algorithm for coverage vector normalization ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
175 if('-AL' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
176 vl$cov.algo <- args.tbl['-AL']
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
177 al.allowed <- c('spline', 'bin')
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
178 stopifnot(vl$cov.algo %in% al.allowed)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
179 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
180 vl$cov.algo <- 'spline'
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
181 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
182
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
183 #### Gene chunk size ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
184 if('-CS' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
185 vl$gcs <- as.integer(args.tbl['-CS'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
186 stopifnot(vl$gcs > 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
187 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
188 vl$gcs <- 100
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
189 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
190
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
191 #### Mapping quality cutoff ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
192 if('-MQ' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
193 vl$map.qual <- as.integer(args.tbl['-MQ'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
194 stopifnot(vl$map.qual >= 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
195 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
196 vl$map.qual <- 20
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
197 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
198
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
199 #### Fragment length ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
200 if('-FL' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
201 vl$fraglen <- as.integer(args.tbl['-FL'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
202 stopifnot(vl$fraglen > 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
203 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
204 vl$fraglen <- 150
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
205 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
206 vl$bufsize <- vl$fraglen # buffer added to both ends of the coverage vec.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
207
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
208 #### Strand-specific coverage ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
209 if('-SS' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
210 spec.allowed <- c('both', 'same', 'opposite')
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
211 stopifnot(args.tbl['-SS'] %in% spec.allowed)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
212 vl$strand.spec <- args.tbl['-SS']
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
213 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
214 vl$strand.spec <- 'both'
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
215 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
216
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
217 #### Shall interval size be larger than flanking size? ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
218 if('-IN' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
219 stopifnot(as.integer(args.tbl['-IN']) >= 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
220 vl$inttag <- as.integer(args.tbl['-IN'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
221 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
222 vl$inttag <- NA
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
223 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
224
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
225 #### Image output forbidden tag. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
226 if('-FI' %in% names(args.tbl)){
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
227 stopifnot(as.integer(args.tbl['-FI']) >= 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
228 vl$fi_tag <- as.integer(args.tbl['-FI'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
229 }else{
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
230 vl$fi_tag <- as.integer(0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
231 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
232
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
233 vl
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
234 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
235
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
236 PlotVars <- function(args.tbl, existing.vl=vector('character'),
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
237 prof.misc=list(), low.count=NULL, go.paras=list()) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
238 # Setup replot variables.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
239 # Args:
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
240 # args.tbl: argument table.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
241 # existing.vl: existing variable name character list.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
242 # prof.misc: misc. avg prof variable list.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
243 # go.paras: gene ordering parameters.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
244 # Returns: list of updated variables.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
245
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
246 ## Plotting-related parameters:
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
247 updated.vl <- list()
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
248 ### Misc. parameters:
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
249 #### Font size. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
250 if('-FS' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
251 stopifnot(as.integer(args.tbl['-FS']) > 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
252 updated.vl$font.size <- as.integer(args.tbl['-FS'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
253 } else if(!'font.size' %in% existing.vl) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
254 updated.vl$font.size <- 12
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
255 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
256
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
257 ### Avg. profiles parameters:
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
258 #### Plot width. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
259 if('-WD' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
260 stopifnot(as.integer(args.tbl['-WD']) > 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
261 updated.vl$plot.width <- as.integer(args.tbl['-WD'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
262 } else if(!'plot.width' %in% existing.vl) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
263 updated.vl$plot.width <- 8
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
264 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
265
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
266 #### Plot height. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
267 if('-HG' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
268 stopifnot(as.integer(args.tbl['-HG']) > 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
269 updated.vl$plot.height <- as.integer(args.tbl['-HG'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
270 } else if(!'plot.height' %in% existing.vl) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
271 updated.vl$plot.height <- 7
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
272 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
273
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
274 #### Shall standard errors be plotted around average profiles? ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
275 if('-SE' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
276 stopifnot(as.integer(args.tbl['-SE']) >= 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
277 updated.vl$se <- as.integer(args.tbl['-SE'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
278 } else if(!'se' %in% existing.vl) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
279 updated.vl$se <- 1
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
280 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
281
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
282 #### Smooth function radius. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
283 if('-MW' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
284 stopifnot(as.integer(args.tbl['-MW']) >= 1)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
285 updated.vl$mw <- as.integer(args.tbl['-MW'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
286 } else if(!'mw' %in% existing.vl) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
287 updated.vl$mw <- 1
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
288 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
289
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
290 #### Shaded area alpha. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
291 if('-H' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
292 stopifnot(as.numeric(args.tbl['-H']) >= 0 &&
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
293 as.numeric(args.tbl['-H']) < 1)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
294 updated.vl$shade.alp <- as.numeric(args.tbl['-H'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
295 } else if(!'shade.alp' %in% existing.vl) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
296 updated.vl$shade.alp <- 0
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
297 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
298
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
299 #### Misc. options for avg. profiles. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
300 updated.vl$prof.misc <- prof.misc
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
301 if('-YAS' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
302 ystr <- args.tbl['-YAS']
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
303 if(ystr != 'auto') {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
304 yp <- unlist(strsplit(ystr, ','))
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
305 if(length(yp) == 2) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
306 y.min <- as.numeric(yp[1])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
307 y.max <- as.numeric(yp[2])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
308 stopifnot(y.min < y.max)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
309 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
310 stop("-YAS must be 'auto' or a pair of numerics separated
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
311 by ','\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
312 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
313 updated.vl$prof.misc$yscale <- c(y.min, y.max)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
314 } else {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
315 updated.vl$prof.misc$yscale <- 'auto'
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
316 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
317 } else if(!'yscale' %in% names(prof.misc)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
318 updated.vl$prof.misc$yscale <- 'auto'
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
319 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
320 if('-LEG' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
321 stopifnot(as.integer(args.tbl['-LEG']) >= 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
322 updated.vl$prof.misc$legend <- as.integer(args.tbl['-LEG'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
323 } else if(!'legend' %in% names(prof.misc)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
324 updated.vl$prof.misc$legend <- T
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
325 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
326 if('-BOX' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
327 stopifnot(as.integer(args.tbl['-BOX']) >= 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
328 updated.vl$prof.misc$box <- as.integer(args.tbl['-BOX'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
329 } else if(!'box' %in% names(prof.misc)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
330 updated.vl$prof.misc$box <- T
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
331 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
332 if('-VLN' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
333 stopifnot(as.integer(args.tbl['-VLN']) >= 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
334 updated.vl$prof.misc$vline <- as.integer(args.tbl['-VLN'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
335 } else if(!'vline' %in% names(prof.misc)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
336 updated.vl$prof.misc$vline <- T
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
337 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
338 if('-XYL' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
339 stopifnot(as.integer(args.tbl['-XYL']) >= 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
340 updated.vl$prof.misc$xylab <- as.integer(args.tbl['-XYL'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
341 } else if(!'xylab' %in% names(prof.misc)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
342 updated.vl$prof.misc$xylab <- T
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
343 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
344 if('-LWD' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
345 stopifnot(as.integer(args.tbl['-LWD']) > 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
346 updated.vl$prof.misc$line.wd <- as.integer(args.tbl['-LWD'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
347 } else if(!'line.wd' %in% names(prof.misc)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
348 updated.vl$prof.misc$line.wd <- 3
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
349 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
350
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
351 ### Heatmap parameters:
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
352 #### Gene order algorithm ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
353 if('-GO' %in% names(args.tbl)){
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
354 go.allowed <- c('total', 'max', 'prod', 'diff', 'hc', 'none', 'km')
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
355 stopifnot(args.tbl['-GO'] %in% go.allowed)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
356 updated.vl$go.algo <- args.tbl['-GO']
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
357 } else if(!'go.algo' %in% existing.vl){
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
358 updated.vl$go.algo <- 'total' # hierarchical clustering.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
359 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
360
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
361 #### Reduce ratio to control a heatmap height ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
362 if('-RR' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
363 stopifnot(as.integer(args.tbl['-RR']) > 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
364 updated.vl$rr <- as.integer(args.tbl['-RR'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
365 } else if(!'rr' %in% existing.vl) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
366 updated.vl$rr <- 30
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
367 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
368
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
369 #### Color scale string. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
370 if('-SC' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
371 if(!args.tbl['-SC'] %in% c('local', 'region', 'global')) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
372 scale.pair <- unlist(strsplit(args.tbl['-SC'], ","))
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
373 if(length(scale.pair) != 2 || is.na(as.numeric(scale.pair[1])) ||
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
374 is.na(as.numeric(scale.pair[2]))) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
375 stop("Color scale format error: must be local, region, global
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
376 or a pair of numerics separated by ','\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
377 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
378 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
379 updated.vl$color.scale <- args.tbl['-SC']
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
380 } else if(!'color.scale' %in% existing.vl) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
381 updated.vl$color.scale <- 'local'
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
382 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
383
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
384 #### Flooding fraction. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
385 if('-FC' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
386 stopifnot(as.numeric(args.tbl['-FC']) >= 0 &&
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
387 as.numeric(args.tbl['-FC']) < 1)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
388 updated.vl$flood.frac <- as.numeric(args.tbl['-FC'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
389 } else if(!'flood.frac' %in% existing.vl) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
390 updated.vl$flood.frac <- .02
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
391 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
392
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
393 #### Heatmap color. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
394 if('-CO' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
395 updated.vl$hm.color <- as.character(args.tbl['-CO'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
396 } else if(!'hm.color' %in% existing.vl){
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
397 updated.vl$hm.color <- "default"
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
398 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
399
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
400 #### Color distribution. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
401 if('-CD' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
402 stopifnot(as.numeric(args.tbl['-CD']) > 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
403 updated.vl$color.distr <- as.numeric(args.tbl['-CD'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
404 } else if(!'color.distr' %in% existing.vl) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
405 updated.vl$color.distr <- .6
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
406 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
407
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
408 #### Low count cutoff for rank-based normalization ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
409 if('-LOW' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
410 stopifnot(as.integer(args.tbl['-LOW']) >= 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
411 updated.vl$low.count <- as.integer(args.tbl['-LOW'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
412 } else if(!'low.count' %in% existing.vl) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
413 updated.vl$low.count <- 10
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
414 } else { # ensure low.count is not empty.
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
415 updated.vl$low.count <- low.count
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
416 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
417 if(!is.null(low.count)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
418 updated.vl$low.count.ratio <- updated.vl$low.count / low.count
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
419 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
420
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
421 #### Misc. options for heatmap. ####
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
422 updated.vl$go.paras <- go.paras
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
423 if('-KNC' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
424 stopifnot(as.integer(args.tbl['-KNC']) > 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
425 updated.vl$go.paras$knc <- as.integer(args.tbl['-KNC'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
426 } else if(!'knc' %in% names(go.paras)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
427 updated.vl$go.paras$knc <- 5
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
428 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
429 if('-MIT' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
430 stopifnot(as.integer(args.tbl['-MIT']) > 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
431 updated.vl$go.paras$max.iter <- as.integer(args.tbl['-MIT'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
432 } else if(!'max.iter' %in% names(go.paras)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
433 updated.vl$go.paras$max.iter <- 20
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
434 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
435 if('-NRS' %in% names(args.tbl)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
436 stopifnot(as.integer(args.tbl['-NRS']) > 0)
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
437 updated.vl$go.paras$nrs <- as.integer(args.tbl['-NRS'])
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
438 } else if(!'nrs' %in% names(go.paras)) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
439 updated.vl$go.paras$nrs <- 30
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
440 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
441
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
442
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
443 updated.vl
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
444 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
445
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
446 CheckHMColorConfig <- function(hm.color, bam.pair) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
447 if(hm.color != 'default') {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
448 v.colors <- unlist(strsplit(hm.color, ":"))
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
449 if(bam.pair && length(v.colors) != 2 && length(v.colors) != 3 ||
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
450 !bam.pair && length(v.colors) != 1) {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
451 stop("Heatmap color specifications must correspond to bam-pair!\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
452 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
453 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
454 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
455
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
456 EchoPlotArgs <- function() {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
457 cat("## Plotting-related parameters:\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
458 cat("### Misc. parameters:\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
459 cat(" -FS Font size(default=12)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
460 cat("### Avg. profiles parameters:\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
461 cat(" -WD Image width(default=8)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
462 cat(" -HG Image height(default=7)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
463 cat(" -SE Shall standard errors be plotted?(0 or 1)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
464 cat(" -MW Moving window width to smooth avg. profiles, must be integer\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
465 cat(" 1=no(default); 3=slightly; 5=somewhat; 9=quite; 13=super.\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
466 cat(" -H Opacity of shaded area, suggested value:[0, 0.5]\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
467 cat(" default=0, i.e. no shading, just lines\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
468 cat(" -YAS Y-axis scale: auto(default) or min_val,max_val(custom scale)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
469 cat(" -LEG Draw legend? 1(default) or 0\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
470 cat(" -BOX Draw box around plot? 1(default) or 0\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
471 cat(" -VLN Draw vertical lines? 1(default) or 0\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
472 cat(" -XYL Draw X- and Y-axis labels? 1(default) or 0\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
473 cat(" -LWD Line width(default=3)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
474 cat("### Heatmap parameters:\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
475 cat(" -GO Gene order algorithm used in heatmaps: total(default), hc, max,\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
476 cat(" prod, diff, km and none(according to gene list supplied)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
477 cat(" -LOW Low count cutoff(default=10) in rank-based normalization\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
478 cat(" -KNC K-means or HC number of clusters(default=5)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
479 cat(" -MIT Maximum number of iterations(default=20) for K-means\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
480 cat(" -NRS Number of random starts(default=30) in K-means\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
481 cat(" -RR Reduce ratio(default=30). The parameter controls the heatmap height\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
482 cat(" The smaller the value, the taller the heatmap\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
483 cat(" -SC Color scale used to map values to colors in a heatmap\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
484 cat(" local(default): base on each individual heatmap\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
485 cat(" region: base on all heatmaps belong to the same region\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
486 cat(" global: base on all heatmaps together\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
487 cat(" min_val,max_val: custom scale using a pair of numerics\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
488 cat(" -FC Flooding fraction:[0, 1), default=0.02\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
489 cat(" -CO Color for heatmap. For bam-pair, use color-tri(neg_color:[neu_color]:pos_color)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
490 cat(" Hint: must use R colors, such as darkgreen, yellow and blue2\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
491 cat(" The neutral color is optional(default=black)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
492 cat(" -CD Color distribution for heatmap(default=0.6). Must be a positive number\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
493 cat(" Hint: lower values give more widely spaced colors at the negative end\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
494 cat(" In other words, they shift the neutral color to positive values\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
495 cat(" If set to 1, the neutral color represents 0(i.e. no bias)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
496
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
497 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
498
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
499 EchoCoverageArgs <- function() {
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
500 cat("## Coverage-generation parameters:\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
501 cat(" -F Further information provided to select database table or plottype:\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
502 cat(" This is a string of description separated by comma.\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
503 cat(" E.g. protein_coding,K562,rnaseq(order of descriptors does not matter)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
504 cat(" means coding genes in K562 cell line drawn in rnaseq mode.\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
505 cat(" -D Gene database: ensembl(default), refseq\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
506 cat(" -L Flanking region size(will override flanking factor)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
507 cat(" -N Flanking region factor\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
508 cat(" -RB The fraction of extreme values to be trimmed on both ends\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
509 cat(" default=0, 0.05 means 5% of extreme values will be trimmed\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
510 cat(" -S Randomly sample the regions for plot, must be:(0, 1]\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
511 cat(" -P #CPUs to use. Set 0(default) for auto detection\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
512 cat(" -AL Algorithm used to normalize coverage vectors: spline(default), bin\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
513 cat(" -CS Chunk size for loading genes in batch(default=100)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
514 cat(" -MQ Mapping quality cutoff to filter reads(default=20)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
515 cat(" -FL Fragment length used to calculate physical coverage(default=150)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
516 cat(" -SS Strand-specific coverage calculation: both(default), same, opposite\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
517 cat(" -IN Shall interval be larger than flanking in plot?(0 or 1, default=automatic)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
518 cat(" -FI Forbid image output if set to 1(default=0)\n")
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
519 }
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
520 ############### End arguments configuration #####################
3ca58369469c planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/ngsplot commit b'e9fcc157a7f2f2fa9d6ac9a58d425ff17c975f5c\n'
artbio
parents:
diff changeset
521 #################################################################