Mercurial > repos > greg > ks_distribution
comparison ks_distribution.R @ 20:79e00e063a40 draft
Uploaded
author | greg |
---|---|
date | Fri, 23 Jun 2017 15:00:42 -0400 |
parents | 828b43bcf2ac |
children | e6bbc7426cd1 |
comparison
equal
deleted
inserted
replaced
19:14f771140d45 | 20:79e00e063a40 |
---|---|
5 option_list <- list( | 5 option_list <- list( |
6 make_option(c("-c", "--components_input"), action="store", dest="components_input", help="Ks significant components input dataset"), | 6 make_option(c("-c", "--components_input"), action="store", dest="components_input", help="Ks significant components input dataset"), |
7 make_option(c("-k", "--kaks_input"), action="store", dest="kaks_input", help="KaKs analysis input dataset"), | 7 make_option(c("-k", "--kaks_input"), action="store", dest="kaks_input", help="KaKs analysis input dataset"), |
8 make_option(c("-n", "--num_comp"), action="store", dest="num_comp", type="integer", help="Number of significant components in the Ks distribution"), | 8 make_option(c("-n", "--num_comp"), action="store", dest="num_comp", type="integer", help="Number of significant components in the Ks distribution"), |
9 make_option(c("-o", "--output"), action="store", dest="output", help="Output dataset"), | 9 make_option(c("-o", "--output"), action="store", dest="output", help="Output dataset"), |
10 make_option(c("-r", "--colors"), action="store", default=NA, help="List of component colors")) | 10 make_option(c("-r", "--colors"), action="store", default=NA, help="List of component colors") |
11 ) | 11 ) |
12 | 12 |
13 parser <- OptionParser(usage="%prog [options] file", option_list=option_list) | 13 parser <- OptionParser(usage="%prog [options] file", option_list=option_list) |
14 args <- parse_args(parser, positional_arguments=TRUE) | 14 args <- parse_args(parser, positional_arguments=TRUE) |
15 opt <- args$options | 15 opt <- args$options |
80 vx <- seq(1, 100) * (max_ks / 100) | 80 vx <- seq(1, 100) * (max_ks / 100) |
81 ymax <- max(nc) | 81 ymax <- max(nc) |
82 barplot(nc, space=0.25, offset=0, width=0.04, xlim=c(0, max_ks), ylim=c(0, ymax), col="lightpink1", border="lightpink3") | 82 barplot(nc, space=0.25, offset=0, width=0.04, xlim=c(0, max_ks), ylim=c(0, ymax), col="lightpink1", border="lightpink3") |
83 # Add x-axis. | 83 # Add x-axis. |
84 axis(1) | 84 axis(1) |
85 if(is.na(colors) | 85 if is.na(colors) |
86 { | 86 { |
87 color <- c('red', 'yellow', 'green', 'black', 'blue', 'darkorange') | 87 color <- c('red', 'yellow', 'green', 'black', 'blue', 'darkorange') |
88 } | 88 } |
89 else | 89 else |
90 { | 90 { |