miga-base 0.3.0.0 → 0.3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -4
  3. data/actions/init.rb +258 -0
  4. data/actions/run_local.rb +1 -2
  5. data/actions/test_taxonomy.rb +4 -1
  6. data/bin/miga +8 -1
  7. data/lib/miga/dataset.rb +4 -4
  8. data/lib/miga/dataset_result.rb +7 -4
  9. data/lib/miga/version.rb +2 -2
  10. data/scripts/_distances_noref_nomulti.bash +3 -1
  11. data/scripts/clade_finding.bash +1 -1
  12. data/scripts/init.bash +1 -1
  13. data/scripts/miga.bash +1 -1
  14. data/scripts/mytaxa.bash +78 -72
  15. data/scripts/mytaxa_scan.bash +67 -62
  16. data/scripts/ogs.bash +1 -1
  17. data/scripts/trimmed_fasta.bash +4 -3
  18. data/utils/enveomics/Examples/aai-matrix.bash +66 -0
  19. data/utils/enveomics/Examples/ani-matrix.bash +66 -0
  20. data/utils/enveomics/Examples/essential-phylogeny.bash +105 -0
  21. data/utils/enveomics/Examples/unus-genome-phylogeny.bash +100 -0
  22. data/utils/enveomics/LICENSE.txt +73 -0
  23. data/utils/enveomics/Makefile +52 -0
  24. data/utils/enveomics/Manifest/Tasks/aasubs.json +103 -0
  25. data/utils/enveomics/Manifest/Tasks/blasttab.json +703 -0
  26. data/utils/enveomics/Manifest/Tasks/distances.json +161 -0
  27. data/utils/enveomics/Manifest/Tasks/fasta.json +571 -0
  28. data/utils/enveomics/Manifest/Tasks/fastq.json +208 -0
  29. data/utils/enveomics/Manifest/Tasks/graphics.json +126 -0
  30. data/utils/enveomics/Manifest/Tasks/ogs.json +339 -0
  31. data/utils/enveomics/Manifest/Tasks/other.json +746 -0
  32. data/utils/enveomics/Manifest/Tasks/remote.json +355 -0
  33. data/utils/enveomics/Manifest/Tasks/sequence-identity.json +454 -0
  34. data/utils/enveomics/Manifest/Tasks/tables.json +308 -0
  35. data/utils/enveomics/Manifest/Tasks/trees.json +68 -0
  36. data/utils/enveomics/Manifest/Tasks/variants.json +111 -0
  37. data/utils/enveomics/Manifest/categories.json +132 -0
  38. data/utils/enveomics/Manifest/examples.json +154 -0
  39. data/utils/enveomics/Manifest/tasks.json +4 -0
  40. data/utils/enveomics/Pipelines/assembly.pbs/CONFIG.mock.bash +69 -0
  41. data/utils/enveomics/Pipelines/assembly.pbs/FastA.N50.pl +56 -0
  42. data/utils/enveomics/Pipelines/assembly.pbs/FastA.filterN.pl +60 -0
  43. data/utils/enveomics/Pipelines/assembly.pbs/FastA.length.pl +38 -0
  44. data/utils/enveomics/Pipelines/assembly.pbs/README.md +189 -0
  45. data/utils/enveomics/Pipelines/assembly.pbs/RUNME-2.bash +112 -0
  46. data/utils/enveomics/Pipelines/assembly.pbs/RUNME-3.bash +23 -0
  47. data/utils/enveomics/Pipelines/assembly.pbs/RUNME-4.bash +44 -0
  48. data/utils/enveomics/Pipelines/assembly.pbs/RUNME.bash +50 -0
  49. data/utils/enveomics/Pipelines/assembly.pbs/kSelector.R +37 -0
  50. data/utils/enveomics/Pipelines/assembly.pbs/newbler.pbs +68 -0
  51. data/utils/enveomics/Pipelines/assembly.pbs/newbler_preparator.pl +49 -0
  52. data/utils/enveomics/Pipelines/assembly.pbs/soap.pbs +80 -0
  53. data/utils/enveomics/Pipelines/assembly.pbs/stats.pbs +57 -0
  54. data/utils/enveomics/Pipelines/assembly.pbs/velvet.pbs +63 -0
  55. data/utils/enveomics/Pipelines/blast.pbs/01.pbs.bash +38 -0
  56. data/utils/enveomics/Pipelines/blast.pbs/02.pbs.bash +73 -0
  57. data/utils/enveomics/Pipelines/blast.pbs/03.pbs.bash +21 -0
  58. data/utils/enveomics/Pipelines/blast.pbs/BlastTab.recover_job.pl +72 -0
  59. data/utils/enveomics/Pipelines/blast.pbs/CONFIG.mock.bash +98 -0
  60. data/utils/enveomics/Pipelines/blast.pbs/FastA.split.pl +55 -0
  61. data/utils/enveomics/Pipelines/blast.pbs/README.md +127 -0
  62. data/utils/enveomics/Pipelines/blast.pbs/RUNME.bash +109 -0
  63. data/utils/enveomics/Pipelines/blast.pbs/TASK.check.bash +128 -0
  64. data/utils/enveomics/Pipelines/blast.pbs/TASK.dry.bash +16 -0
  65. data/utils/enveomics/Pipelines/blast.pbs/TASK.eo.bash +22 -0
  66. data/utils/enveomics/Pipelines/blast.pbs/TASK.pause.bash +26 -0
  67. data/utils/enveomics/Pipelines/blast.pbs/TASK.run.bash +89 -0
  68. data/utils/enveomics/Pipelines/blast.pbs/sentinel.pbs.bash +29 -0
  69. data/utils/enveomics/Pipelines/idba.pbs/README.md +49 -0
  70. data/utils/enveomics/Pipelines/idba.pbs/RUNME.bash +95 -0
  71. data/utils/enveomics/Pipelines/idba.pbs/run.pbs +56 -0
  72. data/utils/enveomics/Pipelines/trim.pbs/README.md +54 -0
  73. data/utils/enveomics/Pipelines/trim.pbs/RUNME.bash +70 -0
  74. data/utils/enveomics/Pipelines/trim.pbs/run.pbs +130 -0
  75. data/utils/enveomics/README.md +40 -0
  76. data/utils/enveomics/Scripts/AAsubs.log2ratio.rb +171 -0
  77. data/utils/enveomics/Scripts/Aln.cat.rb +162 -0
  78. data/utils/enveomics/Scripts/Aln.convert.pl +35 -0
  79. data/utils/enveomics/Scripts/AlphaDiversity.pl +152 -0
  80. data/utils/enveomics/Scripts/BlastPairwise.AAsubs.pl +102 -0
  81. data/utils/enveomics/Scripts/BlastTab.addlen.rb +61 -0
  82. data/utils/enveomics/Scripts/BlastTab.advance.bash +48 -0
  83. data/utils/enveomics/Scripts/BlastTab.best_hit_sorted.pl +55 -0
  84. data/utils/enveomics/Scripts/BlastTab.catsbj.pl +106 -0
  85. data/utils/enveomics/Scripts/BlastTab.cogCat.rb +76 -0
  86. data/utils/enveomics/Scripts/BlastTab.filter.pl +47 -0
  87. data/utils/enveomics/Scripts/BlastTab.kegg_pep2path_rest.pl +194 -0
  88. data/utils/enveomics/Scripts/BlastTab.metaxaPrep.pl +104 -0
  89. data/utils/enveomics/Scripts/BlastTab.pairedHits.rb +157 -0
  90. data/utils/enveomics/Scripts/BlastTab.recplot2.R +40 -0
  91. data/utils/enveomics/Scripts/BlastTab.seqdepth.pl +86 -0
  92. data/utils/enveomics/Scripts/BlastTab.seqdepth_ZIP.pl +119 -0
  93. data/utils/enveomics/Scripts/BlastTab.seqdepth_nomedian.pl +86 -0
  94. data/utils/enveomics/Scripts/BlastTab.subsample.pl +47 -0
  95. data/utils/enveomics/Scripts/BlastTab.sumPerHit.pl +114 -0
  96. data/utils/enveomics/Scripts/BlastTab.taxid2taxrank.pl +90 -0
  97. data/utils/enveomics/Scripts/BlastTab.topHits_sorted.rb +101 -0
  98. data/utils/enveomics/Scripts/Chao1.pl +97 -0
  99. data/utils/enveomics/Scripts/CharTable.classify.rb +234 -0
  100. data/utils/enveomics/Scripts/EBIseq2tax.rb +83 -0
  101. data/utils/enveomics/Scripts/FastA.N50.pl +56 -0
  102. data/utils/enveomics/Scripts/FastA.filter.pl +52 -0
  103. data/utils/enveomics/Scripts/FastA.filterLen.pl +28 -0
  104. data/utils/enveomics/Scripts/FastA.filterN.pl +60 -0
  105. data/utils/enveomics/Scripts/FastA.fragment.rb +92 -0
  106. data/utils/enveomics/Scripts/FastA.gc.pl +42 -0
  107. data/utils/enveomics/Scripts/FastA.interpose.pl +87 -0
  108. data/utils/enveomics/Scripts/FastA.length.pl +38 -0
  109. data/utils/enveomics/Scripts/FastA.per_file.pl +36 -0
  110. data/utils/enveomics/Scripts/FastA.qlen.pl +57 -0
  111. data/utils/enveomics/Scripts/FastA.rename.pl +65 -0
  112. data/utils/enveomics/Scripts/FastA.revcom.pl +23 -0
  113. data/utils/enveomics/Scripts/FastA.slider.pl +85 -0
  114. data/utils/enveomics/Scripts/FastA.split.pl +55 -0
  115. data/utils/enveomics/Scripts/FastA.subsample.pl +131 -0
  116. data/utils/enveomics/Scripts/FastA.tag.rb +64 -0
  117. data/utils/enveomics/Scripts/FastA.wrap.rb +48 -0
  118. data/utils/enveomics/Scripts/FastQ.filter.pl +54 -0
  119. data/utils/enveomics/Scripts/FastQ.interpose.pl +90 -0
  120. data/utils/enveomics/Scripts/FastQ.offset.pl +90 -0
  121. data/utils/enveomics/Scripts/FastQ.split.pl +53 -0
  122. data/utils/enveomics/Scripts/FastQ.tag.rb +63 -0
  123. data/utils/enveomics/Scripts/FastQ.toFastA.awk +24 -0
  124. data/utils/enveomics/Scripts/GenBank.add_fields.rb +84 -0
  125. data/utils/enveomics/Scripts/HMM.essential.rb +254 -0
  126. data/utils/enveomics/Scripts/HMMsearch.extractIds.rb +83 -0
  127. data/utils/enveomics/Scripts/JPlace.distances.rb +88 -0
  128. data/utils/enveomics/Scripts/JPlace.to_iToL.rb +306 -0
  129. data/utils/enveomics/Scripts/M5nr.getSequences.rb +81 -0
  130. data/utils/enveomics/Scripts/MeTaxa.distribution.pl +198 -0
  131. data/utils/enveomics/Scripts/MyTaxa.fragsByTax.pl +35 -0
  132. data/utils/enveomics/Scripts/MyTaxa.seq-taxrank.rb +49 -0
  133. data/utils/enveomics/Scripts/NCBIacc2tax.rb +92 -0
  134. data/utils/enveomics/Scripts/Newick.autoprune.R +27 -0
  135. data/utils/enveomics/Scripts/RAxML-EPA.to_iToL.pl +228 -0
  136. data/utils/enveomics/Scripts/RefSeq.download.bash +48 -0
  137. data/utils/enveomics/Scripts/SRA.download.bash +50 -0
  138. data/utils/enveomics/Scripts/TRIBS.plot-test.R +36 -0
  139. data/utils/enveomics/Scripts/TRIBS.test.R +39 -0
  140. data/utils/enveomics/Scripts/Table.barplot.R +30 -0
  141. data/utils/enveomics/Scripts/Table.df2dist.R +30 -0
  142. data/utils/enveomics/Scripts/Table.filter.pl +61 -0
  143. data/utils/enveomics/Scripts/Table.merge.pl +77 -0
  144. data/utils/enveomics/Scripts/Table.replace.rb +69 -0
  145. data/utils/enveomics/Scripts/Table.round.rb +63 -0
  146. data/utils/enveomics/Scripts/Table.split.pl +57 -0
  147. data/utils/enveomics/Scripts/Taxonomy.silva2ncbi.rb +227 -0
  148. data/utils/enveomics/Scripts/VCF.KaKs.rb +147 -0
  149. data/utils/enveomics/Scripts/VCF.SNPs.rb +88 -0
  150. data/utils/enveomics/Scripts/aai.rb +373 -0
  151. data/utils/enveomics/Scripts/ani.rb +362 -0
  152. data/utils/enveomics/Scripts/gi2tax.rb +103 -0
  153. data/utils/enveomics/Scripts/in_silico_GA_GI.pl +96 -0
  154. data/utils/enveomics/Scripts/lib/data/essential.hmm.gz +0 -0
  155. data/utils/enveomics/Scripts/lib/enveomics_rb/enveomics.rb +26 -0
  156. data/utils/enveomics/Scripts/lib/enveomics_rb/jplace.rb +253 -0
  157. data/utils/enveomics/Scripts/lib/enveomics_rb/og.rb +182 -0
  158. data/utils/enveomics/Scripts/lib/enveomics_rb/remote_data.rb +74 -0
  159. data/utils/enveomics/Scripts/lib/enveomics_rb/seq_range.rb +237 -0
  160. data/utils/enveomics/Scripts/lib/enveomics_rb/stat.rb +30 -0
  161. data/utils/enveomics/Scripts/lib/enveomics_rb/vcf.rb +135 -0
  162. data/utils/enveomics/Scripts/ogs.annotate.rb +88 -0
  163. data/utils/enveomics/Scripts/ogs.core-pan.rb +160 -0
  164. data/utils/enveomics/Scripts/ogs.extract.rb +125 -0
  165. data/utils/enveomics/Scripts/ogs.mcl.rb +186 -0
  166. data/utils/enveomics/Scripts/ogs.rb +104 -0
  167. data/utils/enveomics/Scripts/ogs.stats.rb +131 -0
  168. data/utils/enveomics/Scripts/rbm.rb +137 -0
  169. data/utils/enveomics/Tests/Makefile +10 -0
  170. data/utils/enveomics/Tests/Mgen_M2288.faa +3189 -0
  171. data/utils/enveomics/Tests/Mgen_M2288.fna +8282 -0
  172. data/utils/enveomics/Tests/Mgen_M2321.fna +8288 -0
  173. data/utils/enveomics/Tests/Nequ_Kin4M.faa +2970 -0
  174. data/utils/enveomics/Tests/Xanthomonas_oryzae-PilA.tribs.Rdata +0 -0
  175. data/utils/enveomics/Tests/Xanthomonas_oryzae-PilA.txt +7 -0
  176. data/utils/enveomics/Tests/Xanthomonas_oryzae.aai-mat.tsv +17 -0
  177. data/utils/enveomics/Tests/Xanthomonas_oryzae.aai.tsv +137 -0
  178. data/utils/enveomics/Tests/a_mg.cds-go.blast.tsv +123 -0
  179. data/utils/enveomics/Tests/a_mg.reads-cds.blast.tsv +200 -0
  180. data/utils/enveomics/Tests/a_mg.reads-cds.counts.tsv +55 -0
  181. data/utils/enveomics/Tests/alkB.nwk +1 -0
  182. data/utils/enveomics/Tests/anthrax-cansnp-data.tsv +13 -0
  183. data/utils/enveomics/Tests/anthrax-cansnp-key.tsv +17 -0
  184. data/utils/enveomics/Tests/hiv1.faa +59 -0
  185. data/utils/enveomics/Tests/hiv1.fna +134 -0
  186. data/utils/enveomics/Tests/hiv2.faa +70 -0
  187. data/utils/enveomics/Tests/hiv_mix-hiv1.blast.tsv +233 -0
  188. data/utils/enveomics/Tests/hiv_mix-hiv1.blast.tsv.lim +1 -0
  189. data/utils/enveomics/Tests/hiv_mix-hiv1.blast.tsv.rec +233 -0
  190. data/utils/enveomics/Tests/phyla_counts.tsv +10 -0
  191. data/utils/enveomics/Tests/primate_lentivirus.ogs +11 -0
  192. data/utils/enveomics/Tests/primate_lentivirus.rbm/hiv1-hiv1.rbm +9 -0
  193. data/utils/enveomics/Tests/primate_lentivirus.rbm/hiv1-hiv2.rbm +8 -0
  194. data/utils/enveomics/Tests/primate_lentivirus.rbm/hiv1-siv.rbm +6 -0
  195. data/utils/enveomics/Tests/primate_lentivirus.rbm/hiv2-hiv2.rbm +9 -0
  196. data/utils/enveomics/Tests/primate_lentivirus.rbm/hiv2-siv.rbm +6 -0
  197. data/utils/enveomics/Tests/primate_lentivirus.rbm/siv-siv.rbm +6 -0
  198. data/utils/enveomics/build_enveomics_r.bash +44 -0
  199. data/utils/enveomics/enveomics.R/DESCRIPTION +31 -0
  200. data/utils/enveomics/enveomics.R/NAMESPACE +35 -0
  201. data/utils/enveomics/enveomics.R/R/autoprune.R +121 -0
  202. data/utils/enveomics/enveomics.R/R/barplot.R +165 -0
  203. data/utils/enveomics/enveomics.R/R/cliopts.R +119 -0
  204. data/utils/enveomics/enveomics.R/R/df2dist.R +117 -0
  205. data/utils/enveomics/enveomics.R/R/growthcurve.R +263 -0
  206. data/utils/enveomics/enveomics.R/R/recplot.R +320 -0
  207. data/utils/enveomics/enveomics.R/R/recplot2.R +745 -0
  208. data/utils/enveomics/enveomics.R/R/tribs.R +423 -0
  209. data/utils/enveomics/enveomics.R/R/utils.R +16 -0
  210. data/utils/enveomics/enveomics.R/README.md +52 -0
  211. data/utils/enveomics/enveomics.R/data/growth.curves.rda +0 -0
  212. data/utils/enveomics/enveomics.R/data/phyla.counts.rda +0 -0
  213. data/utils/enveomics/enveomics.R/man/enve.GrowthCurve-class.Rd +30 -0
  214. data/utils/enveomics/enveomics.R/man/enve.TRIBS-class.Rd +43 -0
  215. data/utils/enveomics/enveomics.R/man/enve.TRIBS.merge.Rd +19 -0
  216. data/utils/enveomics/enveomics.R/man/enve.TRIBStest-class.Rd +37 -0
  217. data/utils/enveomics/enveomics.R/man/enve.__prune.iter.Rd +24 -0
  218. data/utils/enveomics/enveomics.R/man/enve.__prune.reduce.Rd +24 -0
  219. data/utils/enveomics/enveomics.R/man/enve.__tribs.Rd +33 -0
  220. data/utils/enveomics/enveomics.R/man/enve.barplot.Rd +64 -0
  221. data/utils/enveomics/enveomics.R/man/enve.cliopts.Rd +37 -0
  222. data/utils/enveomics/enveomics.R/man/enve.col.alpha.Rd +19 -0
  223. data/utils/enveomics/enveomics.R/man/enve.col2alpha.Rd +18 -0
  224. data/utils/enveomics/enveomics.R/man/enve.df2dist.Rd +26 -0
  225. data/utils/enveomics/enveomics.R/man/enve.df2dist.group.Rd +25 -0
  226. data/utils/enveomics/enveomics.R/man/enve.df2dist.list.Rd +26 -0
  227. data/utils/enveomics/enveomics.R/man/enve.growthcurve.Rd +49 -0
  228. data/utils/enveomics/enveomics.R/man/enve.prune.dist.Rd +28 -0
  229. data/utils/enveomics/enveomics.R/man/enve.recplot.Rd +97 -0
  230. data/utils/enveomics/enveomics.R/man/enve.recplot2-class.Rd +40 -0
  231. data/utils/enveomics/enveomics.R/man/enve.recplot2.Rd +40 -0
  232. data/utils/enveomics/enveomics.R/man/enve.recplot2.__counts.Rd +24 -0
  233. data/utils/enveomics/enveomics.R/man/enve.recplot2.__findPeak.Rd +40 -0
  234. data/utils/enveomics/enveomics.R/man/enve.recplot2.__findPeaks.Rd +18 -0
  235. data/utils/enveomics/enveomics.R/man/enve.recplot2.__peakHist.Rd +22 -0
  236. data/utils/enveomics/enveomics.R/man/enve.recplot2.__whichClosestPeak.Rd +20 -0
  237. data/utils/enveomics/enveomics.R/man/enve.recplot2.changeCutoff.Rd +18 -0
  238. data/utils/enveomics/enveomics.R/man/enve.recplot2.corePeak.Rd +18 -0
  239. data/utils/enveomics/enveomics.R/man/enve.recplot2.extractWindows.Rd +27 -0
  240. data/utils/enveomics/enveomics.R/man/enve.recplot2.findPeaks.Rd +53 -0
  241. data/utils/enveomics/enveomics.R/man/enve.recplot2.peak-class.Rd +44 -0
  242. data/utils/enveomics/enveomics.R/man/enve.tribs.Rd +44 -0
  243. data/utils/enveomics/enveomics.R/man/enve.tribs.test.Rd +21 -0
  244. data/utils/enveomics/enveomics.R/man/enveomics.R-package.Rd +15 -0
  245. data/utils/enveomics/enveomics.R/man/growth.curves.Rd +14 -0
  246. data/utils/enveomics/enveomics.R/man/phyla.counts.Rd +13 -0
  247. data/utils/enveomics/enveomics.R/man/plot.enve.GrowthCurve.Rd +43 -0
  248. data/utils/enveomics/enveomics.R/man/plot.enve.TRIBS.Rd +29 -0
  249. data/utils/enveomics/enveomics.R/man/plot.enve.TRIBStest.Rd +30 -0
  250. data/utils/enveomics/enveomics.R/man/plot.enve.recplot2.Rd +71 -0
  251. data/utils/enveomics/enveomics.R/man/summary.enve.GrowthCurve.Rd +18 -0
  252. data/utils/enveomics/enveomics.R/man/summary.enve.TRIBS.Rd +18 -0
  253. data/utils/enveomics/enveomics.R/man/summary.enve.TRIBStest.Rd +18 -0
  254. data/utils/enveomics/enveomics.R/man/z$-methods.Rd +27 -0
  255. data/utils/enveomics/globals.mk +8 -0
  256. data/utils/enveomics/manifest.json +9 -0
  257. data/utils/index_metadata.rb +0 -0
  258. data/utils/plot-taxdist.R +0 -0
  259. data/utils/requirements.txt +19 -19
  260. metadata +242 -2
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env perl
2
+ #
3
+ # @author Luis M Rodriguez-R
4
+ # @update Oct-07-2015
5
+ # @license artistic license 2.0
6
+ #
7
+
8
+ use warnings;
9
+ use strict;
10
+
11
+ $#ARGV>=0 or die "
12
+ Usage:
13
+ $0 seqs.fa... > length.txt
14
+
15
+ seqs.fa One or more FastA files.
16
+ length.txt A table with the lengths of the sequences.
17
+
18
+ ";
19
+
20
+ for my $fa (@ARGV){
21
+ open FA, "<", $fa or die "Cannot open file: $fa: $!\n";
22
+ my $def = '';
23
+ my $len = 0;
24
+ while(<FA>){
25
+ next if /^;/;
26
+ if(m/^>(\S+)\s?/){
27
+ print "$def\t$len\n" if $def;
28
+ $def = $1;
29
+ $len = 0;
30
+ }else{
31
+ s/[^A-Za-z]//g;
32
+ $len+= length $_;
33
+ }
34
+ }
35
+ print "$def\t$len\n" if $def;
36
+ close FA;
37
+ }
38
+
@@ -0,0 +1,189 @@
1
+ @author: Luis Miguel Rodriguez-R <lmrodriguezr at gmail dot com>
2
+
3
+ @update: Mar-17-2013
4
+
5
+ @license: artistic 2.0
6
+
7
+ @status: semi
8
+
9
+ @pbs: yes
10
+
11
+ # IMPORTANT
12
+
13
+ This pipeline was developed for the [PACE cluster](http://pace.gatech.edu/). You
14
+ are free to use it in other platforms with adequate adjustments. It is largely
15
+ based on Luo _et al._ 2012, ISME J.
16
+
17
+ # PURPOSE
18
+
19
+ This pipeline assemblies coupled and/or single reads from one or more libraries.
20
+ It assumes that the reads have been quality-checked and trimmed.
21
+
22
+ # HELP
23
+
24
+ 1. Files preparation:
25
+
26
+ 1.1. Copy this folder to the cluster.
27
+
28
+ 1.2. Copy the sequences to the cluster. Only trimmed/filtered reads are used.
29
+ All the files are expected to be in the same folder, and the filenames must
30
+ end in `.CoupledReads.fa` or `.SingleReads.fa`.
31
+
32
+ 1.3. Copy the file `CONFIG.mock.bash` to `CONFIG.<name>.bash`, where `<name>` is a
33
+ short name for your run (avoid characters other than alphanumeric).
34
+
35
+ 1.4. Change the variables in `CONFIG.<name>.bash`. Notice that this pipeline
36
+ supports running several libraries at the same time, but it's strongly
37
+ recomended to run only one per config file, because the insert length
38
+ (in step 2) and the selected k-mers (in step 3) are fixed for all the
39
+ included libraries. Also, there is a technical consideration: The first
40
+ step will execute parallel jobs for each odd number between 21 and 63, and
41
+ SOAP will use 16 CPUs by default, which means 357 CPUs will be requested
42
+ per library in step 2. It's a bad idea to run many libraries at the same
43
+ time.
44
+
45
+ 1.5. If you have Mate-paired datasets (for example, prepared with Nextera), first
46
+ reverse-complement all the reads. See also the `VELVETG_EXTRA` variable in
47
+ the `CONFIG.<name>.bash` file.
48
+
49
+ 2. Velvet and SOAP assembly:
50
+
51
+ 2.1. Execute `./RUNME-2.bash <name>` in the head node (see [troubleshooting](#troubleshooting) #1).
52
+
53
+ 2.2. Monitor the tasks named velvet_* and soap_*.
54
+
55
+ 2.3. Once completed, make sure the files .proc contain only the
56
+ word "done". To do this, you may execute:
57
+ ```
58
+ grep -v '^done$' *.proc
59
+ ```
60
+
61
+ If successful, the output of the above command should be empty. See
62
+ [Troubleshooting](#troubleshooting) #2 and #3 below if one or more of your jobs failed.
63
+
64
+ 3. K-mers selection:
65
+
66
+ 3.1. If you completed step 2, execute `./RUNME-3.bash <name>` in the head
67
+ node.
68
+
69
+ 3.2. Once completed, download and open the files `*.n50.pdf`.
70
+
71
+ 3.3. Select the three "best" k-mers for Velvet and for SOAP (they don't
72
+ have to be the same). There is no well-tested method to select the
73
+ "best", and this is why this protocol is not automated, but semi-
74
+ automated. A generally good rule-of-thumb is: pick one that optimizes
75
+ the amount of sequences used (these are the grey bars in the plot;
76
+ usually this is the smallest k-mer), pick one that optimizes the N50
77
+ (this is the dashed red line; usually this is a large k-mer), and pick
78
+ one that optimizes both (something in the middle). You can select
79
+ more or less than three k-mers, this is just a suggestion.
80
+
81
+ 4. Newbler assembly:
82
+
83
+ 4.1. Edit the file `CONFIG.<name>.bash`: set the variables `K_VELVET` and
84
+ `K_SOAP` to contain the lists of "best" selected k-mers for Velvet and
85
+ SOAP, respectively.
86
+
87
+ 4.2. Execute `./RUNME-4.bash <name>` in the head node.
88
+
89
+ 4.3. Monitor the task newbler_*. Once finished, your assembly is ready.
90
+ Once completed, make sure the file .newbler.proc contain only the
91
+ word "done". To do this, you may execute:
92
+ ```
93
+ grep -v '^done$' *.proc
94
+ ```
95
+ If successful, the output should be empty.
96
+
97
+ 4.4. The final assembly should be located in the `SCRATCH` path, in a folder
98
+ named `<lib>.newbler/assembly/`. The file `454AllContigs.fna` contains
99
+ all the assembled contigs, `454LargeContigs.fna` contains the contigs
100
+ with 500bp or more in length, and `454NewblerMetrics.txt` contains some
101
+ relevant statistics.
102
+
103
+
104
+ # Comments
105
+
106
+ * Some scripts contained in this package are actually symlinks to files in the
107
+ _Scripts_ folder. Check the existance of these files when copied to
108
+ the cluster.
109
+
110
+ # Troubleshooting
111
+
112
+ 1. Do I really have to change directory (`cd`) to the pipeline's folder everytime
113
+ I want to execute something?
114
+
115
+ No. Not really. For simplicity, this file tells you to execute, for example,
116
+ `./RUNME-2.bash`. However, you don't really have to be there, you can execute it
117
+ from any location. For example, if you saved this pipeline in your home
118
+ directory, you can just execute `~/assembly.pbs/RUNME-2.bash` insted from any
119
+ location in the head node.
120
+
121
+ 2. I executed step 2, and Velvet worked but SOAP failed (or vice versa). Can I
122
+ submit only one of them?
123
+
124
+ Yes. To execute only Velvet, run:
125
+ ```
126
+ ./RUNME-2.bash <name> velvet
127
+ ```
128
+
129
+ To execute only SOAP, run:
130
+ ```
131
+ ./RUNME-2.bash <name> soap
132
+ ```
133
+
134
+ 3. I ran step 2, and most of the jobs finished, but few of them failed. Can I
135
+ submit only few K-mers?
136
+
137
+ Yes. To execute one kmer (say, the k-mer 33 of SOAP), run:
138
+ ```
139
+ ./RUNME-2.bash <name> soap 33
140
+ ```
141
+
142
+ You can also execute more than one kmer, using a comma-separated list. For
143
+ example, to re-submit the k-mers 37, 39, and 41 of Velvet, run:
144
+ ```
145
+ ./RUNME-2.bash <name> velvet 37,39,41
146
+ ```
147
+
148
+ 4. What are the numbers on the job names of step 2?
149
+
150
+ The K-mer. Each k-mer has it's own job, but they are "arrayed", to simplify
151
+ administration: notice that all the jobs of Velvet and all the jobs of SOAP
152
+ share the same job ID.
153
+
154
+ 5. Some jobs are being killed, why?
155
+
156
+ 5.1. First, check the log file created by the pipeline. The name is typically
157
+ the output prefix and the .log extension. For velvet, there are two log files,
158
+ the `.glog` and the `.hlog`. You may find the problem there.
159
+
160
+ 5.2. Now, check the error file in your HOME directory. The name depends on the
161
+ job, the library and the task. For example: `~/soap_Mg_2-37.e1999838` is the
162
+ error file for step 2, task soap, library Mg_2, k-mer 37. The appending
163
+ number after the 'e' is the job ID. If this file contains errors probably
164
+ related to the pipeline, please let me know.
165
+
166
+ 5.3. If you still have no clues, check the output file in your `HOME` directory. The
167
+ name is just like the name of the error file (see #5.2 above), but with 'o'
168
+ instead of 'e'. Compare the lines 'Resources' (what we asked the scheduler for)
169
+ and 'Rsrc Used' (what the job actually used). A typical problem is that your
170
+ job may need more RAM than we asked for (the value of 'mem' in both lines). If
171
+ the RAM used is larger than the RAM requested, the scheduler probably killed
172
+ your job. To solve this, just go to your config file, and set the variable
173
+ RAMMULT to a number larger than 1. For example, if you want to ask for double the
174
+ RAM, set `RAMMULT=2`. You can also include simple arithmetic operations, like
175
+ `RAMMULT=3/2`. If you want to add a fixed ammount of RAM, in Gib, use addition.
176
+ For example, to add 10G, set `RAMMULT=1+10`.
177
+
178
+ 5.4. Still no idea? Try running the job again, sometimes the jobs fail with no
179
+ apparent reason, but they succeed when re-submited. If your job keeps failing,
180
+ please gather as much information (the log, error and output files should be
181
+ enough) and let me take a look.
182
+
183
+ 6. In the step 2, some k-mers keep failing, and I just want to give up on them, can I?
184
+
185
+ Yes. Step 3 will analyze only completed jobs, so you can just ignore these faulty
186
+ k-mers. Very small k-mers, for example, sometimes need too much memory, and very
187
+ large k-mers in Velvet sometimes need too much time. If you don't think you're
188
+ missing too much, just ignore them.
189
+
@@ -0,0 +1,112 @@
1
+ #!/bin/bash
2
+
3
+ ##################### HELP
4
+ HELP="
5
+ Usage:
6
+ $0 name[ prog[ k-mers]]
7
+
8
+ name The name of the run. CONFIG.name.bash must exist.
9
+ prog Program to execute. One of 'soap' or 'velvet'. By
10
+ default, it executes both.
11
+ k-mers Comma-separated list of k-mers to run. By default,
12
+ it executes all the odd numbers between 21 and 63
13
+ (inclusive).
14
+
15
+ See $PDIR/README.txt for more information.
16
+ "
17
+ ##################### RUN
18
+ # Find the directory of the pipeline
19
+ PDIR=$(dirname $(readlink -f $0));
20
+ # Load variables
21
+ source "$PDIR/RUNME.bash"
22
+ if [[ "$SCRATCH" == "" ]] ; then
23
+ echo "$0: Error loading $PDIR/RUNME.bash, variable SCRATCH undefined" >&2
24
+ exit 1
25
+ fi
26
+
27
+ # Check request
28
+ RUNVELVET=yes
29
+ RUNSOAP=yes
30
+ if [[ "$2" == "velvet" ]] ; then
31
+ RUNSOAP=no
32
+ elif [[ "$2" == "soap" ]] ; then
33
+ RUNVELVET=no
34
+ fi
35
+ if [[ "$3" == "" ]] ; then
36
+ KMERARRAY="21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63"
37
+ else
38
+ KMERARRAY=$3
39
+ fi
40
+ if [[ "$VELVETSIM" == "" ]] ; then
41
+ VELVETSIM=22
42
+ fi
43
+ if [[ "$SOAPSIM" == "" ]] ; then
44
+ let SOAPSIM=130/$PPN
45
+ fi
46
+
47
+ # Run it
48
+ RAMMULT=${RAMMULT:-1}
49
+ echo "Jobs being launched in $SCRATCH"
50
+ for LIB in $LIBRARIES; do
51
+ # Prepare info
52
+ echo "Running $LIB";
53
+ if [[ "$USECOUPLED" == "yes" ]] ; then
54
+ INPUT="$DATA/$LIB.CoupledReads.fa"
55
+ elif [[ "$USESINGLE" == "yes" ]] ; then
56
+ INPUT="$DATA/$LIB.SingleReads.fa"
57
+ else
58
+ echo "$0: Error: No task selected, neither USECOUPLED nor USESINGLE set to yes." >&2
59
+ exit 1;
60
+ fi
61
+ VARS="LIB=$LIB,PDIR=$PDIR,DATA=$DATA,USECOUPLED=$USECOUPLED,USESINGLE=$USESINGLE"
62
+ [[ -n $INSLEN ]] && VARS="$VARS,INSLEN=$INSLEN"
63
+ [[ -n $VELVETG_EXTRA ]] && VARS="$VARS,VELVETG_EXTRA=$VELVETG_EXTRA"
64
+ [[ -n $VELVETH_EXTRA ]] && VARS="$VARS,VELVETH_EXTRA=$VELVETH_EXTRA"
65
+ [[ -n $CLEANUP ]] && VARS="$VARS,CLEANUP=$CLEANUP"
66
+ let SIZE=$(ls -lH "$INPUT" | awk '{print $5}')/1024/1024/1024;
67
+ let RAMS=40+$SIZE*10*$RAMMULT;
68
+ let RAMV=50+$SIZE*15*$RAMMULT;
69
+ # Launch Velvet
70
+ if [[ "$RUNVELVET" == "yes" ]] ; then
71
+ NAME="velvet_${LIB}"
72
+ if [[ "$QUEUE" != "" ]]; then
73
+ qsub "$PDIR/velvet.pbs" -v "$VARS" -d "$SCRATCH" -N "$NAME" \
74
+ -l mem=${RAMV}gb -l "walltime=$WTIME" -q "$QUEUE" \
75
+ -t "$KMERARRAY%$VELVETSIM"
76
+ elif [[ $RAMV -gt 150 ]]; then
77
+ qsub "$PDIR/velvet.pbs" -v "$VARS" -d "$SCRATCH" -N "$NAME" \
78
+ -l mem=${RAMV}gb -l walltime=360:00:00 -q biohimem-6 \
79
+ -t "$KMERARRAY%$VELVETSIM"
80
+ elif [[ $SIZE -lt 6 ]]; then
81
+ qsub "$PDIR/velvet.pbs" -v "$VARS" -d "$SCRATCH" -N "$NAME" \
82
+ -l mem=${RAMV}gb -l walltime=12:00:00 -q iw-shared-6 \
83
+ -t "$KMERARRAY%$VELVETSIM"
84
+ elif [[ $SIZE -lt 20 ]]; then
85
+ qsub "$PDIR/velvet.pbs" -v "$VARS" -d "$SCRATCH" -N "$NAME" \
86
+ -l mem=${RAMV}gb -l walltime=120:00:00 -q bioforce-6 \
87
+ -t "$KMERARRAY%$VELVETSIM"
88
+ else
89
+ qsub "$PDIR/velvet.pbs" -v "$VARS" -d "$SCRATCH" -N "$NAME" \
90
+ -l mem=${RAMV}gb -l walltime=360:00:00 -q biocluster-6 \
91
+ -t "$KMERARRAY%$VELVETSIM"
92
+ fi
93
+ fi
94
+ # Launch SOAP
95
+ if [[ "$RUNSOAP" == "yes" ]] ; then
96
+ NAME="soap_${LIB}"
97
+ if [[ "$QUEUE" != "" ]]; then
98
+ qsub "$PDIR/soap.pbs" -v "$VARS" -d "$SCRATCH" -N "$NAME" \
99
+ -l mem=${RAMS}gb -l walltime=$WTIME -q $QUEUE -l nodes=1:ppn=$PPN \
100
+ -t "$KMERARRAY%$SOAPSIM"
101
+ elif [[ $RAMS -gt 150 ]]; then
102
+ qsub "$PDIR/soap.pbs" -v "$VARS" -d "$SCRATCH" -N "$NAME" \
103
+ -l mem=${RAMS}gb -l walltime=48:00:00 -q biohimem-6 \
104
+ -l nodes=1:ppn=$PPN -t "$KMERARRAY%$SOAPSIM"
105
+ else
106
+ qsub "$PDIR/soap.pbs" -v "$VARS" -d "$SCRATCH" -N "$NAME" \
107
+ -l mem=${RAMS}gb -l walltime=12:00:00 -q iw-shared-6 \
108
+ -l nodes=1:ppn=$PPN -t "$KMERARRAY%$SOAPSIM"
109
+ fi
110
+ fi
111
+ done
112
+
@@ -0,0 +1,23 @@
1
+ #!/bin/bash
2
+
3
+ ##################### RUN
4
+ # Find the directory of the pipeline
5
+ PDIR=$(dirname $(readlink -f $0));
6
+ # Load variables
7
+ source "$PDIR/RUNME.bash"
8
+ if [[ "$SCRATCH" == "" ]] ; then
9
+ echo "$0: Error loading $PDIR/RUNME.bash, variable SCRATCH undefined" >&2
10
+ exit 1
11
+ fi
12
+
13
+ # Run it
14
+ echo "Jobs being launched in $SCRATCH"
15
+ for LIB in $LIBRARIES; do
16
+ # Prepare info
17
+ echo "Running $LIB";
18
+ VARS="LIB=$LIB,PDIR=$PDIR"
19
+ # Launch Stats
20
+ NAME="N50_${LIB}"
21
+ qsub "$PDIR/stats.pbs" -v "$VARS" -d "$SCRATCH" -N "$NAME"
22
+ done
23
+
@@ -0,0 +1,44 @@
1
+ #!/bin/bash
2
+
3
+ ##################### RUN
4
+ # Find the directory of the pipeline
5
+ PDIR=$(dirname $(readlink -f $0));
6
+ # Load variables
7
+ source "$PDIR/RUNME.bash"
8
+ if [[ "$SCRATCH" == "" ]] ; then
9
+ echo "$0: Error loading $PDIR/RUNME.bash, variable SCRATCH undefined" >&2
10
+ exit 1
11
+ fi
12
+
13
+ # Run it
14
+ echo "Jobs being launched in $SCRATCH"
15
+ RAMMULT=${RAMMULT:-1}
16
+ for LIB in $LIBRARIES; do
17
+ # Prepare info
18
+ echo "Running $LIB";
19
+ K_VELVET=$(echo $K_VELVET | sed -e 's/ /:/g')
20
+ K_SOAP=$(echo $K_SOAP | sed -e 's/ /:/g')
21
+ if [[ "$USECOUPLED" == "yes" ]] ; then
22
+ INPUT="$DATA/$LIB.CoupledReads.fa"
23
+ elif [[ "$USESINGLE" == "yes" ]] ; then
24
+ INPUT="$DATA/$LIB.SingleReads.fa"
25
+ else
26
+ echo "$0: Error: No task selected, neither USECOUPLED nor USESINGLE set to yes." >&2
27
+ exit 1;
28
+ fi
29
+ let SIZE=30*$(ls -l "$INPUT" | awk '{print $5}')/1024/1024/1024;
30
+ let RAM=\(3+$SIZE\)*$RAMMULT;
31
+ VARS="LIB=$LIB,PDIR=$PDIR,BIN454=$BIN454,KVELVET=$K_VELVET,KSOAP=$K_SOAP"
32
+ # Launch Newbler
33
+ NAME="Newbler_${LIB}"
34
+ if [[ "$QUEUE" != "" ]] ; then
35
+ qsub "$PDIR/newbler.pbs" -v "$VARS" -d "$SCRATCH" -N "$NAME" -l nodes=1:ppn=$PPN -l mem=${RAM}g -l "walltime=$WTIME" -q "$QUEUE"
36
+ elif [[ $RAM -gt 150 ]] ; then
37
+ qsub "$PDIR/newbler.pbs" -v "$VARS" -d "$SCRATCH" -N "$NAME" -l nodes=1:ppn=$PPN -l mem=${RAM}g -l walltime=360:00:00 -q biohimem-6
38
+ elif [[ $SIZE -lt 4 ]] ; then
39
+ qsub "$PDIR/newbler.pbs" -v "$VARS" -d "$SCRATCH" -N "$NAME" -l nodes=1:ppn=$PPN -l mem=${RAM}g -l walltime=12:00:00 -q iw-shared-6
40
+ else
41
+ qsub "$PDIR/newbler.pbs" -v "$VARS" -d "$SCRATCH" -N "$NAME" -l nodes=1:ppn=$PPN -l mem=${RAM}g -l walltime=120:00:00 -q biocluster-6
42
+ fi
43
+ done
44
+
@@ -0,0 +1,50 @@
1
+ #!/bin/bash
2
+
3
+ ##################### RUN
4
+ # Check if it was sourced from RUNME-*.bash
5
+ if [[ "$PDIR" == "" ]] ; then
6
+ echo "$0: Error: This file is not stand-alone. Execute one of RUNME-*.bash as described in the README.txt file" >&2
7
+ exit 1
8
+ fi
9
+
10
+ # Find the directory of the pipeline
11
+ CWD=$(pwd)
12
+ PDIR=$(dirname $(readlink -f $0));
13
+
14
+ # Run it
15
+ # Actually, this script doesn't run anything. It's meant to keep the
16
+ # variables centralized.
17
+
18
+ # Load config
19
+ NAMES=$(ls $PDIR/CONFIG.*.bash | sed -e 's/.*CONFIG\./ * /' | sed -e 's/\.bash//');
20
+ if [[ "$1" == "" ]] ; then
21
+ if [[ "$HELP" == "" ]] ; then
22
+ echo "
23
+ Usage:
24
+ $0 name
25
+
26
+ name The name of the run. CONFIG.name.bash must exist.
27
+
28
+ See $PDIR/README.txt for more information.
29
+
30
+ Available names are:
31
+ $NAMES
32
+ " >&2
33
+ else
34
+ echo "$HELP
35
+ Available names are:
36
+ $NAMES
37
+ " >&2
38
+ fi
39
+ exit 1
40
+ fi
41
+ if [[ ! -e "$PDIR/CONFIG.$1.bash" ]] ; then
42
+ echo "$0: Error: Impossible to find $PDIR/CONFIG.$1.bash, available names are:
43
+ $NAMES" >&2
44
+ exit 1
45
+ fi
46
+ source "$PDIR/CONFIG.$1.bash"
47
+
48
+ # Create the scratch directory
49
+ if [[ ! -d $SCRATCH ]] ; then mkdir -p $SCRATCH ; fi;
50
+