miga-base 0.7.23.0 → 0.7.25.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (320) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -0
  3. data/Rakefile +1 -0
  4. data/lib/miga/cli/action/add.rb +10 -8
  5. data/lib/miga/cli/action/classify_wf.rb +12 -11
  6. data/lib/miga/cli/action/derep_wf.rb +3 -9
  7. data/lib/miga/cli/action/edit.rb +0 -1
  8. data/lib/miga/cli/action/find.rb +1 -1
  9. data/lib/miga/cli/action/generic.rb +1 -1
  10. data/lib/miga/cli/action/get.rb +7 -2
  11. data/lib/miga/cli/action/index_wf.rb +4 -2
  12. data/lib/miga/cli/action/init.rb +60 -59
  13. data/lib/miga/cli/action/init/files_helper.rb +2 -1
  14. data/lib/miga/cli/action/ncbi_get.rb +1 -1
  15. data/lib/miga/cli/action/new.rb +15 -9
  16. data/lib/miga/cli/action/option.rb +63 -0
  17. data/lib/miga/cli/action/preproc_wf.rb +7 -5
  18. data/lib/miga/cli/action/quality_wf.rb +3 -3
  19. data/lib/miga/cli/action/tax_dist.rb +1 -1
  20. data/lib/miga/cli/action/tax_test.rb +1 -1
  21. data/lib/miga/cli/action/wf.rb +72 -54
  22. data/lib/miga/cli/base.rb +17 -5
  23. data/lib/miga/cli/objects_helper.rb +23 -18
  24. data/lib/miga/common.rb +1 -1
  25. data/lib/miga/common/with_option.rb +83 -0
  26. data/lib/miga/common/with_result.rb +2 -1
  27. data/lib/miga/dataset/base.rb +20 -2
  28. data/lib/miga/dataset/result.rb +3 -2
  29. data/lib/miga/metadata.rb +25 -13
  30. data/lib/miga/project/base.rb +82 -2
  31. data/lib/miga/project/result.rb +4 -4
  32. data/lib/miga/result.rb +18 -15
  33. data/lib/miga/result/stats.rb +2 -2
  34. data/lib/miga/version.rb +2 -2
  35. data/scripts/essential_genes.bash +18 -3
  36. data/scripts/miga.bash +8 -2
  37. data/scripts/ogs.bash +2 -3
  38. data/test/dataset_test.rb +5 -5
  39. data/test/lair_test.rb +1 -2
  40. data/test/result_test.rb +22 -0
  41. data/test/with_option_test.rb +115 -0
  42. data/utils/cleanup-databases.rb +1 -2
  43. data/utils/distance/base.rb +9 -0
  44. data/utils/distance/commands.rb +183 -81
  45. data/utils/distance/database.rb +69 -10
  46. data/utils/distance/pipeline.rb +15 -21
  47. data/utils/distance/runner.rb +28 -49
  48. data/utils/distance/temporal.rb +4 -2
  49. data/utils/distances.rb +2 -2
  50. data/utils/index_metadata.rb +1 -2
  51. data/utils/requirements.txt +1 -1
  52. data/utils/subclade/runner.rb +9 -10
  53. metadata +9 -273
  54. data/utils/enveomics/Docs/recplot2.md +0 -244
  55. data/utils/enveomics/Examples/aai-matrix.bash +0 -66
  56. data/utils/enveomics/Examples/ani-matrix.bash +0 -66
  57. data/utils/enveomics/Examples/essential-phylogeny.bash +0 -105
  58. data/utils/enveomics/Examples/unus-genome-phylogeny.bash +0 -100
  59. data/utils/enveomics/LICENSE.txt +0 -73
  60. data/utils/enveomics/Makefile +0 -52
  61. data/utils/enveomics/Manifest/Tasks/aasubs.json +0 -103
  62. data/utils/enveomics/Manifest/Tasks/blasttab.json +0 -786
  63. data/utils/enveomics/Manifest/Tasks/distances.json +0 -161
  64. data/utils/enveomics/Manifest/Tasks/fasta.json +0 -766
  65. data/utils/enveomics/Manifest/Tasks/fastq.json +0 -243
  66. data/utils/enveomics/Manifest/Tasks/graphics.json +0 -126
  67. data/utils/enveomics/Manifest/Tasks/mapping.json +0 -67
  68. data/utils/enveomics/Manifest/Tasks/ogs.json +0 -382
  69. data/utils/enveomics/Manifest/Tasks/other.json +0 -829
  70. data/utils/enveomics/Manifest/Tasks/remote.json +0 -355
  71. data/utils/enveomics/Manifest/Tasks/sequence-identity.json +0 -501
  72. data/utils/enveomics/Manifest/Tasks/tables.json +0 -308
  73. data/utils/enveomics/Manifest/Tasks/trees.json +0 -68
  74. data/utils/enveomics/Manifest/Tasks/variants.json +0 -111
  75. data/utils/enveomics/Manifest/categories.json +0 -156
  76. data/utils/enveomics/Manifest/examples.json +0 -154
  77. data/utils/enveomics/Manifest/tasks.json +0 -4
  78. data/utils/enveomics/Pipelines/assembly.pbs/CONFIG.mock.bash +0 -69
  79. data/utils/enveomics/Pipelines/assembly.pbs/FastA.N50.pl +0 -1
  80. data/utils/enveomics/Pipelines/assembly.pbs/FastA.filterN.pl +0 -1
  81. data/utils/enveomics/Pipelines/assembly.pbs/FastA.length.pl +0 -1
  82. data/utils/enveomics/Pipelines/assembly.pbs/README.md +0 -189
  83. data/utils/enveomics/Pipelines/assembly.pbs/RUNME-2.bash +0 -112
  84. data/utils/enveomics/Pipelines/assembly.pbs/RUNME-3.bash +0 -23
  85. data/utils/enveomics/Pipelines/assembly.pbs/RUNME-4.bash +0 -44
  86. data/utils/enveomics/Pipelines/assembly.pbs/RUNME.bash +0 -50
  87. data/utils/enveomics/Pipelines/assembly.pbs/kSelector.R +0 -37
  88. data/utils/enveomics/Pipelines/assembly.pbs/newbler.pbs +0 -68
  89. data/utils/enveomics/Pipelines/assembly.pbs/newbler_preparator.pl +0 -49
  90. data/utils/enveomics/Pipelines/assembly.pbs/soap.pbs +0 -80
  91. data/utils/enveomics/Pipelines/assembly.pbs/stats.pbs +0 -57
  92. data/utils/enveomics/Pipelines/assembly.pbs/velvet.pbs +0 -63
  93. data/utils/enveomics/Pipelines/blast.pbs/01.pbs.bash +0 -38
  94. data/utils/enveomics/Pipelines/blast.pbs/02.pbs.bash +0 -73
  95. data/utils/enveomics/Pipelines/blast.pbs/03.pbs.bash +0 -21
  96. data/utils/enveomics/Pipelines/blast.pbs/BlastTab.recover_job.pl +0 -72
  97. data/utils/enveomics/Pipelines/blast.pbs/CONFIG.mock.bash +0 -98
  98. data/utils/enveomics/Pipelines/blast.pbs/FastA.split.pl +0 -1
  99. data/utils/enveomics/Pipelines/blast.pbs/README.md +0 -127
  100. data/utils/enveomics/Pipelines/blast.pbs/RUNME.bash +0 -109
  101. data/utils/enveomics/Pipelines/blast.pbs/TASK.check.bash +0 -128
  102. data/utils/enveomics/Pipelines/blast.pbs/TASK.dry.bash +0 -16
  103. data/utils/enveomics/Pipelines/blast.pbs/TASK.eo.bash +0 -22
  104. data/utils/enveomics/Pipelines/blast.pbs/TASK.pause.bash +0 -26
  105. data/utils/enveomics/Pipelines/blast.pbs/TASK.run.bash +0 -89
  106. data/utils/enveomics/Pipelines/blast.pbs/sentinel.pbs.bash +0 -29
  107. data/utils/enveomics/Pipelines/idba.pbs/README.md +0 -49
  108. data/utils/enveomics/Pipelines/idba.pbs/RUNME.bash +0 -95
  109. data/utils/enveomics/Pipelines/idba.pbs/run.pbs +0 -56
  110. data/utils/enveomics/Pipelines/trim.pbs/README.md +0 -54
  111. data/utils/enveomics/Pipelines/trim.pbs/RUNME.bash +0 -70
  112. data/utils/enveomics/Pipelines/trim.pbs/run.pbs +0 -130
  113. data/utils/enveomics/README.md +0 -42
  114. data/utils/enveomics/Scripts/AAsubs.log2ratio.rb +0 -171
  115. data/utils/enveomics/Scripts/Aln.cat.rb +0 -163
  116. data/utils/enveomics/Scripts/Aln.convert.pl +0 -35
  117. data/utils/enveomics/Scripts/AlphaDiversity.pl +0 -152
  118. data/utils/enveomics/Scripts/BedGraph.tad.rb +0 -93
  119. data/utils/enveomics/Scripts/BedGraph.window.rb +0 -71
  120. data/utils/enveomics/Scripts/BlastPairwise.AAsubs.pl +0 -102
  121. data/utils/enveomics/Scripts/BlastTab.addlen.rb +0 -63
  122. data/utils/enveomics/Scripts/BlastTab.advance.bash +0 -48
  123. data/utils/enveomics/Scripts/BlastTab.best_hit_sorted.pl +0 -55
  124. data/utils/enveomics/Scripts/BlastTab.catsbj.pl +0 -104
  125. data/utils/enveomics/Scripts/BlastTab.cogCat.rb +0 -76
  126. data/utils/enveomics/Scripts/BlastTab.filter.pl +0 -47
  127. data/utils/enveomics/Scripts/BlastTab.kegg_pep2path_rest.pl +0 -194
  128. data/utils/enveomics/Scripts/BlastTab.metaxaPrep.pl +0 -104
  129. data/utils/enveomics/Scripts/BlastTab.pairedHits.rb +0 -157
  130. data/utils/enveomics/Scripts/BlastTab.recplot2.R +0 -48
  131. data/utils/enveomics/Scripts/BlastTab.seqdepth.pl +0 -86
  132. data/utils/enveomics/Scripts/BlastTab.seqdepth_ZIP.pl +0 -119
  133. data/utils/enveomics/Scripts/BlastTab.seqdepth_nomedian.pl +0 -86
  134. data/utils/enveomics/Scripts/BlastTab.subsample.pl +0 -47
  135. data/utils/enveomics/Scripts/BlastTab.sumPerHit.pl +0 -114
  136. data/utils/enveomics/Scripts/BlastTab.taxid2taxrank.pl +0 -90
  137. data/utils/enveomics/Scripts/BlastTab.topHits_sorted.rb +0 -101
  138. data/utils/enveomics/Scripts/Chao1.pl +0 -97
  139. data/utils/enveomics/Scripts/CharTable.classify.rb +0 -234
  140. data/utils/enveomics/Scripts/EBIseq2tax.rb +0 -83
  141. data/utils/enveomics/Scripts/FastA.N50.pl +0 -56
  142. data/utils/enveomics/Scripts/FastA.extract.rb +0 -152
  143. data/utils/enveomics/Scripts/FastA.filter.pl +0 -52
  144. data/utils/enveomics/Scripts/FastA.filterLen.pl +0 -28
  145. data/utils/enveomics/Scripts/FastA.filterN.pl +0 -60
  146. data/utils/enveomics/Scripts/FastA.fragment.rb +0 -92
  147. data/utils/enveomics/Scripts/FastA.gc.pl +0 -42
  148. data/utils/enveomics/Scripts/FastA.interpose.pl +0 -93
  149. data/utils/enveomics/Scripts/FastA.length.pl +0 -38
  150. data/utils/enveomics/Scripts/FastA.mask.rb +0 -89
  151. data/utils/enveomics/Scripts/FastA.per_file.pl +0 -36
  152. data/utils/enveomics/Scripts/FastA.qlen.pl +0 -57
  153. data/utils/enveomics/Scripts/FastA.rename.pl +0 -65
  154. data/utils/enveomics/Scripts/FastA.revcom.pl +0 -23
  155. data/utils/enveomics/Scripts/FastA.sample.rb +0 -83
  156. data/utils/enveomics/Scripts/FastA.slider.pl +0 -85
  157. data/utils/enveomics/Scripts/FastA.split.pl +0 -55
  158. data/utils/enveomics/Scripts/FastA.split.rb +0 -79
  159. data/utils/enveomics/Scripts/FastA.subsample.pl +0 -131
  160. data/utils/enveomics/Scripts/FastA.tag.rb +0 -65
  161. data/utils/enveomics/Scripts/FastA.wrap.rb +0 -48
  162. data/utils/enveomics/Scripts/FastQ.filter.pl +0 -54
  163. data/utils/enveomics/Scripts/FastQ.interpose.pl +0 -90
  164. data/utils/enveomics/Scripts/FastQ.offset.pl +0 -90
  165. data/utils/enveomics/Scripts/FastQ.split.pl +0 -53
  166. data/utils/enveomics/Scripts/FastQ.tag.rb +0 -63
  167. data/utils/enveomics/Scripts/FastQ.test-error.rb +0 -81
  168. data/utils/enveomics/Scripts/FastQ.toFastA.awk +0 -24
  169. data/utils/enveomics/Scripts/GFF.catsbj.pl +0 -127
  170. data/utils/enveomics/Scripts/GenBank.add_fields.rb +0 -84
  171. data/utils/enveomics/Scripts/HMM.essential.rb +0 -351
  172. data/utils/enveomics/Scripts/HMM.haai.rb +0 -168
  173. data/utils/enveomics/Scripts/HMMsearch.extractIds.rb +0 -83
  174. data/utils/enveomics/Scripts/JPlace.distances.rb +0 -88
  175. data/utils/enveomics/Scripts/JPlace.to_iToL.rb +0 -320
  176. data/utils/enveomics/Scripts/M5nr.getSequences.rb +0 -81
  177. data/utils/enveomics/Scripts/MeTaxa.distribution.pl +0 -198
  178. data/utils/enveomics/Scripts/MyTaxa.fragsByTax.pl +0 -35
  179. data/utils/enveomics/Scripts/MyTaxa.seq-taxrank.rb +0 -49
  180. data/utils/enveomics/Scripts/NCBIacc2tax.rb +0 -92
  181. data/utils/enveomics/Scripts/Newick.autoprune.R +0 -27
  182. data/utils/enveomics/Scripts/RAxML-EPA.to_iToL.pl +0 -228
  183. data/utils/enveomics/Scripts/RecPlot2.compareIdentities.R +0 -32
  184. data/utils/enveomics/Scripts/RefSeq.download.bash +0 -48
  185. data/utils/enveomics/Scripts/SRA.download.bash +0 -57
  186. data/utils/enveomics/Scripts/TRIBS.plot-test.R +0 -36
  187. data/utils/enveomics/Scripts/TRIBS.test.R +0 -39
  188. data/utils/enveomics/Scripts/Table.barplot.R +0 -31
  189. data/utils/enveomics/Scripts/Table.df2dist.R +0 -30
  190. data/utils/enveomics/Scripts/Table.filter.pl +0 -61
  191. data/utils/enveomics/Scripts/Table.merge.pl +0 -77
  192. data/utils/enveomics/Scripts/Table.replace.rb +0 -69
  193. data/utils/enveomics/Scripts/Table.round.rb +0 -63
  194. data/utils/enveomics/Scripts/Table.split.pl +0 -57
  195. data/utils/enveomics/Scripts/Taxonomy.silva2ncbi.rb +0 -227
  196. data/utils/enveomics/Scripts/VCF.KaKs.rb +0 -147
  197. data/utils/enveomics/Scripts/VCF.SNPs.rb +0 -88
  198. data/utils/enveomics/Scripts/aai.rb +0 -418
  199. data/utils/enveomics/Scripts/ani.rb +0 -362
  200. data/utils/enveomics/Scripts/clust.rand.rb +0 -102
  201. data/utils/enveomics/Scripts/gi2tax.rb +0 -103
  202. data/utils/enveomics/Scripts/in_silico_GA_GI.pl +0 -96
  203. data/utils/enveomics/Scripts/lib/data/dupont_2012_essential.hmm.gz +0 -0
  204. data/utils/enveomics/Scripts/lib/data/lee_2019_essential.hmm.gz +0 -0
  205. data/utils/enveomics/Scripts/lib/enveomics.R +0 -1
  206. data/utils/enveomics/Scripts/lib/enveomics_rb/enveomics.rb +0 -24
  207. data/utils/enveomics/Scripts/lib/enveomics_rb/jplace.rb +0 -253
  208. data/utils/enveomics/Scripts/lib/enveomics_rb/og.rb +0 -182
  209. data/utils/enveomics/Scripts/lib/enveomics_rb/remote_data.rb +0 -74
  210. data/utils/enveomics/Scripts/lib/enveomics_rb/seq_range.rb +0 -237
  211. data/utils/enveomics/Scripts/lib/enveomics_rb/stat.rb +0 -30
  212. data/utils/enveomics/Scripts/lib/enveomics_rb/vcf.rb +0 -135
  213. data/utils/enveomics/Scripts/ogs.annotate.rb +0 -88
  214. data/utils/enveomics/Scripts/ogs.core-pan.rb +0 -160
  215. data/utils/enveomics/Scripts/ogs.extract.rb +0 -125
  216. data/utils/enveomics/Scripts/ogs.mcl.rb +0 -186
  217. data/utils/enveomics/Scripts/ogs.rb +0 -104
  218. data/utils/enveomics/Scripts/ogs.stats.rb +0 -131
  219. data/utils/enveomics/Scripts/rbm.rb +0 -146
  220. data/utils/enveomics/Tests/Makefile +0 -10
  221. data/utils/enveomics/Tests/Mgen_M2288.faa +0 -3189
  222. data/utils/enveomics/Tests/Mgen_M2288.fna +0 -8282
  223. data/utils/enveomics/Tests/Mgen_M2321.fna +0 -8288
  224. data/utils/enveomics/Tests/Nequ_Kin4M.faa +0 -2970
  225. data/utils/enveomics/Tests/Xanthomonas_oryzae-PilA.tribs.Rdata +0 -0
  226. data/utils/enveomics/Tests/Xanthomonas_oryzae-PilA.txt +0 -7
  227. data/utils/enveomics/Tests/Xanthomonas_oryzae.aai-mat.tsv +0 -17
  228. data/utils/enveomics/Tests/Xanthomonas_oryzae.aai.tsv +0 -137
  229. data/utils/enveomics/Tests/a_mg.cds-go.blast.tsv +0 -123
  230. data/utils/enveomics/Tests/a_mg.reads-cds.blast.tsv +0 -200
  231. data/utils/enveomics/Tests/a_mg.reads-cds.counts.tsv +0 -55
  232. data/utils/enveomics/Tests/alkB.nwk +0 -1
  233. data/utils/enveomics/Tests/anthrax-cansnp-data.tsv +0 -13
  234. data/utils/enveomics/Tests/anthrax-cansnp-key.tsv +0 -17
  235. data/utils/enveomics/Tests/hiv1.faa +0 -59
  236. data/utils/enveomics/Tests/hiv1.fna +0 -134
  237. data/utils/enveomics/Tests/hiv2.faa +0 -70
  238. data/utils/enveomics/Tests/hiv_mix-hiv1.blast.tsv +0 -233
  239. data/utils/enveomics/Tests/hiv_mix-hiv1.blast.tsv.lim +0 -1
  240. data/utils/enveomics/Tests/hiv_mix-hiv1.blast.tsv.rec +0 -233
  241. data/utils/enveomics/Tests/phyla_counts.tsv +0 -10
  242. data/utils/enveomics/Tests/primate_lentivirus.ogs +0 -11
  243. data/utils/enveomics/Tests/primate_lentivirus.rbm/hiv1-hiv1.rbm +0 -9
  244. data/utils/enveomics/Tests/primate_lentivirus.rbm/hiv1-hiv2.rbm +0 -8
  245. data/utils/enveomics/Tests/primate_lentivirus.rbm/hiv1-siv.rbm +0 -6
  246. data/utils/enveomics/Tests/primate_lentivirus.rbm/hiv2-hiv2.rbm +0 -9
  247. data/utils/enveomics/Tests/primate_lentivirus.rbm/hiv2-siv.rbm +0 -6
  248. data/utils/enveomics/Tests/primate_lentivirus.rbm/siv-siv.rbm +0 -6
  249. data/utils/enveomics/build_enveomics_r.bash +0 -45
  250. data/utils/enveomics/enveomics.R/DESCRIPTION +0 -31
  251. data/utils/enveomics/enveomics.R/NAMESPACE +0 -39
  252. data/utils/enveomics/enveomics.R/R/autoprune.R +0 -155
  253. data/utils/enveomics/enveomics.R/R/barplot.R +0 -184
  254. data/utils/enveomics/enveomics.R/R/cliopts.R +0 -135
  255. data/utils/enveomics/enveomics.R/R/df2dist.R +0 -154
  256. data/utils/enveomics/enveomics.R/R/growthcurve.R +0 -331
  257. data/utils/enveomics/enveomics.R/R/recplot.R +0 -354
  258. data/utils/enveomics/enveomics.R/R/recplot2.R +0 -1631
  259. data/utils/enveomics/enveomics.R/R/tribs.R +0 -583
  260. data/utils/enveomics/enveomics.R/R/utils.R +0 -50
  261. data/utils/enveomics/enveomics.R/README.md +0 -80
  262. data/utils/enveomics/enveomics.R/data/growth.curves.rda +0 -0
  263. data/utils/enveomics/enveomics.R/data/phyla.counts.rda +0 -0
  264. data/utils/enveomics/enveomics.R/man/cash-enve.GrowthCurve-method.Rd +0 -17
  265. data/utils/enveomics/enveomics.R/man/cash-enve.RecPlot2-method.Rd +0 -17
  266. data/utils/enveomics/enveomics.R/man/cash-enve.RecPlot2.Peak-method.Rd +0 -17
  267. data/utils/enveomics/enveomics.R/man/enve.GrowthCurve-class.Rd +0 -25
  268. data/utils/enveomics/enveomics.R/man/enve.TRIBS-class.Rd +0 -46
  269. data/utils/enveomics/enveomics.R/man/enve.TRIBS.merge.Rd +0 -23
  270. data/utils/enveomics/enveomics.R/man/enve.TRIBStest-class.Rd +0 -47
  271. data/utils/enveomics/enveomics.R/man/enve.__prune.iter.Rd +0 -23
  272. data/utils/enveomics/enveomics.R/man/enve.__prune.reduce.Rd +0 -23
  273. data/utils/enveomics/enveomics.R/man/enve.__tribs.Rd +0 -32
  274. data/utils/enveomics/enveomics.R/man/enve.barplot.Rd +0 -91
  275. data/utils/enveomics/enveomics.R/man/enve.cliopts.Rd +0 -57
  276. data/utils/enveomics/enveomics.R/man/enve.col.alpha.Rd +0 -24
  277. data/utils/enveomics/enveomics.R/man/enve.col2alpha.Rd +0 -19
  278. data/utils/enveomics/enveomics.R/man/enve.df2dist.Rd +0 -39
  279. data/utils/enveomics/enveomics.R/man/enve.df2dist.group.Rd +0 -38
  280. data/utils/enveomics/enveomics.R/man/enve.df2dist.list.Rd +0 -40
  281. data/utils/enveomics/enveomics.R/man/enve.growthcurve.Rd +0 -67
  282. data/utils/enveomics/enveomics.R/man/enve.prune.dist.Rd +0 -37
  283. data/utils/enveomics/enveomics.R/man/enve.recplot.Rd +0 -122
  284. data/utils/enveomics/enveomics.R/man/enve.recplot2-class.Rd +0 -45
  285. data/utils/enveomics/enveomics.R/man/enve.recplot2.ANIr.Rd +0 -24
  286. data/utils/enveomics/enveomics.R/man/enve.recplot2.Rd +0 -68
  287. data/utils/enveomics/enveomics.R/man/enve.recplot2.__counts.Rd +0 -25
  288. data/utils/enveomics/enveomics.R/man/enve.recplot2.__peakHist.Rd +0 -21
  289. data/utils/enveomics/enveomics.R/man/enve.recplot2.__whichClosestPeak.Rd +0 -19
  290. data/utils/enveomics/enveomics.R/man/enve.recplot2.changeCutoff.Rd +0 -19
  291. data/utils/enveomics/enveomics.R/man/enve.recplot2.compareIdentities.Rd +0 -41
  292. data/utils/enveomics/enveomics.R/man/enve.recplot2.coordinates.Rd +0 -29
  293. data/utils/enveomics/enveomics.R/man/enve.recplot2.corePeak.Rd +0 -18
  294. data/utils/enveomics/enveomics.R/man/enve.recplot2.extractWindows.Rd +0 -40
  295. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.Rd +0 -36
  296. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__em_e.Rd +0 -19
  297. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__em_m.Rd +0 -19
  298. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__emauto_one.Rd +0 -27
  299. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__mow_one.Rd +0 -41
  300. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.__mower.Rd +0 -17
  301. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.em.Rd +0 -43
  302. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.emauto.Rd +0 -37
  303. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.mower.Rd +0 -74
  304. data/utils/enveomics/enveomics.R/man/enve.recplot2.peak-class.Rd +0 -59
  305. data/utils/enveomics/enveomics.R/man/enve.recplot2.seqdepth.Rd +0 -27
  306. data/utils/enveomics/enveomics.R/man/enve.recplot2.windowDepthThreshold.Rd +0 -32
  307. data/utils/enveomics/enveomics.R/man/enve.tribs.Rd +0 -59
  308. data/utils/enveomics/enveomics.R/man/enve.tribs.test.Rd +0 -28
  309. data/utils/enveomics/enveomics.R/man/enve.truncate.Rd +0 -27
  310. data/utils/enveomics/enveomics.R/man/growth.curves.Rd +0 -14
  311. data/utils/enveomics/enveomics.R/man/phyla.counts.Rd +0 -13
  312. data/utils/enveomics/enveomics.R/man/plot.enve.GrowthCurve.Rd +0 -63
  313. data/utils/enveomics/enveomics.R/man/plot.enve.TRIBS.Rd +0 -38
  314. data/utils/enveomics/enveomics.R/man/plot.enve.TRIBStest.Rd +0 -38
  315. data/utils/enveomics/enveomics.R/man/plot.enve.recplot2.Rd +0 -111
  316. data/utils/enveomics/enveomics.R/man/summary.enve.GrowthCurve.Rd +0 -19
  317. data/utils/enveomics/enveomics.R/man/summary.enve.TRIBS.Rd +0 -19
  318. data/utils/enveomics/enveomics.R/man/summary.enve.TRIBStest.Rd +0 -19
  319. data/utils/enveomics/globals.mk +0 -8
  320. data/utils/enveomics/manifest.json +0 -9
@@ -1,90 +0,0 @@
1
- #!/usr/bin/env perl
2
- #
3
- # @author Luis M. Rodriguez-R <lmrodriguezr at gmail dot com>
4
- # @license artistic 2.0
5
- # @update Oct-13-2015
6
- #
7
-
8
- use warnings;
9
- use strict;
10
-
11
- my($blast, $nodes, $names, $rank, $bh) = @ARGV;
12
- ($blast and $nodes and $names) or die <<HELP
13
-
14
- Takes a BLAST with NCBI Taxonomy IDs as subjects and replaces them by names at a
15
- given taxonomic rank.
16
-
17
- Usage:
18
- $0 tax_blast.txt nodes.dmp names.dmp[ rank[ best-hit]] > taxrank_blast.txt
19
-
20
- tax_blast.txt BLAST output, where subject IDs are NCBI Taxonomy IDs.
21
- nodes.dmp Nodes file from NCBI Taxonomy*.
22
- names.dmp Names file from NCBI Taxonomy*.
23
- rank The rank to be reported. All the reported nodes will
24
- have the same rank. By default, genus. To see
25
- supported values, run:
26
- cut -f 5 nodes.dmp | sort -u
27
- best-hit A word (yes or no) telling the program whether or not it
28
- should take into account the best hit per query only.
29
- By default: yes.
30
- taxrank_list.txt BLAST-like output, where subject IDs are Taxonomy names.
31
-
32
- * Download from ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz
33
-
34
- HELP
35
- ;
36
- $rank ||= "genus";
37
- $bh ||= "yes";
38
-
39
- # %nodes structure:
40
- # taxid => [parent's taxid, rank, nil, name, name type]
41
-
42
- print STDERR "Reading $nodes.\n";
43
- open NODES, "<", $nodes or die "Cannot read file: $nodes: $!\n";
44
- my %nodes = map { my @a=split /\t\|\t/; ($a[0] => [$a[1], $a[2]]) } <NODES>;
45
- close NODES;
46
-
47
- print STDERR "Reading $names.\n";
48
- open NAMES, "<", $names or die "Cannot read file: $names: $!\n";
49
- while(<NAMES>){
50
- my @a=split /\t\|\t/;
51
- next if exists $nodes{$a[0]}->[3] and
52
- $nodes{$a[0]}->[4] eq "scientific name";
53
- next if exists $nodes{$a[0]}->[3] and
54
- $a[3] ne "scientific name";
55
- $nodes{$a[0]}->[3] = $a[1];
56
- $nodes{$a[0]}->[4] = $a[3];
57
- }
58
- close NAMES;
59
-
60
- my $i = 0;
61
- my $nomap = 0;
62
- my $qry = "";
63
- open BLAST, "<", $blast or die "Cannot read file: $blast: $!\n";
64
- HIT:while(<BLAST>){
65
- if(/^#/){
66
- print $_;
67
- next;
68
- }
69
- chomp;
70
- my @row = split /\t/;
71
- next if $bh eq "yes" and $row[0] eq $qry;
72
- $i++;
73
- print STDERR " Mapping hit $i\r" unless $i%10;
74
- exists $nodes{$row[1]} or die "Cannot find Taxonomy node: $row[1].\n";
75
- my $n = $nodes{$row[1]};
76
- while($n->[1] ne $rank){
77
- if($n->[0] eq $nodes{$n->[0]}->[0]){
78
- $nomap++;
79
- next HIT;
80
- }
81
- $n = $nodes{$n->[0]};
82
- }
83
- $row[1] = $n->[3];
84
- print "".join("\t", @row)."\n";
85
- }
86
- close BLAST;
87
- print STDERR " Mapped $i hits\n";
88
- print STDERR
89
- " WARNING: $nomap hits above rank or in a lineage without rank.\n" if $nomap;
90
-
@@ -1,101 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- #
4
- # @author: Luis M. Rodriguez-R <lmrodriguezr at gmail dot com>
5
- # @update: Dec-11-2015
6
- # @license: artistic license 2.0
7
- #
8
-
9
- require "optparse"
10
-
11
- $opts = {n:5, sortby:"bitscore", q:false}
12
- $cols = {"bitscore"=>11, "evalue"=>10, "identity"=>2, "length"=>3}
13
- ARGV << "-h" if ARGV.size==0
14
- OptionParser.new do |opts|
15
- opts.banner = "Reports the top-N best hits of a BLAST, pre-sorted by query."
16
- opts.separator ""
17
- opts.separator "Mandatory"
18
- opts.on("-i", "--blast FILE",
19
- "Path to the BLAST file."){ |v| $opts[:blast]=v }
20
- opts.separator ""
21
- opts.separator "Optional"
22
- opts.on("-n", "--top INTEGER",
23
- "Maximum number of hits to report for each query.",
24
- "By default: #{$opts[:n]}"){ |v| $opts[:n]=v.to_i }
25
- opts.on("-s", "--sort-by STRING",
26
- "Parameter used to detect the 'best' hits.",
27
- "Any of: bitscore (default), evalue, identity, length."
28
- ){ |v| $opts[:sortby]=v }
29
- opts.on("-q", "--quiet", "Run quietly."){ $opts[:q]=true }
30
- opts.on("-h", "--help", "Display this screen") do
31
- puts opts
32
- exit
33
- end
34
- opts.separator ""
35
- end.parse!
36
-
37
- abort "-i/--blast is mandatory." if $opts[:blast].nil?
38
- abort "Unrecognized value for -s/--sortby: #{$opts[:sortby]}." if
39
- $cols[ $opts[:sortby] ].nil?
40
-
41
- class Hit
42
- attr_reader :blast_line
43
- def initialize(blast_line)
44
- @blast_line = blast_line.chomp.split(/\t/)
45
- end
46
- def col(i)
47
- @blast_line[i]
48
- end
49
- def <=>(other)
50
- ans = self.col( $cols[ $opts[:sortby] ] ).to_f <=> other.col( $cols[ $opts[:sortby] ] ).to_f
51
- ans = ans * -1 unless $opts[:sortby] == "evalue"
52
- return ans
53
- end
54
- def to_s
55
- @blast_line.join("\t")
56
- end
57
- end
58
-
59
- class HitSet
60
- attr_reader :query, :hits
61
- def initialize
62
- @hits = []
63
- @query = nil
64
- end
65
- def <<(hit)
66
- @query = hit.col(0) if @query.nil?
67
- raise "Inconsistent query, expecting #{self.query}" unless
68
- self.query == hit.col(0)
69
- @hits << hit
70
- end
71
- def empty?
72
- self.hits.length == 0
73
- end
74
- def filter!
75
- @hits.sort!
76
- @hits.slice!($opts[:n], @hits.length)
77
- end
78
- def to_s
79
- @hits.join("\n")
80
- end
81
- end
82
-
83
- $stderr.puts "Parsing BLAST." unless $opts[:q]
84
- fh = File.open $opts[:blast], "r"
85
- hs = HitSet.new
86
- while ln=fh.gets
87
- hit = Hit.new( ln )
88
- if hs.query != hit.col(0)
89
- hs.filter!
90
- puts hs unless hs.empty?
91
- hs = HitSet.new
92
- $stderr.print "Parsing line #{$.}... \r" unless $opts[:q]
93
- end
94
- hs << hit
95
- end
96
- $stderr.print "Parsed #{$.} lines. \n" unless $opts[:q]
97
- fh.close
98
-
99
- hs.filter!
100
- puts hs unless hs.empty?
101
-
@@ -1,97 +0,0 @@
1
- #!/usr/bin/env perl
2
- #
3
- # @author Luis M. Rodriguez-R <lmrodriguezr at gmail dot com>
4
- # @license artistic license 2.0
5
- # @update Dec-29-2015
6
- #
7
-
8
- use warnings;
9
- use strict;
10
- use Getopt::Std;
11
- use List::Util qw/min max/;
12
-
13
- sub VERSION_MESSAGE(){print "Home-made Chao1 (enveomics)\n"}
14
- sub HELP_MESSAGE(){die "
15
- Description:
16
- Takes a table of OTU abundance in one or more samples and calculates the
17
- chao1 index (with 95% Confidence Interval) for each sample. To use it with
18
- Qiime OTU Tables, run it as:
19
- $0 -i OTU_Table.txt -c 1 -h
20
-
21
- Usage:
22
- $0 [opts]
23
-
24
- -i <str> * Input table (columns:samples, rows:OTUs).
25
- -r <int> Number of rows to ignore. By default: 0.
26
- -c <int> Number of columns to ignore. By default: 0.
27
- -C <int> Number of columns to ignore at the end. By default: 0.
28
- -d <str> Delimiter. Supported escaped characters are: \"\\t\"
29
- (tabulation), and \"\\0\" (null bit). By default: \"\\t\".
30
- -h If set, the first row is assumed to have the names of the
31
- samples.
32
- --help This help message.
33
-
34
- * Mandatory.
35
-
36
- To improve:
37
- o Account for n1==0 and n2==0 cases. See http://www.mothur.org/wiki/Chao.
38
-
39
- "}
40
-
41
- my %o;
42
- getopts('i:c:C:r:d:h', \%o);
43
-
44
- &HELP_MESSAGE() unless $o{i};
45
- $o{c} ||= 0;
46
- $o{C} ||= 0;
47
- $o{r} ||= 0;
48
- $o{d} ||= "\\t";
49
-
50
- $o{d}="\t" if $o{d} eq "\\t";
51
- $o{d}="\0" if $o{d} eq "\\0";
52
-
53
- my @names = ();
54
- my @values = ();
55
- open TABLE, "<", $o{i} or die "Cannot open file: ".$o{i}.": $!\n";
56
- <TABLE> for (1 .. $o{r});
57
- if($o{h}){
58
- my $h = <TABLE>;
59
- $h or die "Empty table!\n";
60
- chomp $h;
61
- @names = split $o{d}, $h;
62
- shift @names for (1 .. $o{c});
63
- pop @names for (1 .. $o{C});
64
- }
65
- while(<TABLE>){
66
- chomp;
67
- my @ln = split $o{d};
68
- shift @ln for (1 .. $o{c});
69
- pop @ln for (1 .. $o{C});
70
- push @{$values[$_] ||= []}, $ln[$_] for (0 .. $#ln);
71
- }
72
- close TABLE;
73
-
74
- print "Sample\tObs\tChao1\tChao1_LB\tChao1_UL\n";
75
- for my $i (0 .. $#values){
76
- print "".(exists $names[$i] ? $names[$i] : $i).$o{d};
77
- my $n1=0;
78
- my $n2=0;
79
- my $ob=0;
80
- for my $v (@{$values[$i]}){
81
- $n1++ if $v==1;
82
- $n2++ if $v==2;
83
- $ob++ if $v>=1;
84
- }
85
- if($ob and $n1 and $n2){
86
- my $m = $n1/$n2;
87
- my $ch = $ob + (($n1**2)/(2*$n2));
88
- my $var = ($n2*((($m**4)/4) + ($m**3) + (($m**2)/2)));
89
- my $c = exp(1.96*sqrt(log(1+ $var/(($ch-$ob)**2))));
90
- my $lc = max($ob + ($ch-$ob)/$c, $ob);
91
- my $uc = $ob + $c*($ch-$ob);
92
- print "".join($o{d}, $ob, $ch, $lc, $uc)."\n"
93
- }else{
94
- print "".join($o{d}, $ob, $ob, 0, 0)."\n"
95
- }
96
- }
97
-
@@ -1,234 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- #
4
- # @author Luis M. Rodriguez-R
5
- # @update Jan-13-2016
6
- # @license artistic license 2.0
7
- #
8
-
9
- require "optparse"
10
-
11
- o = {:q=>false}
12
- ARGV << "-h" if ARGV.size==0
13
- OptionParser.new do |opts|
14
- opts.banner = "
15
- Uses a dichotomous key to classify objects parsing a character table.
16
-
17
- Usage: #{$0} [options]"
18
- opts.separator ""
19
- opts.separator "Input Options (mandatory)"
20
- opts.on("-t", "--table FILE",
21
- "Input table containing the states (columns) per object (row).",
22
- "It must be tab-delimited and with row and column names.",
23
- "See Tests/anthrax-cansnp-data.tsv for an example."){ |v| o[:table]=v }
24
- opts.on("-k", "--key FILE",
25
- "Input table containing the dychotomous key in linked style, defined in",
26
- "four columns (can contain #-lead comment lines):",
27
- " 1. ID of the step, typically a sequential integer.",
28
- " 2. Name of character to evaluate. Must coincide with the -t headers.",
29
- " 3. First character decision (see below).",
30
- " 4. Second character decision (see below).",
31
- "A character decision must be formated as: state (must coincide with the",
32
- "values in -t), colon (:), step to follow. If the state is * (star) any",
33
- "state triggers the decision (this should be the norm in column 4). The",
34
- "step to follow should be a step ID in square brackets, or the name of",
35
- "the classification. See Tests/anthrax-cansnp-key.tsv for an example."
36
- ){ |v| o[:key]=v }
37
- opts.separator ""
38
- opts.separator "Output Options"
39
- opts.on("-c", "--classification FILE",
40
- "Two-column table with the classification of the input objects."
41
- ){ |v| o[:class]=v }
42
- opts.on("-n", "--newick FILE",
43
- "Tree containing all the classified objects. This only makes sense for",
44
- "synoptic keys."){ |v| o[:nwk]=v }
45
- opts.separator ""
46
- opts.separator "Additional Options"
47
- opts.on("-q", "--quiet", "Run quietly (no STDERR output)."){ o[:q] = true }
48
- opts.on("-h", "--help", "Display this screen.") do
49
- puts opts
50
- exit
51
- end
52
- opts.separator ""
53
- end.parse!
54
- abort "-t is mandatory" if o[:table].nil?
55
- abort "-k is mandatory" if o[:key].nil?
56
-
57
- ##### Extensions:
58
- class String
59
- def nwk_sanitize() self.gsub(/[\(\):;,"'\s]/,'_') ; end
60
- end
61
-
62
- ##### Classes:
63
- module Dychotomous
64
- class Decision
65
- attr_reader :state, :terminal, :conclusion
66
- def initialize(string)
67
- r = string.split /:/
68
- @state = r[0]
69
- @terminal = !(r[1] =~ /^\[(.*)\]$/)
70
- @conclusion = @terminal ? r[1] : $1
71
- end
72
- def ==(state)
73
- return true if self.state == '*'
74
- self.state == state.to_s
75
- end
76
- end
77
- class Character
78
- attr_reader :name, :a, :b
79
- def initialize(name, a, b)
80
- @name = name
81
- @a = a
82
- @b = b
83
- end
84
- def eval(object)
85
- state = object.state(self.name)
86
- return self.a if self.a == state
87
- return self.b if self.b == state
88
- raise "Impossible to make a decision for #{object.name} based on " +
89
- "character #{self.name}. Offending state: #{state.to_s}."
90
- end
91
- end
92
- class Key
93
- attr_reader :first
94
- def initialize(file)
95
- @characters = {}
96
- fh = File.open(file, 'r')
97
- while ln = fh.gets
98
- next if ln=~/^#/ or ln=~/^\s*$/
99
- r = ln.chomp.split /\t/
100
- @characters[ r[0] ] = Character.new(r[1],
101
- Decision.new(r[2]), Decision.new(r[3]))
102
- @first = @characters[ r[0] ] if @first.nil?
103
- end
104
- fh.close
105
- end
106
- def [](name)
107
- raise "Cannot find character #{name} in key." if @characters[name].nil?
108
- @characters[name]
109
- end
110
- end
111
- end
112
- module CharData
113
- class Object
114
- attr_reader :name, :states
115
- def initialize(name)
116
- @name = name
117
- @states = {}
118
- end
119
- def <<(state) @states[state.character] = state ; end
120
- def state(name) @states[name] ; end
121
- end
122
- class State
123
- attr_reader :character, :state
124
- def initialize(character, state)
125
- @character = character
126
- @state = state
127
- end
128
- def to_s() self.state.to_s ; end
129
- end
130
- class Table
131
- attr_reader :objects
132
- def initialize(file)
133
- @objects = []
134
- fh = File.open(file, 'r')
135
- header = fh.gets.chomp.split(/\t/)
136
- while ln = fh.gets
137
- next if ln=~/^#/ or ln=~/^\s*$/
138
- r = ln.chomp.split /\t/
139
- o = Object.new(r[0])
140
- (1 .. r.size).each{ |i| o << State.new(header[i], r[i]) }
141
- self << o
142
- end
143
- fh.close
144
- end
145
- def <<(object) @objects << object ; end
146
- end
147
- end
148
- module ClassData
149
- class Classification
150
- attr_reader :key, :object, :result
151
- def initialize key, object
152
- @key = key
153
- @object = object
154
- self.classify!
155
- end
156
- def classify!
157
- @result = self.key.first.eval(object)
158
- while ! self.result.terminal
159
- @result = self.key[ self.result.conclusion ].eval(object)
160
- end
161
- end
162
- end
163
- class Collection
164
- attr_reader :key, :table, :classifications
165
- def initialize(key, table)
166
- @key = key
167
- @table = table
168
- @classifications = []
169
- self.classify!
170
- end
171
- def classify!
172
- table.objects.each do |object|
173
- @classifications << Classification.new(key, object)
174
- end
175
- end
176
- def classified_as(conclusion)
177
- self.classifications.select{ |c|
178
- c.result.conclusion==conclusion }.map{ |c| c.object }
179
- end
180
- def to_nwk
181
- self.to_nwk_node(self.key.first) + ";"
182
- end
183
- def to_nwk_node(node)
184
- if node.is_a? Dychotomous::Character
185
- a = self.to_nwk_node(node.a)
186
- b = self.to_nwk_node(node.b)
187
- return "" if (a + b)==""
188
- return "(" + a + b + ")#{node.name.nwk_sanitize}" if a=="" or b==""
189
- return "(" + self.to_nwk_node(node.a) + "," +
190
- self.to_nwk_node(node.b) + ")#{node.name.nwk_sanitize}"
191
- end
192
- if node.is_a? Dychotomous::Decision and node.terminal
193
- objects = self.classified_as(node.conclusion)
194
- return '' if objects.empty?
195
- return objects[0].name.nwk_sanitize if objects.size==1
196
- return "(" + objects.map{|o| o.name.nwk_sanitize}.join(",") + ")"
197
- end
198
- return self.to_nwk_node( self.key[node.conclusion] ) if
199
- node.is_a? Dychotomous::Decision
200
- raise "Unsupported class: to_nwk_node: #{node}."
201
- end
202
- end
203
- end
204
-
205
- ##### MAIN:
206
- begin
207
- $stderr.puts "Reading dychotomous key." unless o[:q]
208
- key = Dychotomous::Key.new(o[:key])
209
- $stderr.puts "Reading character table." unless o[:q]
210
- table = CharData::Table.new(o[:table])
211
- $stderr.puts "Classifying objects." unless o[:q]
212
- classif = ClassData::Collection.new(key, table)
213
-
214
- unless o[:class].nil?
215
- $stderr.puts "Generating classification table." unless o[:q]
216
- fh = File.open(o[:class], 'w')
217
- classif.classifications.each do |c|
218
- fh.puts c.object.name + "\t" + c.result.conclusion
219
- end
220
- fh.close
221
- end
222
-
223
- unless o[:nwk].nil?
224
- $stderr.puts "Generating classification tree." unless o[:q]
225
- fh = File.open(o[:nwk], 'w')
226
- fh.puts classif.to_nwk
227
- fh.close
228
- end
229
-
230
- rescue => err
231
- $stderr.puts "Exception: #{err}\n\n"
232
- err.backtrace.each { |l| $stderr.puts l + "\n" }
233
- err
234
- end