Mercurial > repos > iuc > aldex2
comparison aldex2.R @ 1:75214276e2b7 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/aldex2 commit f9acc7c5710d6eb99a883cb83b7967e6af972f1b
author | iuc |
---|---|
date | Fri, 14 Jun 2024 21:21:29 +0000 |
parents | f4d0bd4b4d6d |
children |
comparison
equal
deleted
inserted
replaced
0:f4d0bd4b4d6d | 1:75214276e2b7 |
---|---|
67 effect <- get_boolean_value(opt$effect) | 67 effect <- get_boolean_value(opt$effect) |
68 include_sample_summary <- get_boolean_value(opt$include_sample_summary) | 68 include_sample_summary <- get_boolean_value(opt$include_sample_summary) |
69 iterate <- get_boolean_value(opt$iterate) | 69 iterate <- get_boolean_value(opt$iterate) |
70 | 70 |
71 if (opt$analysis_type == "aldex") { | 71 if (opt$analysis_type == "aldex") { |
72 aldex_obj <- aldex(reads = reads_df, | 72 aldex_obj <- aldex( |
73 conditions_vector, | 73 reads = reads_df, |
74 mc.samples = opt$num_mc_samples, | 74 conditions_vector, |
75 test = opt$aldex_test, | 75 mc.samples = opt$num_mc_samples, |
76 effect = effect, | 76 test = opt$aldex_test, |
77 include.sample.summary = include_sample_summary, | 77 effect = effect, |
78 denom = opt$denom, | 78 include.sample.summary = include_sample_summary, |
79 iterate = iterate) | 79 denom = opt$denom, |
80 iterate = iterate | |
81 ) | |
80 } else { | 82 } else { |
81 # Generate Monte Carlo samples of the Dirichlet distribution for each sample. Convert each | 83 # Generate Monte Carlo samples of the Dirichlet distribution for each sample. Convert each |
82 # instance using a log-ratio transform. This is the input for all further analyses. | 84 # instance using a log-ratio transform. This is the input for all further analyses. |
83 aldex_clr_obj <- aldex.clr(reads_df, conditions_vector, mc.samples = opt$num_mc_samples, denom = opt$denom) | 85 aldex_clr_obj <- aldex.clr(reads_df, conditions_vector, mc.samples = opt$num_mc_samples, denom = opt$denom) |
84 | 86 |
115 qgraph(dist, layout = "spring", vsize = 1) | 117 qgraph(dist, layout = "spring", vsize = 1) |
116 dev.off() | 118 dev.off() |
117 } else if (opt$analysis_type == "aldex_kw") { | 119 } else if (opt$analysis_type == "aldex_kw") { |
118 aldex_obj <- aldex.kw(aldex_clr_obj) | 120 aldex_obj <- aldex.kw(aldex_clr_obj) |
119 } else if (opt$analysis_type == "aldex_plot") { | 121 } else if (opt$analysis_type == "aldex_plot") { |
120 aldex_obj <- aldex(reads = reads_df, | 122 aldex_obj <- aldex( |
121 conditions_vector, | 123 reads = reads_df, |
122 mc.samples = opt$num_mc_samples, | 124 conditions_vector, |
123 test = opt$aldex_test, | 125 mc.samples = opt$num_mc_samples, |
124 effect = effect, | 126 test = opt$aldex_test, |
125 include.sample.summary = include_sample_summary, | 127 effect = effect, |
126 denom = opt$denom, | 128 include.sample.summary = include_sample_summary, |
127 iterate = iterate) | 129 denom = opt$denom, |
130 iterate = iterate | |
131 ) | |
128 png(filename = opt$output) | 132 png(filename = opt$output) |
129 aldex.plot(x = aldex_obj, | 133 aldex.plot( |
130 type = opt$plot_type, | 134 x = aldex_obj, |
131 test = opt$plot_test, | 135 type = opt$plot_type, |
132 cutoff.pval = opt$cutoff_pval, | 136 test = opt$plot_test, |
133 cutoff.effect = opt$cutoff_effect, | 137 cutoff.pval = opt$cutoff_pval, |
134 xlab = opt$xlab, | 138 cutoff.effect = opt$cutoff_effect, |
135 ylab = opt$ylab) | 139 xlab = opt$xlab, |
140 ylab = opt$ylab | |
141 ) | |
136 dev.off() | 142 dev.off() |
137 } else if (opt$analysis_type == "aldex_plot_feature") { | 143 } else if (opt$analysis_type == "aldex_plot_feature") { |
138 png(filename = opt$output) | 144 png(filename = opt$output) |
139 aldex.plotFeature(aldex_clr_obj, opt$feature_name) | 145 aldex.plotFeature(aldex_clr_obj, opt$feature_name) |
140 dev.off() | 146 dev.off() |