ngs_server 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (248) hide show
  1. data/bin/ngs_server +72 -50
  2. data/ext/bamtools/extconf.rb +3 -3
  3. data/ext/vcftools/Makefile +28 -0
  4. data/ext/vcftools/README.txt +36 -0
  5. data/ext/vcftools/cpp/.svn/all-wcprops +125 -0
  6. data/ext/vcftools/cpp/.svn/dir-prop-base +6 -0
  7. data/ext/vcftools/cpp/.svn/entries +708 -0
  8. data/ext/vcftools/cpp/.svn/text-base/Makefile.svn-base +46 -0
  9. data/ext/vcftools/cpp/.svn/text-base/dgeev.cpp.svn-base +146 -0
  10. data/ext/vcftools/cpp/.svn/text-base/dgeev.h.svn-base +43 -0
  11. data/ext/vcftools/cpp/.svn/text-base/output_log.cpp.svn-base +79 -0
  12. data/ext/vcftools/cpp/.svn/text-base/output_log.h.svn-base +34 -0
  13. data/ext/vcftools/cpp/.svn/text-base/parameters.cpp.svn-base +535 -0
  14. data/ext/vcftools/cpp/.svn/text-base/parameters.h.svn-base +154 -0
  15. data/ext/vcftools/cpp/.svn/text-base/vcf_entry.cpp.svn-base +497 -0
  16. data/ext/vcftools/cpp/.svn/text-base/vcf_entry.h.svn-base +190 -0
  17. data/ext/vcftools/cpp/.svn/text-base/vcf_entry_getters.cpp.svn-base +421 -0
  18. data/ext/vcftools/cpp/.svn/text-base/vcf_entry_setters.cpp.svn-base +482 -0
  19. data/ext/vcftools/cpp/.svn/text-base/vcf_file.cpp.svn-base +495 -0
  20. data/ext/vcftools/cpp/.svn/text-base/vcf_file.h.svn-base +184 -0
  21. data/ext/vcftools/cpp/.svn/text-base/vcf_file_diff.cpp.svn-base +1282 -0
  22. data/ext/vcftools/cpp/.svn/text-base/vcf_file_filters.cpp.svn-base +1215 -0
  23. data/ext/vcftools/cpp/.svn/text-base/vcf_file_format_convert.cpp.svn-base +1138 -0
  24. data/ext/vcftools/cpp/.svn/text-base/vcf_file_index.cpp.svn-base +171 -0
  25. data/ext/vcftools/cpp/.svn/text-base/vcf_file_output.cpp.svn-base +3012 -0
  26. data/ext/vcftools/cpp/.svn/text-base/vcftools.cpp.svn-base +107 -0
  27. data/ext/vcftools/cpp/.svn/text-base/vcftools.h.svn-base +25 -0
  28. data/ext/vcftools/cpp/Makefile +46 -0
  29. data/ext/vcftools/cpp/dgeev.cpp +146 -0
  30. data/ext/vcftools/cpp/dgeev.h +43 -0
  31. data/ext/vcftools/cpp/output_log.cpp +79 -0
  32. data/ext/vcftools/cpp/output_log.h +34 -0
  33. data/ext/vcftools/cpp/parameters.cpp +535 -0
  34. data/ext/vcftools/cpp/parameters.h +154 -0
  35. data/ext/vcftools/cpp/vcf_entry.cpp +497 -0
  36. data/ext/vcftools/cpp/vcf_entry.h +190 -0
  37. data/ext/vcftools/cpp/vcf_entry_getters.cpp +421 -0
  38. data/ext/vcftools/cpp/vcf_entry_setters.cpp +482 -0
  39. data/ext/vcftools/cpp/vcf_file.cpp +495 -0
  40. data/ext/vcftools/cpp/vcf_file.h +184 -0
  41. data/ext/vcftools/cpp/vcf_file_diff.cpp +1282 -0
  42. data/ext/vcftools/cpp/vcf_file_filters.cpp +1215 -0
  43. data/ext/vcftools/cpp/vcf_file_format_convert.cpp +1138 -0
  44. data/ext/vcftools/cpp/vcf_file_index.cpp +171 -0
  45. data/ext/vcftools/cpp/vcf_file_output.cpp +3012 -0
  46. data/ext/vcftools/cpp/vcftools.cpp +107 -0
  47. data/ext/vcftools/cpp/vcftools.h +25 -0
  48. data/ext/vcftools/examples/.svn/all-wcprops +185 -0
  49. data/ext/vcftools/examples/.svn/dir-prop-base +6 -0
  50. data/ext/vcftools/examples/.svn/entries +1048 -0
  51. data/ext/vcftools/examples/.svn/prop-base/perl-api-1.pl.svn-base +5 -0
  52. data/ext/vcftools/examples/.svn/text-base/annotate-test.vcf.svn-base +37 -0
  53. data/ext/vcftools/examples/.svn/text-base/annotate.out.svn-base +23 -0
  54. data/ext/vcftools/examples/.svn/text-base/annotate.txt.svn-base +7 -0
  55. data/ext/vcftools/examples/.svn/text-base/annotate2.out.svn-base +52 -0
  56. data/ext/vcftools/examples/.svn/text-base/annotate3.out.svn-base +23 -0
  57. data/ext/vcftools/examples/.svn/text-base/cmp-test-a-3.3.vcf.svn-base +12 -0
  58. data/ext/vcftools/examples/.svn/text-base/cmp-test-a.vcf.svn-base +12 -0
  59. data/ext/vcftools/examples/.svn/text-base/cmp-test-b-3.3.vcf.svn-base +12 -0
  60. data/ext/vcftools/examples/.svn/text-base/cmp-test-b.vcf.svn-base +12 -0
  61. data/ext/vcftools/examples/.svn/text-base/cmp-test.out.svn-base +53 -0
  62. data/ext/vcftools/examples/.svn/text-base/concat-a.vcf.svn-base +21 -0
  63. data/ext/vcftools/examples/.svn/text-base/concat-b.vcf.svn-base +13 -0
  64. data/ext/vcftools/examples/.svn/text-base/concat-c.vcf.svn-base +19 -0
  65. data/ext/vcftools/examples/.svn/text-base/concat.out.svn-base +39 -0
  66. data/ext/vcftools/examples/.svn/text-base/invalid-4.0.vcf.svn-base +31 -0
  67. data/ext/vcftools/examples/.svn/text-base/isec-n2-test.vcf.out.svn-base +19 -0
  68. data/ext/vcftools/examples/.svn/text-base/merge-test-a.vcf.svn-base +17 -0
  69. data/ext/vcftools/examples/.svn/text-base/merge-test-b.vcf.svn-base +17 -0
  70. data/ext/vcftools/examples/.svn/text-base/merge-test-c.vcf.svn-base +15 -0
  71. data/ext/vcftools/examples/.svn/text-base/merge-test.vcf.out.svn-base +31 -0
  72. data/ext/vcftools/examples/.svn/text-base/perl-api-1.pl.svn-base +46 -0
  73. data/ext/vcftools/examples/.svn/text-base/query-test.out.svn-base +6 -0
  74. data/ext/vcftools/examples/.svn/text-base/shuffle-test.vcf.svn-base +12 -0
  75. data/ext/vcftools/examples/.svn/text-base/subset.SNPs.out.svn-base +10 -0
  76. data/ext/vcftools/examples/.svn/text-base/subset.indels.out.svn-base +18 -0
  77. data/ext/vcftools/examples/.svn/text-base/subset.vcf.svn-base +21 -0
  78. data/ext/vcftools/examples/.svn/text-base/valid-3.3.vcf.svn-base +30 -0
  79. data/ext/vcftools/examples/.svn/text-base/valid-4.0.vcf.stats.svn-base +104 -0
  80. data/ext/vcftools/examples/.svn/text-base/valid-4.0.vcf.svn-base +34 -0
  81. data/ext/vcftools/examples/.svn/text-base/valid-4.1.vcf.svn-base +37 -0
  82. data/ext/vcftools/examples/annotate-test.vcf +37 -0
  83. data/ext/vcftools/examples/annotate.out +23 -0
  84. data/ext/vcftools/examples/annotate.txt +7 -0
  85. data/ext/vcftools/examples/annotate2.out +52 -0
  86. data/ext/vcftools/examples/annotate3.out +23 -0
  87. data/ext/vcftools/examples/cmp-test-a-3.3.vcf +12 -0
  88. data/ext/vcftools/examples/cmp-test-a.vcf +12 -0
  89. data/ext/vcftools/examples/cmp-test-b-3.3.vcf +12 -0
  90. data/ext/vcftools/examples/cmp-test-b.vcf +12 -0
  91. data/ext/vcftools/examples/cmp-test.out +53 -0
  92. data/ext/vcftools/examples/concat-a.vcf +21 -0
  93. data/ext/vcftools/examples/concat-b.vcf +13 -0
  94. data/ext/vcftools/examples/concat-c.vcf +19 -0
  95. data/ext/vcftools/examples/concat.out +39 -0
  96. data/ext/vcftools/examples/invalid-4.0.vcf +31 -0
  97. data/ext/vcftools/examples/isec-n2-test.vcf.out +19 -0
  98. data/ext/vcftools/examples/merge-test-a.vcf +17 -0
  99. data/ext/vcftools/examples/merge-test-b.vcf +17 -0
  100. data/ext/vcftools/examples/merge-test-c.vcf +15 -0
  101. data/ext/vcftools/examples/merge-test.vcf.out +31 -0
  102. data/ext/vcftools/examples/perl-api-1.pl +46 -0
  103. data/ext/vcftools/examples/query-test.out +6 -0
  104. data/ext/vcftools/examples/shuffle-test.vcf +12 -0
  105. data/ext/vcftools/examples/subset.SNPs.out +10 -0
  106. data/ext/vcftools/examples/subset.indels.out +18 -0
  107. data/ext/vcftools/examples/subset.vcf +21 -0
  108. data/ext/vcftools/examples/valid-3.3.vcf +30 -0
  109. data/ext/vcftools/examples/valid-4.0.vcf +34 -0
  110. data/ext/vcftools/examples/valid-4.0.vcf.stats +104 -0
  111. data/ext/vcftools/examples/valid-4.1.vcf +37 -0
  112. data/ext/vcftools/extconf.rb +2 -0
  113. data/ext/vcftools/perl/.svn/all-wcprops +149 -0
  114. data/ext/vcftools/perl/.svn/entries +844 -0
  115. data/ext/vcftools/perl/.svn/prop-base/fill-aa.svn-base +5 -0
  116. data/ext/vcftools/perl/.svn/prop-base/fill-an-ac.svn-base +5 -0
  117. data/ext/vcftools/perl/.svn/prop-base/fill-ref-md5.svn-base +5 -0
  118. data/ext/vcftools/perl/.svn/prop-base/tab-to-vcf.svn-base +5 -0
  119. data/ext/vcftools/perl/.svn/prop-base/test.t.svn-base +5 -0
  120. data/ext/vcftools/perl/.svn/prop-base/vcf-annotate.svn-base +5 -0
  121. data/ext/vcftools/perl/.svn/prop-base/vcf-compare.svn-base +5 -0
  122. data/ext/vcftools/perl/.svn/prop-base/vcf-concat.svn-base +5 -0
  123. data/ext/vcftools/perl/.svn/prop-base/vcf-convert.svn-base +5 -0
  124. data/ext/vcftools/perl/.svn/prop-base/vcf-fix-newlines.svn-base +5 -0
  125. data/ext/vcftools/perl/.svn/prop-base/vcf-isec.svn-base +5 -0
  126. data/ext/vcftools/perl/.svn/prop-base/vcf-merge.svn-base +5 -0
  127. data/ext/vcftools/perl/.svn/prop-base/vcf-query.svn-base +5 -0
  128. data/ext/vcftools/perl/.svn/prop-base/vcf-shuffle-cols.svn-base +5 -0
  129. data/ext/vcftools/perl/.svn/prop-base/vcf-sort.svn-base +5 -0
  130. data/ext/vcftools/perl/.svn/prop-base/vcf-stats.svn-base +5 -0
  131. data/ext/vcftools/perl/.svn/prop-base/vcf-subset.svn-base +5 -0
  132. data/ext/vcftools/perl/.svn/prop-base/vcf-to-tab.svn-base +5 -0
  133. data/ext/vcftools/perl/.svn/prop-base/vcf-validator.svn-base +5 -0
  134. data/ext/vcftools/perl/.svn/text-base/ChangeLog.svn-base +84 -0
  135. data/ext/vcftools/perl/.svn/text-base/FaSlice.pm.svn-base +214 -0
  136. data/ext/vcftools/perl/.svn/text-base/Makefile.svn-base +12 -0
  137. data/ext/vcftools/perl/.svn/text-base/Vcf.pm.svn-base +2853 -0
  138. data/ext/vcftools/perl/.svn/text-base/VcfStats.pm.svn-base +681 -0
  139. data/ext/vcftools/perl/.svn/text-base/fill-aa.svn-base +103 -0
  140. data/ext/vcftools/perl/.svn/text-base/fill-an-ac.svn-base +56 -0
  141. data/ext/vcftools/perl/.svn/text-base/fill-ref-md5.svn-base +204 -0
  142. data/ext/vcftools/perl/.svn/text-base/tab-to-vcf.svn-base +92 -0
  143. data/ext/vcftools/perl/.svn/text-base/test.t.svn-base +376 -0
  144. data/ext/vcftools/perl/.svn/text-base/vcf-annotate.svn-base +1099 -0
  145. data/ext/vcftools/perl/.svn/text-base/vcf-compare.svn-base +1193 -0
  146. data/ext/vcftools/perl/.svn/text-base/vcf-concat.svn-base +310 -0
  147. data/ext/vcftools/perl/.svn/text-base/vcf-convert.svn-base +180 -0
  148. data/ext/vcftools/perl/.svn/text-base/vcf-fix-newlines.svn-base +97 -0
  149. data/ext/vcftools/perl/.svn/text-base/vcf-isec.svn-base +660 -0
  150. data/ext/vcftools/perl/.svn/text-base/vcf-merge.svn-base +577 -0
  151. data/ext/vcftools/perl/.svn/text-base/vcf-query.svn-base +272 -0
  152. data/ext/vcftools/perl/.svn/text-base/vcf-shuffle-cols.svn-base +89 -0
  153. data/ext/vcftools/perl/.svn/text-base/vcf-sort.svn-base +79 -0
  154. data/ext/vcftools/perl/.svn/text-base/vcf-stats.svn-base +160 -0
  155. data/ext/vcftools/perl/.svn/text-base/vcf-subset.svn-base +206 -0
  156. data/ext/vcftools/perl/.svn/text-base/vcf-to-tab.svn-base +112 -0
  157. data/ext/vcftools/perl/.svn/text-base/vcf-validator.svn-base +145 -0
  158. data/ext/vcftools/perl/ChangeLog +84 -0
  159. data/ext/vcftools/perl/FaSlice.pm +214 -0
  160. data/ext/vcftools/perl/Makefile +12 -0
  161. data/ext/vcftools/perl/Vcf.pm +2853 -0
  162. data/ext/vcftools/perl/VcfStats.pm +681 -0
  163. data/ext/vcftools/perl/fill-aa +103 -0
  164. data/ext/vcftools/perl/fill-an-ac +56 -0
  165. data/ext/vcftools/perl/fill-ref-md5 +204 -0
  166. data/ext/vcftools/perl/tab-to-vcf +92 -0
  167. data/ext/vcftools/perl/test.t +376 -0
  168. data/ext/vcftools/perl/vcf-annotate +1099 -0
  169. data/ext/vcftools/perl/vcf-compare +1193 -0
  170. data/ext/vcftools/perl/vcf-concat +310 -0
  171. data/ext/vcftools/perl/vcf-convert +180 -0
  172. data/ext/vcftools/perl/vcf-fix-newlines +97 -0
  173. data/ext/vcftools/perl/vcf-isec +660 -0
  174. data/ext/vcftools/perl/vcf-merge +577 -0
  175. data/ext/vcftools/perl/vcf-query +286 -0
  176. data/ext/vcftools/perl/vcf-shuffle-cols +89 -0
  177. data/ext/vcftools/perl/vcf-sort +79 -0
  178. data/ext/vcftools/perl/vcf-stats +160 -0
  179. data/ext/vcftools/perl/vcf-subset +206 -0
  180. data/ext/vcftools/perl/vcf-to-tab +112 -0
  181. data/ext/vcftools/perl/vcf-validator +145 -0
  182. data/ext/vcftools/website/.svn/all-wcprops +41 -0
  183. data/ext/vcftools/website/.svn/entries +238 -0
  184. data/ext/vcftools/website/.svn/prop-base/VCF-poster.pdf.svn-base +5 -0
  185. data/ext/vcftools/website/.svn/prop-base/favicon.ico.svn-base +5 -0
  186. data/ext/vcftools/website/.svn/prop-base/favicon.png.svn-base +5 -0
  187. data/ext/vcftools/website/.svn/text-base/Makefile.svn-base +6 -0
  188. data/ext/vcftools/website/.svn/text-base/README.svn-base +2 -0
  189. data/ext/vcftools/website/.svn/text-base/VCF-poster.pdf.svn-base +0 -0
  190. data/ext/vcftools/website/.svn/text-base/default.css.svn-base +250 -0
  191. data/ext/vcftools/website/.svn/text-base/favicon.ico.svn-base +0 -0
  192. data/ext/vcftools/website/.svn/text-base/favicon.png.svn-base +0 -0
  193. data/ext/vcftools/website/Makefile +6 -0
  194. data/ext/vcftools/website/README +2 -0
  195. data/ext/vcftools/website/VCF-poster.pdf +0 -0
  196. data/ext/vcftools/website/default.css +250 -0
  197. data/ext/vcftools/website/favicon.ico +0 -0
  198. data/ext/vcftools/website/favicon.png +0 -0
  199. data/ext/vcftools/website/img/.svn/all-wcprops +53 -0
  200. data/ext/vcftools/website/img/.svn/entries +300 -0
  201. data/ext/vcftools/website/img/.svn/prop-base/bg.gif.svn-base +5 -0
  202. data/ext/vcftools/website/img/.svn/prop-base/bgcode.gif.svn-base +5 -0
  203. data/ext/vcftools/website/img/.svn/prop-base/bgcontainer.gif.svn-base +5 -0
  204. data/ext/vcftools/website/img/.svn/prop-base/bgul.gif.svn-base +5 -0
  205. data/ext/vcftools/website/img/.svn/prop-base/header.gif.svn-base +5 -0
  206. data/ext/vcftools/website/img/.svn/prop-base/li.gif.svn-base +5 -0
  207. data/ext/vcftools/website/img/.svn/prop-base/quote.gif.svn-base +5 -0
  208. data/ext/vcftools/website/img/.svn/prop-base/search.gif.svn-base +5 -0
  209. data/ext/vcftools/website/img/.svn/text-base/bg.gif.svn-base +0 -0
  210. data/ext/vcftools/website/img/.svn/text-base/bgcode.gif.svn-base +0 -0
  211. data/ext/vcftools/website/img/.svn/text-base/bgcontainer.gif.svn-base +0 -0
  212. data/ext/vcftools/website/img/.svn/text-base/bgul.gif.svn-base +0 -0
  213. data/ext/vcftools/website/img/.svn/text-base/header.gif.svn-base +0 -0
  214. data/ext/vcftools/website/img/.svn/text-base/li.gif.svn-base +0 -0
  215. data/ext/vcftools/website/img/.svn/text-base/quote.gif.svn-base +0 -0
  216. data/ext/vcftools/website/img/.svn/text-base/search.gif.svn-base +0 -0
  217. data/ext/vcftools/website/img/bg.gif +0 -0
  218. data/ext/vcftools/website/img/bgcode.gif +0 -0
  219. data/ext/vcftools/website/img/bgcontainer.gif +0 -0
  220. data/ext/vcftools/website/img/bgul.gif +0 -0
  221. data/ext/vcftools/website/img/header.gif +0 -0
  222. data/ext/vcftools/website/img/li.gif +0 -0
  223. data/ext/vcftools/website/img/quote.gif +0 -0
  224. data/ext/vcftools/website/img/search.gif +0 -0
  225. data/ext/vcftools/website/src/.svn/all-wcprops +53 -0
  226. data/ext/vcftools/website/src/.svn/entries +300 -0
  227. data/ext/vcftools/website/src/.svn/text-base/docs.inc.svn-base +202 -0
  228. data/ext/vcftools/website/src/.svn/text-base/index.inc.svn-base +52 -0
  229. data/ext/vcftools/website/src/.svn/text-base/index.php.svn-base +80 -0
  230. data/ext/vcftools/website/src/.svn/text-base/license.inc.svn-base +27 -0
  231. data/ext/vcftools/website/src/.svn/text-base/links.inc.svn-base +13 -0
  232. data/ext/vcftools/website/src/.svn/text-base/options.inc.svn-base +654 -0
  233. data/ext/vcftools/website/src/.svn/text-base/perl_module.inc.svn-base +249 -0
  234. data/ext/vcftools/website/src/.svn/text-base/specs.inc.svn-base +18 -0
  235. data/ext/vcftools/website/src/docs.inc +202 -0
  236. data/ext/vcftools/website/src/index.inc +52 -0
  237. data/ext/vcftools/website/src/index.php +80 -0
  238. data/ext/vcftools/website/src/license.inc +27 -0
  239. data/ext/vcftools/website/src/links.inc +13 -0
  240. data/ext/vcftools/website/src/options.inc +654 -0
  241. data/ext/vcftools/website/src/perl_module.inc +249 -0
  242. data/ext/vcftools/website/src/specs.inc +18 -0
  243. data/lib/config.ru +9 -0
  244. data/lib/ngs_server/add.rb +9 -0
  245. data/lib/ngs_server/version.rb +1 -1
  246. data/lib/ngs_server.rb +55 -3
  247. data/ngs_server.gemspec +5 -2
  248. metadata +296 -6
@@ -0,0 +1,249 @@
1
+
2
+ <div class="item">
3
+ <h1>The Perl modules and scripts</h1>
4
+ <p>VCFtools contains a Perl API (<a href="#Vcf.pm">Vcf.pm</a>) and a number
5
+ of Perl scripts that can be used to perform common tasks with VCF files such as
6
+ file validation, file merging, intersecting, complements, etc. The Perl tools
7
+ support all versions of the VCF specification (3.2, 3.3, 4.0 and 4.1),
8
+ nevertheless, the users are encouraged to use the latest versions VCFv4.0 or VCFv4.1.
9
+ The VCFtools in general have been used mainly with diploid data, but the Perl tools
10
+ aim to support polyploid data as well.
11
+ </p>
12
+
13
+ <p>
14
+ Run any of the Perl scripts with the --help switch to obtain more help.
15
+ Note that the <b><span class="cmd">PERL5LIB</span> environment variable must contain
16
+ the path to your VCFtools installation</b> in order for the scripts to work.
17
+ </p>
18
+ <p class="codebox">export PERL5LIB=/path/to/your/installation</p>
19
+
20
+ <p>
21
+ Many of the <b>Perl scripts require that the VCF files are compressed by <span class="cmd">bgzip</span>
22
+ and indexed by <span class="cmd">tabix</span></b> (both tools are part of the tabix package,
23
+ available for <a href="https://sourceforge.net/projects/samtools/files/tabix/">download here</a>).
24
+ The VCF files can be compressed and indexed using the following commands
25
+ <p class="codebox">bgzip my_file.vcf<br>
26
+ tabix -p vcf my_file.vcf.gz
27
+ </p>
28
+
29
+ <h3>The tools</h3>
30
+ <ul class="faq">
31
+ <li> <a href="#fill-aa">fill-aa</a>
32
+ <li> <a href="#fill-an-ac">fill-an-ac</a>
33
+ <li> <a href="#fill-ref-md5">fill-ref-md5</a>
34
+ <li> <a href="#fill-rsIDs">fill-rsIDs</a>
35
+ <li> <a href="#vcf-annotate">vcf-annotate</a>
36
+ <li> <a href="#vcf-compare">vcf-compare</a>
37
+ <li> <a href="#vcf-concat">vcf-concat</a>
38
+ <li> <a href="#vcf-convert">vcf-convert</a>
39
+ <li> <a href="#vcf-isec">vcf-isec</a>
40
+ <li> <a href="#vcf-merge">vcf-merge</a>
41
+ <li> <a href="#vcf-query">vcf-query</a>
42
+ <li> <a href="#vcf-shuffle-cols">vcf-shuffle-cols</a>
43
+ <li> <a href="#vcf-sort">vcf-sort</a>
44
+ <li> <a href="#vcf-stats">vcf-stats</a>
45
+ <li> <a href="#vcf-subset">vcf-subset</a>
46
+ <li> <a href="#vcf-to-tab">vcf-to-tab</a>
47
+ <li> <a href="#vcf-validator">vcf-validator</a>
48
+ <li> <a href="#Vcf.pm">Vcf.pm</a>
49
+ </ul>
50
+ </div>
51
+
52
+
53
+ <div class="item">
54
+ <a name="fill-aa" class="Q">fill-aa</a>
55
+ <p> Fill in ancestral alleles.
56
+ </p>
57
+ <p class="codebox">zcat file.vcf.gz | fill-aa -a ancestral-alleles.fa.gz | bgzip -c &gt; out.vcf.gz</p>
58
+ </div>
59
+
60
+
61
+ <div class="item">
62
+ <a name="fill-an-ac" class="Q">fill-an-ac</a>
63
+ <p> Fill or recalculate AN and AC INFO fields.
64
+ </p>
65
+ <p class="codebox">zcat file.vcf.gz | fill-an-ac | bgzip -c &gt; out.vcf.gz</p>
66
+ </div>
67
+
68
+
69
+ <div class="item">
70
+ <a name="fill-ref-md5" class="Q">fill-ref-md5</a>
71
+ <p>Fill missing reference info and sequence MD5s into VCF header.
72
+ </p>
73
+ <p class="codebox">fill-ref-md5 -i "SP:Homo\ Sapiens" -r ref.fasta in.vcf.gz -d ref.dict out.vcf.gz</p>
74
+ </div>
75
+
76
+
77
+ <div class="item">
78
+ <a name="fill-rsIDs" class="Q">fill-rsIDs</a>
79
+ <p>Fill missing rsIDs. This script has been discontinued, please use <a href="#vcf-annotate">vcf-annotate</a> instead.
80
+ </p>
81
+ </div>
82
+
83
+
84
+ <div class="item">
85
+ <a name="vcf-annotate" class="Q">vcf-annotate</a>
86
+ <p> Annotates VCF files with filtering information, IDs or custom annotations.
87
+ To add custom annotations to VCF files, create TAB delimited file with annotations
88
+ such as
89
+ <p class="codebox" style="white-space:pre;font-family:monospace;">#CHR FROM TO ANNOTATION
90
+ 1 12345 22345 gene1
91
+ 1 67890 77890 gene2
92
+ </p>
93
+ <p>
94
+ Compress the file (using <span class="cmd">bgzip annotations</span>), index (using <span class="cmd">tabix -s 1 -b 2 -e 3 annotations.gz</span>) and
95
+ run
96
+ </p>
97
+ <p class="codebox">cat in.vcf | vcf-annotate -a annotations.gz \ <br>
98
+ &nbsp;&nbsp; -d key=INFO,ID=ANN,Number=1,Type=Integer,Description='My custom annotation' \ <br>
99
+ &nbsp;&nbsp; -c CHROM,FROM,TO,INFO/ANN &gt; out.vcf </p>
100
+ <p style='padding-bottom:0px'>The script is also routinely used to apply filters. There are a number of predefined filters and
101
+ custom filters can be easily added, see <span class="cmd">vcf-annotate -h</span> for examples.
102
+ Some of the predefined filters take advantage of tags added by bcftools, the descriptions of the most frequently asked
103
+ ones follow:</p>
104
+ <div style='margin-left:1em;margin-top:0.2em;'>
105
+ <b>Strand Bias</b>
106
+ .. Tests if variant bases tend to come from one strand. Fisher's exact test
107
+ for 2x2 contingency table where the row variable is being the reference allele
108
+ or not and the column variable is strand. Two-tail P-value is used.
109
+ </div>
110
+ <div style='margin-left:1em;margin-top:0.2em;'>
111
+ <b>End Distance Bias</b>
112
+ .. Tests if variant bases tend to occur
113
+ towards the end of reads, which is usually an indication of
114
+ misalignment. (T-test)
115
+ </div>
116
+ <div style='margin-left:1em;margin-top:0.2em;'>
117
+ <b>Base Quality Bias</b>
118
+ .. Tests if variant bases tend to occur with a quality bias (T-test). This filter is by default
119
+ effectively disabled as it is set to 0.
120
+ </div>
121
+ </div>
122
+
123
+ <div class="item">
124
+ <a name="vcf-compare" class="Q">vcf-compare</a>
125
+ <p> Compares positions in two or more VCF files and outputs the numbers of
126
+ positions contained in one but not the other files; two but not the other files, etc, which
127
+ comes handy when generating Venn diagrams. The script also computes numbers
128
+ such as nonreference discordance rates (including multiallelic sites), compares
129
+ actual sequence (useful when comparing indels), etc.
130
+ <br>
131
+ </p>
132
+ <p class="codebox">vcf-compare -H A.vcf.gz B.vcf.gz C.vcf.gz</p>
133
+ </div>
134
+
135
+
136
+
137
+
138
+ <div class="item">
139
+ <a name="vcf-concat" class="Q">vcf-concat</a>
140
+ <p>Very simple script for concatenating multiple VCF files into one. Checks that the count and
141
+ column names match.
142
+ </p>
143
+ <p class="codebox">vcf-concat A.vcf.gz B.vcf.gz C.vcf.gz | gzip -c &gt; out.vcf.gz</p>
144
+ </div>
145
+
146
+
147
+
148
+ <div class="item">
149
+ <a name="vcf-convert" class="Q">vcf-convert</a>
150
+ <p>Convert between VCF versions, currently from VCFv3.3 to VCFv4.0.
151
+ </p>
152
+ <p class="codebox">zcat file.vcf.gz | vcf-convert -r reference.fa &gt; out.vcf</p>
153
+ </div>
154
+
155
+
156
+ <div class="item">
157
+ <a name="vcf-isec" class="Q">vcf-isec</a>
158
+ <p> Creates intersections and complements of two or more VCF files. Given multiple
159
+ VCF files, it can output the list of positions which are shared by at least N files,
160
+ at most N files, exactly N files, etc. The first example below outputs positions shared by
161
+ at least two files and the second outputs positions present in the files A but absent
162
+ from files B and C.
163
+ </p>
164
+ <p class="codebox">
165
+ vcf-isec -n +2 A.vcf.gz B.vcf.gz | bgzip -c &gt; out.vcf.gz <br>
166
+ vcf-isec -c A.vcf.gz B.vcf.gz C.vcf.gz | bgzip -c &gt; out.vcf.gz
167
+ </p>
168
+ </div>
169
+
170
+
171
+ <div class="item">
172
+ <a name="vcf-merge" class="Q">vcf-merge</a>
173
+ <p> Merges two or more VCF files into one so that, for example, if two source files
174
+ had one column each, on output will be printed a file with two columns.
175
+ </p>
176
+ <p class="codebox">vcf-merge A.vcf.gz B.vcf.gz C.vcf.gz | bgzip -c &gt; out.vcf.gz</p>
177
+ <p>Note that this script is not intended for concatenating VCF files. For this, use
178
+ <a href="perl_module.html#vcf-concat">vcf-concat</a> instead.
179
+ </p>
180
+ </div>
181
+
182
+
183
+ <div class="item">
184
+ <a name="vcf-query" class="Q">vcf-query</a>
185
+ <p> Powerful tool for converting VCF files into user-definable formats.
186
+ Supports retrieval of subsets of positions, columns and fields.
187
+ </p>
188
+ <p class="codebox">vcf-query file.vcf.gz 1:10327-10330</p>
189
+ </div>
190
+
191
+
192
+
193
+ <div class="item">
194
+ <a name="shuffle" class="Q">vcf-shuffle-cols</a>
195
+ <p>Reorder columns</p>
196
+ <p class="codebox"><a href="perl_module.html#vcf-shuffle-cols">vcf-shuffle-cols</a> -t template.vcf.gz file.vcf.gz > out.vcf
197
+ </p>
198
+ </div>
199
+
200
+
201
+ <div class="item">
202
+ <a name="vcf-sort" class="Q">vcf-sort</a>
203
+ <p>Sort a VCF file.
204
+ </p>
205
+ <p class="codebox">vcf-sort file.vcf.gz</p>
206
+ </div>
207
+
208
+
209
+ <div class="item">
210
+ <a name="vcf-stats" class="Q">vcf-stats</a>
211
+ <p>Outputs some basic statistics: the number of SNPs, indels, etc.
212
+ </p>
213
+ <p class="codebox">vcf-stats file.vcf.gz</p>
214
+ </div>
215
+
216
+
217
+ <div class="item">
218
+ <a name="vcf-subset" class="Q">vcf-subset</a>
219
+ <p>Remove some columns from the VCF file.
220
+ </p>
221
+ <p class="codebox">vcf-subset -c NA0001,NA0002 file.vcf.gz | bgzip -c &gt; out.vcf.gz</p>
222
+ </div>
223
+
224
+
225
+ <div class="item">
226
+ <a name="vcf-to-tab" class="Q">vcf-to-tab</a>
227
+ <p>A simple script which converts the VCF file into a tab-delimited text file listing the
228
+ actual variants instead of ALT indexes.
229
+ </p>
230
+ <p class="codebox">zcat file.vcf.gz | vcf-to-tab &gt; out.tab</p>
231
+ </div>
232
+
233
+
234
+ <div class="item">
235
+ <a name="vcf-validator" class="Q">vcf-validator</a>
236
+ <p>
237
+ </p>
238
+ <p class="codebox">vcf-validator file.vcf.gz</p>
239
+ </div>
240
+
241
+
242
+ <div class="item">
243
+ <a name="Vcf.pm" class="Q">Vcf.pm</a>
244
+ <p>For examples how to use the Perl API, it is best to look at some of the simpler scripts,
245
+ for example <span class="cmd">vcf-to-tab</span>. The detailed documentation can be obtained by running</p>
246
+ <p class="codebox">perldoc Vcf.pm</p>
247
+ </div>
248
+
249
+
@@ -0,0 +1,18 @@
1
+
2
+ <div class="item">
3
+ <h1>VCF (Variant Call Format) specification</h1>
4
+ <ul>
5
+ <li><a href="http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-40">VCF format v4.0</a></li>
6
+ <li><a href="http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/VCF%20%28Variant%20Call%20Format%29%20version%204.0/encoding-structural-variants">VCF and structural variants</a></li>
7
+ <li><a href="http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-41">VCF format v4.1</a></li>
8
+ </ul>
9
+ <br>
10
+ <ul>
11
+ <li><a href="VCF-poster.pdf">VCF poster</a></li>
12
+ <li><A href="https://lists.sourceforge.net/lists/listinfo/vcftools-spec">VCFtools-spec</a> - Low traffic mailing list intended for VCF format related
13
+ discussions, such as clarifications of the current format version or
14
+ proposals of changes to the specification.
15
+ </li>
16
+ </ul>
17
+ </div>
18
+
data/lib/config.ru ADDED
@@ -0,0 +1,9 @@
1
+ require 'rubygems'
2
+
3
+ $:.unshift File.join(File.dirname(__FILE__), "../lib")
4
+ require 'ngs_server'
5
+
6
+
7
+
8
+ run MyNgsServer
9
+ #NgsServer.run!
@@ -0,0 +1,9 @@
1
+
2
+
3
+ def ngsadd(source_path)
4
+ source_path = File.absolute_path(source_path)
5
+ file_name = File.basename(source_path)
6
+ data_dir_path = File.join(File.dirname(__FILE__),'../../data', file_name)
7
+ `ln -s #{source_path} #{data_dir_path}`
8
+ end
9
+
@@ -1,3 +1,3 @@
1
1
  module NgsServer
2
- VERSION = "0.1"
2
+ VERSION = "0.2"
3
3
  end
data/lib/ngs_server.rb CHANGED
@@ -1,3 +1,55 @@
1
- module NgsServer
2
- # Your code goes here...
3
- end
1
+ require 'rubygems'
2
+ require 'sinatra'
3
+ require 'sinatra/base'
4
+
5
+
6
+ class MyNgsServer < Sinatra::Base
7
+ set :server, 'thin'
8
+ #set :run, true
9
+ #set :public, '.'
10
+ # set :port, opts[:port]
11
+ #set :port, 4569
12
+ # set :daemonize, opts[:daemonize]
13
+ # set :daemonize, true
14
+
15
+ gempath = File.join(File.dirname(__FILE__), "../")
16
+ datapath = File.join(gempath, 'data')
17
+ bamtools_path = "#{gempath}/ext/bamtools/bin/bamtools"
18
+ vcftools_path = "#{gempath}/ext/vcftools/bin/vcf-query"
19
+
20
+
21
+ get '/json/bam/*' do |path|
22
+
23
+ content_type :json
24
+ response['Access-Control-Allow-Origin'] = '*';
25
+
26
+ # invoke with eg: base_url/json/bam/file=subset22-sorted.bam?min=30000000&max=30010000&segment=22
27
+ json = `#{bamtools_path} convert -in #{datapath}/#{path} -format json -region #{params["segment"]}:#{params["min"]}..#{params["max"]}`
28
+ json
29
+
30
+ end
31
+
32
+ get '/json/vcf/*' do |path|
33
+
34
+ content_type :json
35
+ response['Access-Control-Allow-Origin'] = '*';
36
+
37
+ # invoke with eg: base_url/json/vcf/file=ALL.2of4intersection.20100804.sites.vcf.gz?min=6992179&max=6992190&segment=1
38
+ json = `#{vcftools_path} #{datapath}/#{path} #{params["segment"]}:#{params["min"]}-#{params["max"]} -f '{"reference":"%CHROM","position":%POS,"ref":"%REF","alt":"%ALT","info":%INFO},'`
39
+ json
40
+
41
+ end
42
+
43
+ get '/json/sources/:extension' do
44
+
45
+ content_type :json
46
+ response['Access-Control-Allow-Origin'] = '*';
47
+
48
+ # invoke with eg: base_url/json/vcf/file=ALL.2of4intersection.20100804.sites.vcf.gz?min=6992179&max=6992190&segment=1
49
+ list = `find -L #{datapath} -name *#{params['extension']} | awk -F/ '{ for(i=2; i<NF; i++) {printf("%s/", $i)} print $NF }'`
50
+ list
51
+
52
+ end
53
+
54
+ end
55
+
data/ngs_server.gemspec CHANGED
@@ -4,13 +4,16 @@ require "ngs_server/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "ngs_server"
7
- s.version = NgsServer::VERSION
7
+ s.version = "0.2"
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Chase Miller"]
10
10
  s.email = ["chmille4@gmail.com"]
11
11
  s.homepage = ""
12
12
  s.summary = %q{"Ultra Lightweight NGS Data Server"}
13
13
  s.description = %q{"Converts BAM/VCF files into JSON for consumption by web apps"}
14
+ s.add_dependency('sinatra', '>= 1.2')
15
+ s.add_dependency('thin', '>= 1.2')
16
+ s.add_dependency('rack', '>= 1')
14
17
 
15
18
  s.rubyforge_project = "ngs_server"
16
19
 
@@ -18,6 +21,6 @@ Gem::Specification.new do |s|
18
21
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
22
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
23
  # s.executables = "bin/ngs_"
21
- s.extensions = ["ext/bamtools/extconf.rb"]
24
+ s.extensions = ["ext/bamtools/extconf.rb", "ext/vcftools/extconf.rb"]
22
25
  s.require_paths = ["lib"]
23
26
  end