ngs_server 0.1 → 0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/ngs_server +72 -50
- data/ext/bamtools/extconf.rb +3 -3
- data/ext/vcftools/Makefile +28 -0
- data/ext/vcftools/README.txt +36 -0
- data/ext/vcftools/cpp/.svn/all-wcprops +125 -0
- data/ext/vcftools/cpp/.svn/dir-prop-base +6 -0
- data/ext/vcftools/cpp/.svn/entries +708 -0
- data/ext/vcftools/cpp/.svn/text-base/Makefile.svn-base +46 -0
- data/ext/vcftools/cpp/.svn/text-base/dgeev.cpp.svn-base +146 -0
- data/ext/vcftools/cpp/.svn/text-base/dgeev.h.svn-base +43 -0
- data/ext/vcftools/cpp/.svn/text-base/output_log.cpp.svn-base +79 -0
- data/ext/vcftools/cpp/.svn/text-base/output_log.h.svn-base +34 -0
- data/ext/vcftools/cpp/.svn/text-base/parameters.cpp.svn-base +535 -0
- data/ext/vcftools/cpp/.svn/text-base/parameters.h.svn-base +154 -0
- data/ext/vcftools/cpp/.svn/text-base/vcf_entry.cpp.svn-base +497 -0
- data/ext/vcftools/cpp/.svn/text-base/vcf_entry.h.svn-base +190 -0
- data/ext/vcftools/cpp/.svn/text-base/vcf_entry_getters.cpp.svn-base +421 -0
- data/ext/vcftools/cpp/.svn/text-base/vcf_entry_setters.cpp.svn-base +482 -0
- data/ext/vcftools/cpp/.svn/text-base/vcf_file.cpp.svn-base +495 -0
- data/ext/vcftools/cpp/.svn/text-base/vcf_file.h.svn-base +184 -0
- data/ext/vcftools/cpp/.svn/text-base/vcf_file_diff.cpp.svn-base +1282 -0
- data/ext/vcftools/cpp/.svn/text-base/vcf_file_filters.cpp.svn-base +1215 -0
- data/ext/vcftools/cpp/.svn/text-base/vcf_file_format_convert.cpp.svn-base +1138 -0
- data/ext/vcftools/cpp/.svn/text-base/vcf_file_index.cpp.svn-base +171 -0
- data/ext/vcftools/cpp/.svn/text-base/vcf_file_output.cpp.svn-base +3012 -0
- data/ext/vcftools/cpp/.svn/text-base/vcftools.cpp.svn-base +107 -0
- data/ext/vcftools/cpp/.svn/text-base/vcftools.h.svn-base +25 -0
- data/ext/vcftools/cpp/Makefile +46 -0
- data/ext/vcftools/cpp/dgeev.cpp +146 -0
- data/ext/vcftools/cpp/dgeev.h +43 -0
- data/ext/vcftools/cpp/output_log.cpp +79 -0
- data/ext/vcftools/cpp/output_log.h +34 -0
- data/ext/vcftools/cpp/parameters.cpp +535 -0
- data/ext/vcftools/cpp/parameters.h +154 -0
- data/ext/vcftools/cpp/vcf_entry.cpp +497 -0
- data/ext/vcftools/cpp/vcf_entry.h +190 -0
- data/ext/vcftools/cpp/vcf_entry_getters.cpp +421 -0
- data/ext/vcftools/cpp/vcf_entry_setters.cpp +482 -0
- data/ext/vcftools/cpp/vcf_file.cpp +495 -0
- data/ext/vcftools/cpp/vcf_file.h +184 -0
- data/ext/vcftools/cpp/vcf_file_diff.cpp +1282 -0
- data/ext/vcftools/cpp/vcf_file_filters.cpp +1215 -0
- data/ext/vcftools/cpp/vcf_file_format_convert.cpp +1138 -0
- data/ext/vcftools/cpp/vcf_file_index.cpp +171 -0
- data/ext/vcftools/cpp/vcf_file_output.cpp +3012 -0
- data/ext/vcftools/cpp/vcftools.cpp +107 -0
- data/ext/vcftools/cpp/vcftools.h +25 -0
- data/ext/vcftools/examples/.svn/all-wcprops +185 -0
- data/ext/vcftools/examples/.svn/dir-prop-base +6 -0
- data/ext/vcftools/examples/.svn/entries +1048 -0
- data/ext/vcftools/examples/.svn/prop-base/perl-api-1.pl.svn-base +5 -0
- data/ext/vcftools/examples/.svn/text-base/annotate-test.vcf.svn-base +37 -0
- data/ext/vcftools/examples/.svn/text-base/annotate.out.svn-base +23 -0
- data/ext/vcftools/examples/.svn/text-base/annotate.txt.svn-base +7 -0
- data/ext/vcftools/examples/.svn/text-base/annotate2.out.svn-base +52 -0
- data/ext/vcftools/examples/.svn/text-base/annotate3.out.svn-base +23 -0
- data/ext/vcftools/examples/.svn/text-base/cmp-test-a-3.3.vcf.svn-base +12 -0
- data/ext/vcftools/examples/.svn/text-base/cmp-test-a.vcf.svn-base +12 -0
- data/ext/vcftools/examples/.svn/text-base/cmp-test-b-3.3.vcf.svn-base +12 -0
- data/ext/vcftools/examples/.svn/text-base/cmp-test-b.vcf.svn-base +12 -0
- data/ext/vcftools/examples/.svn/text-base/cmp-test.out.svn-base +53 -0
- data/ext/vcftools/examples/.svn/text-base/concat-a.vcf.svn-base +21 -0
- data/ext/vcftools/examples/.svn/text-base/concat-b.vcf.svn-base +13 -0
- data/ext/vcftools/examples/.svn/text-base/concat-c.vcf.svn-base +19 -0
- data/ext/vcftools/examples/.svn/text-base/concat.out.svn-base +39 -0
- data/ext/vcftools/examples/.svn/text-base/invalid-4.0.vcf.svn-base +31 -0
- data/ext/vcftools/examples/.svn/text-base/isec-n2-test.vcf.out.svn-base +19 -0
- data/ext/vcftools/examples/.svn/text-base/merge-test-a.vcf.svn-base +17 -0
- data/ext/vcftools/examples/.svn/text-base/merge-test-b.vcf.svn-base +17 -0
- data/ext/vcftools/examples/.svn/text-base/merge-test-c.vcf.svn-base +15 -0
- data/ext/vcftools/examples/.svn/text-base/merge-test.vcf.out.svn-base +31 -0
- data/ext/vcftools/examples/.svn/text-base/perl-api-1.pl.svn-base +46 -0
- data/ext/vcftools/examples/.svn/text-base/query-test.out.svn-base +6 -0
- data/ext/vcftools/examples/.svn/text-base/shuffle-test.vcf.svn-base +12 -0
- data/ext/vcftools/examples/.svn/text-base/subset.SNPs.out.svn-base +10 -0
- data/ext/vcftools/examples/.svn/text-base/subset.indels.out.svn-base +18 -0
- data/ext/vcftools/examples/.svn/text-base/subset.vcf.svn-base +21 -0
- data/ext/vcftools/examples/.svn/text-base/valid-3.3.vcf.svn-base +30 -0
- data/ext/vcftools/examples/.svn/text-base/valid-4.0.vcf.stats.svn-base +104 -0
- data/ext/vcftools/examples/.svn/text-base/valid-4.0.vcf.svn-base +34 -0
- data/ext/vcftools/examples/.svn/text-base/valid-4.1.vcf.svn-base +37 -0
- data/ext/vcftools/examples/annotate-test.vcf +37 -0
- data/ext/vcftools/examples/annotate.out +23 -0
- data/ext/vcftools/examples/annotate.txt +7 -0
- data/ext/vcftools/examples/annotate2.out +52 -0
- data/ext/vcftools/examples/annotate3.out +23 -0
- data/ext/vcftools/examples/cmp-test-a-3.3.vcf +12 -0
- data/ext/vcftools/examples/cmp-test-a.vcf +12 -0
- data/ext/vcftools/examples/cmp-test-b-3.3.vcf +12 -0
- data/ext/vcftools/examples/cmp-test-b.vcf +12 -0
- data/ext/vcftools/examples/cmp-test.out +53 -0
- data/ext/vcftools/examples/concat-a.vcf +21 -0
- data/ext/vcftools/examples/concat-b.vcf +13 -0
- data/ext/vcftools/examples/concat-c.vcf +19 -0
- data/ext/vcftools/examples/concat.out +39 -0
- data/ext/vcftools/examples/invalid-4.0.vcf +31 -0
- data/ext/vcftools/examples/isec-n2-test.vcf.out +19 -0
- data/ext/vcftools/examples/merge-test-a.vcf +17 -0
- data/ext/vcftools/examples/merge-test-b.vcf +17 -0
- data/ext/vcftools/examples/merge-test-c.vcf +15 -0
- data/ext/vcftools/examples/merge-test.vcf.out +31 -0
- data/ext/vcftools/examples/perl-api-1.pl +46 -0
- data/ext/vcftools/examples/query-test.out +6 -0
- data/ext/vcftools/examples/shuffle-test.vcf +12 -0
- data/ext/vcftools/examples/subset.SNPs.out +10 -0
- data/ext/vcftools/examples/subset.indels.out +18 -0
- data/ext/vcftools/examples/subset.vcf +21 -0
- data/ext/vcftools/examples/valid-3.3.vcf +30 -0
- data/ext/vcftools/examples/valid-4.0.vcf +34 -0
- data/ext/vcftools/examples/valid-4.0.vcf.stats +104 -0
- data/ext/vcftools/examples/valid-4.1.vcf +37 -0
- data/ext/vcftools/extconf.rb +2 -0
- data/ext/vcftools/perl/.svn/all-wcprops +149 -0
- data/ext/vcftools/perl/.svn/entries +844 -0
- data/ext/vcftools/perl/.svn/prop-base/fill-aa.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/fill-an-ac.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/fill-ref-md5.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/tab-to-vcf.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/test.t.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/vcf-annotate.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/vcf-compare.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/vcf-concat.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/vcf-convert.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/vcf-fix-newlines.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/vcf-isec.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/vcf-merge.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/vcf-query.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/vcf-shuffle-cols.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/vcf-sort.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/vcf-stats.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/vcf-subset.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/vcf-to-tab.svn-base +5 -0
- data/ext/vcftools/perl/.svn/prop-base/vcf-validator.svn-base +5 -0
- data/ext/vcftools/perl/.svn/text-base/ChangeLog.svn-base +84 -0
- data/ext/vcftools/perl/.svn/text-base/FaSlice.pm.svn-base +214 -0
- data/ext/vcftools/perl/.svn/text-base/Makefile.svn-base +12 -0
- data/ext/vcftools/perl/.svn/text-base/Vcf.pm.svn-base +2853 -0
- data/ext/vcftools/perl/.svn/text-base/VcfStats.pm.svn-base +681 -0
- data/ext/vcftools/perl/.svn/text-base/fill-aa.svn-base +103 -0
- data/ext/vcftools/perl/.svn/text-base/fill-an-ac.svn-base +56 -0
- data/ext/vcftools/perl/.svn/text-base/fill-ref-md5.svn-base +204 -0
- data/ext/vcftools/perl/.svn/text-base/tab-to-vcf.svn-base +92 -0
- data/ext/vcftools/perl/.svn/text-base/test.t.svn-base +376 -0
- data/ext/vcftools/perl/.svn/text-base/vcf-annotate.svn-base +1099 -0
- data/ext/vcftools/perl/.svn/text-base/vcf-compare.svn-base +1193 -0
- data/ext/vcftools/perl/.svn/text-base/vcf-concat.svn-base +310 -0
- data/ext/vcftools/perl/.svn/text-base/vcf-convert.svn-base +180 -0
- data/ext/vcftools/perl/.svn/text-base/vcf-fix-newlines.svn-base +97 -0
- data/ext/vcftools/perl/.svn/text-base/vcf-isec.svn-base +660 -0
- data/ext/vcftools/perl/.svn/text-base/vcf-merge.svn-base +577 -0
- data/ext/vcftools/perl/.svn/text-base/vcf-query.svn-base +272 -0
- data/ext/vcftools/perl/.svn/text-base/vcf-shuffle-cols.svn-base +89 -0
- data/ext/vcftools/perl/.svn/text-base/vcf-sort.svn-base +79 -0
- data/ext/vcftools/perl/.svn/text-base/vcf-stats.svn-base +160 -0
- data/ext/vcftools/perl/.svn/text-base/vcf-subset.svn-base +206 -0
- data/ext/vcftools/perl/.svn/text-base/vcf-to-tab.svn-base +112 -0
- data/ext/vcftools/perl/.svn/text-base/vcf-validator.svn-base +145 -0
- data/ext/vcftools/perl/ChangeLog +84 -0
- data/ext/vcftools/perl/FaSlice.pm +214 -0
- data/ext/vcftools/perl/Makefile +12 -0
- data/ext/vcftools/perl/Vcf.pm +2853 -0
- data/ext/vcftools/perl/VcfStats.pm +681 -0
- data/ext/vcftools/perl/fill-aa +103 -0
- data/ext/vcftools/perl/fill-an-ac +56 -0
- data/ext/vcftools/perl/fill-ref-md5 +204 -0
- data/ext/vcftools/perl/tab-to-vcf +92 -0
- data/ext/vcftools/perl/test.t +376 -0
- data/ext/vcftools/perl/vcf-annotate +1099 -0
- data/ext/vcftools/perl/vcf-compare +1193 -0
- data/ext/vcftools/perl/vcf-concat +310 -0
- data/ext/vcftools/perl/vcf-convert +180 -0
- data/ext/vcftools/perl/vcf-fix-newlines +97 -0
- data/ext/vcftools/perl/vcf-isec +660 -0
- data/ext/vcftools/perl/vcf-merge +577 -0
- data/ext/vcftools/perl/vcf-query +286 -0
- data/ext/vcftools/perl/vcf-shuffle-cols +89 -0
- data/ext/vcftools/perl/vcf-sort +79 -0
- data/ext/vcftools/perl/vcf-stats +160 -0
- data/ext/vcftools/perl/vcf-subset +206 -0
- data/ext/vcftools/perl/vcf-to-tab +112 -0
- data/ext/vcftools/perl/vcf-validator +145 -0
- data/ext/vcftools/website/.svn/all-wcprops +41 -0
- data/ext/vcftools/website/.svn/entries +238 -0
- data/ext/vcftools/website/.svn/prop-base/VCF-poster.pdf.svn-base +5 -0
- data/ext/vcftools/website/.svn/prop-base/favicon.ico.svn-base +5 -0
- data/ext/vcftools/website/.svn/prop-base/favicon.png.svn-base +5 -0
- data/ext/vcftools/website/.svn/text-base/Makefile.svn-base +6 -0
- data/ext/vcftools/website/.svn/text-base/README.svn-base +2 -0
- data/ext/vcftools/website/.svn/text-base/VCF-poster.pdf.svn-base +0 -0
- data/ext/vcftools/website/.svn/text-base/default.css.svn-base +250 -0
- data/ext/vcftools/website/.svn/text-base/favicon.ico.svn-base +0 -0
- data/ext/vcftools/website/.svn/text-base/favicon.png.svn-base +0 -0
- data/ext/vcftools/website/Makefile +6 -0
- data/ext/vcftools/website/README +2 -0
- data/ext/vcftools/website/VCF-poster.pdf +0 -0
- data/ext/vcftools/website/default.css +250 -0
- data/ext/vcftools/website/favicon.ico +0 -0
- data/ext/vcftools/website/favicon.png +0 -0
- data/ext/vcftools/website/img/.svn/all-wcprops +53 -0
- data/ext/vcftools/website/img/.svn/entries +300 -0
- data/ext/vcftools/website/img/.svn/prop-base/bg.gif.svn-base +5 -0
- data/ext/vcftools/website/img/.svn/prop-base/bgcode.gif.svn-base +5 -0
- data/ext/vcftools/website/img/.svn/prop-base/bgcontainer.gif.svn-base +5 -0
- data/ext/vcftools/website/img/.svn/prop-base/bgul.gif.svn-base +5 -0
- data/ext/vcftools/website/img/.svn/prop-base/header.gif.svn-base +5 -0
- data/ext/vcftools/website/img/.svn/prop-base/li.gif.svn-base +5 -0
- data/ext/vcftools/website/img/.svn/prop-base/quote.gif.svn-base +5 -0
- data/ext/vcftools/website/img/.svn/prop-base/search.gif.svn-base +5 -0
- data/ext/vcftools/website/img/.svn/text-base/bg.gif.svn-base +0 -0
- data/ext/vcftools/website/img/.svn/text-base/bgcode.gif.svn-base +0 -0
- data/ext/vcftools/website/img/.svn/text-base/bgcontainer.gif.svn-base +0 -0
- data/ext/vcftools/website/img/.svn/text-base/bgul.gif.svn-base +0 -0
- data/ext/vcftools/website/img/.svn/text-base/header.gif.svn-base +0 -0
- data/ext/vcftools/website/img/.svn/text-base/li.gif.svn-base +0 -0
- data/ext/vcftools/website/img/.svn/text-base/quote.gif.svn-base +0 -0
- data/ext/vcftools/website/img/.svn/text-base/search.gif.svn-base +0 -0
- data/ext/vcftools/website/img/bg.gif +0 -0
- data/ext/vcftools/website/img/bgcode.gif +0 -0
- data/ext/vcftools/website/img/bgcontainer.gif +0 -0
- data/ext/vcftools/website/img/bgul.gif +0 -0
- data/ext/vcftools/website/img/header.gif +0 -0
- data/ext/vcftools/website/img/li.gif +0 -0
- data/ext/vcftools/website/img/quote.gif +0 -0
- data/ext/vcftools/website/img/search.gif +0 -0
- data/ext/vcftools/website/src/.svn/all-wcprops +53 -0
- data/ext/vcftools/website/src/.svn/entries +300 -0
- data/ext/vcftools/website/src/.svn/text-base/docs.inc.svn-base +202 -0
- data/ext/vcftools/website/src/.svn/text-base/index.inc.svn-base +52 -0
- data/ext/vcftools/website/src/.svn/text-base/index.php.svn-base +80 -0
- data/ext/vcftools/website/src/.svn/text-base/license.inc.svn-base +27 -0
- data/ext/vcftools/website/src/.svn/text-base/links.inc.svn-base +13 -0
- data/ext/vcftools/website/src/.svn/text-base/options.inc.svn-base +654 -0
- data/ext/vcftools/website/src/.svn/text-base/perl_module.inc.svn-base +249 -0
- data/ext/vcftools/website/src/.svn/text-base/specs.inc.svn-base +18 -0
- data/ext/vcftools/website/src/docs.inc +202 -0
- data/ext/vcftools/website/src/index.inc +52 -0
- data/ext/vcftools/website/src/index.php +80 -0
- data/ext/vcftools/website/src/license.inc +27 -0
- data/ext/vcftools/website/src/links.inc +13 -0
- data/ext/vcftools/website/src/options.inc +654 -0
- data/ext/vcftools/website/src/perl_module.inc +249 -0
- data/ext/vcftools/website/src/specs.inc +18 -0
- data/lib/config.ru +9 -0
- data/lib/ngs_server/add.rb +9 -0
- data/lib/ngs_server/version.rb +1 -1
- data/lib/ngs_server.rb +55 -3
- data/ngs_server.gemspec +5 -2
- 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 > 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 > 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
|
+
-d key=INFO,ID=ANN,Number=1,Type=Integer,Description='My custom annotation' \ <br>
|
|
99
|
+
-c CHROM,FROM,TO,INFO/ANN > 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 > 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 > 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 > out.vcf.gz <br>
|
|
166
|
+
vcf-isec -c A.vcf.gz B.vcf.gz C.vcf.gz | bgzip -c > 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 > 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 > 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 > 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
data/lib/ngs_server/version.rb
CHANGED
data/lib/ngs_server.rb
CHANGED
|
@@ -1,3 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 =
|
|
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
|