ngs_server 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- 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,107 @@
|
|
1
|
+
/*
|
2
|
+
* vcftools.cpp
|
3
|
+
*
|
4
|
+
* Created on: Aug 19, 2009
|
5
|
+
* Author: Adam Auton
|
6
|
+
* ($Revision: 249 $)
|
7
|
+
*/
|
8
|
+
#include "vcftools.h"
|
9
|
+
|
10
|
+
ofstream LOG;
|
11
|
+
|
12
|
+
int main(int argc, char *argv[])
|
13
|
+
{
|
14
|
+
time_t start,end;
|
15
|
+
time(&start);
|
16
|
+
|
17
|
+
// The following turns off sync between C and C++ streams.
|
18
|
+
// Apparently it's faster to turn sync off, and as I don't use C streams, it's okay to turn off.
|
19
|
+
ios_base::sync_with_stdio(false);
|
20
|
+
|
21
|
+
parameters params(argc, argv);
|
22
|
+
params.print_help();
|
23
|
+
params.read_parameters();
|
24
|
+
|
25
|
+
LOG.open((params.output_prefix + ".log").c_str());
|
26
|
+
|
27
|
+
printLOG("\nVCFtools - " + VCFTOOLS_VERSION + "\n");
|
28
|
+
printLOG("(C) Adam Auton 2009\n\n");
|
29
|
+
|
30
|
+
params.print_params();
|
31
|
+
|
32
|
+
vcf_file vcf(params.vcf_filename, params.vcf_compressed, params.chr_to_keep, params.chr_to_exclude, params.force_write_index);
|
33
|
+
|
34
|
+
// Apply various filters as required.
|
35
|
+
vcf.apply_filters(params);
|
36
|
+
|
37
|
+
unsigned int N_indv = vcf.N_kept_individuals();
|
38
|
+
unsigned int N_sites = vcf.N_kept_sites();
|
39
|
+
printLOG("After filtering, kept " + int2str(N_indv) + " out of " + int2str(vcf.N_indv) + " Individuals\n");
|
40
|
+
printLOG("After filtering, kept " + int2str(N_sites) + " out of a possible " + int2str(vcf.N_entries) + " Sites\n");
|
41
|
+
if (N_sites == 0)
|
42
|
+
error("No data left for analysis!");
|
43
|
+
|
44
|
+
if (params.diff_file != "")
|
45
|
+
{ // Merge files - cannot be run with other output options.
|
46
|
+
vcf_file vcf_diff(params.diff_file, params.diff_file_compressed, params.chr_to_keep, params.chr_to_exclude, params.force_write_index);
|
47
|
+
vcf_diff.apply_filters(params); // Apply various filters as required.
|
48
|
+
vcf.output_indv_in_files(params.output_prefix, vcf_diff);
|
49
|
+
vcf.output_sites_in_files(params.output_prefix, vcf_diff);
|
50
|
+
|
51
|
+
if (params.diff_site_discordance == true) vcf.output_discordance_by_site(params.output_prefix, vcf_diff);
|
52
|
+
if (params.diff_discordance_matrix == true) vcf.output_discordance_matrix(params.output_prefix, vcf_diff);
|
53
|
+
if (params.diff_indv_discordance == true) vcf.output_discordance_by_indv(params.output_prefix, vcf_diff);
|
54
|
+
if (params.diff_switch_error == true) vcf.output_switch_error(params.output_prefix, vcf_diff);
|
55
|
+
}
|
56
|
+
|
57
|
+
vcf.output_INFO_for_each_site(params.output_prefix, params.INFO_to_extract);
|
58
|
+
vcf.output_FORMAT_information(params.output_prefix, params.FORMAT_id_to_extract);
|
59
|
+
if (params.output_indv_depth == true) vcf.output_individuals_by_mean_depth(params.output_prefix);
|
60
|
+
if (params.output_geno_depth == true) vcf.output_genotype_depth(params.output_prefix);
|
61
|
+
if (params.output_site_depth == true) vcf.output_site_depth(params.output_prefix, false);
|
62
|
+
if (params.output_site_mean_depth == true) vcf.output_site_depth(params.output_prefix, true);
|
63
|
+
if (params.output_freq == true) vcf.output_frequency(params.output_prefix, false, params.suppress_allele_output);
|
64
|
+
if (params.output_counts == true) vcf.output_frequency(params.output_prefix, true, params.suppress_allele_output);
|
65
|
+
if (params.plink_output == true) vcf.output_as_plink(params.output_prefix);
|
66
|
+
if (params.plink_tped_output == true) vcf.output_as_plink_tped(params.output_prefix);
|
67
|
+
if (params.output_HWE == true) vcf.output_hwe(params.output_prefix);
|
68
|
+
if (params.output_SNP_density_bin_size > 0) vcf.output_SNP_density(params.output_prefix, params.output_SNP_density_bin_size);
|
69
|
+
if (params.output_missingness == true) vcf.output_missingness(params.output_prefix);
|
70
|
+
if (params.output_geno_rsq == true) vcf.output_genotype_r2(params.output_prefix, params.ld_snp_window_size, params.ld_bp_window_size, params.min_r2);
|
71
|
+
if (params.output_interchromosomal_rsq == true) vcf.output_interchromosomal_genotype_r2(params.output_prefix, params.min_r2);
|
72
|
+
if (params.output_hap_rsq == true) vcf.output_haplotype_r2(params.output_prefix, params.ld_snp_window_size, params.ld_bp_window_size, params.min_r2);
|
73
|
+
if (params.output_het == true) vcf.output_het(params.output_prefix);
|
74
|
+
if (params.output_site_quality == true) vcf.output_site_quality(params.output_prefix);
|
75
|
+
if (params.output_012_matrix == true) vcf.output_as_012_matrix(params.output_prefix);
|
76
|
+
if (params.output_as_IMPUTE == true) vcf.output_as_IMPUTE(params.output_prefix);
|
77
|
+
if (params.output_BEAGLE_genotype_likelihoods == true) vcf.output_BEAGLE_genotype_likelihoods(params.output_prefix);
|
78
|
+
if (params.output_as_ldhat_unphased == true) vcf.output_as_LDhat_unphased(params.output_prefix, params.chr_to_keep);
|
79
|
+
if (params.output_as_ldhat_phased == true) vcf.output_as_LDhat_phased(params.output_prefix, params.chr_to_keep);
|
80
|
+
if (params.output_singletons == true) vcf.output_singletons(params.output_prefix);
|
81
|
+
if (params.output_site_pi == true) vcf.output_per_site_nucleotide_diversity(params.output_prefix);
|
82
|
+
if (params.pi_window_size > 0) vcf.output_windowed_nucleotide_diversity(params.output_prefix, params.pi_window_size);
|
83
|
+
if (params.output_Tajima_D_bin_size > 0) vcf.output_Tajima_D(params.output_prefix, params.output_Tajima_D_bin_size);
|
84
|
+
if (params.output_TsTv_bin_size > 0) vcf.output_TsTv(params.output_prefix, params.output_TsTv_bin_size);
|
85
|
+
if (params.output_TsTv_by_count) vcf.output_TsTv_by_count(params.output_prefix);
|
86
|
+
if (params.output_TsTv_by_qual) vcf.output_TsTv_by_quality(params.output_prefix);
|
87
|
+
if (params.recode == true) vcf.print(params.output_prefix, params.recode_INFO_to_keep, params.recode_all_INFO);
|
88
|
+
if (params.output_filter_summary == true) vcf.output_FILTER_summary(params.output_prefix);
|
89
|
+
if (params.output_filtered_sites == true) vcf.output_kept_and_removed_sites(params.output_prefix);
|
90
|
+
if (params.output_LROH == true) vcf.output_LROH(params.output_prefix);
|
91
|
+
if (params.output_relatedness == true) vcf.output_indv_relatedness(params.output_prefix);
|
92
|
+
if (params.output_PCA == true) vcf.output_PCA(params.output_prefix, !params.PCA_no_normalisation, params.output_N_PCA_SNP_loadings);
|
93
|
+
if (params.fst_populations.size() > 0) vcf.output_fst_version_2(params.output_prefix, params.fst_populations);
|
94
|
+
|
95
|
+
if (params.fst_file != "")
|
96
|
+
{
|
97
|
+
vcf_file vcf_fst(params.fst_file, params.fst_file_compressed, params.chr_to_keep);
|
98
|
+
vcf_fst.apply_filters(params); // Apply various filters as required.
|
99
|
+
vcf.output_fst(params.output_prefix, vcf_fst);
|
100
|
+
}
|
101
|
+
|
102
|
+
time(&end);
|
103
|
+
double running_time = difftime(end,start);
|
104
|
+
printLOG("Run Time = " + dbl2str_fixed(running_time, 2) + " seconds\n");
|
105
|
+
LOG.close();
|
106
|
+
return 0;
|
107
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
/*
|
2
|
+
* vcftools.h
|
3
|
+
*
|
4
|
+
* Created on: Aug 19, 2009
|
5
|
+
* Author: Adam Auton
|
6
|
+
* ($Revision: 122 $)
|
7
|
+
*/
|
8
|
+
|
9
|
+
#ifndef VCFTOOLS_H_
|
10
|
+
#define VCFTOOLS_H_
|
11
|
+
|
12
|
+
#include <cstring>
|
13
|
+
#include <ctime>
|
14
|
+
#include <iostream>
|
15
|
+
#include <limits>
|
16
|
+
#include <string>
|
17
|
+
#include <vector>
|
18
|
+
|
19
|
+
#include "output_log.h"
|
20
|
+
#include "parameters.h"
|
21
|
+
#include "vcf_file.h"
|
22
|
+
|
23
|
+
using namespace std;
|
24
|
+
|
25
|
+
#endif/* VCFTOOLS_H_ */
|
@@ -0,0 +1,185 @@
|
|
1
|
+
K 25
|
2
|
+
svn:wc:ra_dav:version-url
|
3
|
+
V 39
|
4
|
+
/svnroot/vcftools/!svn/ver/601/examples
|
5
|
+
END
|
6
|
+
annotate.out
|
7
|
+
K 25
|
8
|
+
svn:wc:ra_dav:version-url
|
9
|
+
V 52
|
10
|
+
/svnroot/vcftools/!svn/ver/565/examples/annotate.out
|
11
|
+
END
|
12
|
+
perl-api-1.pl
|
13
|
+
K 25
|
14
|
+
svn:wc:ra_dav:version-url
|
15
|
+
V 53
|
16
|
+
/svnroot/vcftools/!svn/ver/415/examples/perl-api-1.pl
|
17
|
+
END
|
18
|
+
subset.vcf
|
19
|
+
K 25
|
20
|
+
svn:wc:ra_dav:version-url
|
21
|
+
V 50
|
22
|
+
/svnroot/vcftools/!svn/ver/348/examples/subset.vcf
|
23
|
+
END
|
24
|
+
shuffle-test.vcf
|
25
|
+
K 25
|
26
|
+
svn:wc:ra_dav:version-url
|
27
|
+
V 56
|
28
|
+
/svnroot/vcftools/!svn/ver/403/examples/shuffle-test.vcf
|
29
|
+
END
|
30
|
+
cmp-test-a.vcf
|
31
|
+
K 25
|
32
|
+
svn:wc:ra_dav:version-url
|
33
|
+
V 54
|
34
|
+
/svnroot/vcftools/!svn/ver/397/examples/cmp-test-a.vcf
|
35
|
+
END
|
36
|
+
annotate.txt
|
37
|
+
K 25
|
38
|
+
svn:wc:ra_dav:version-url
|
39
|
+
V 52
|
40
|
+
/svnroot/vcftools/!svn/ver/565/examples/annotate.txt
|
41
|
+
END
|
42
|
+
cmp-test-b.vcf
|
43
|
+
K 25
|
44
|
+
svn:wc:ra_dav:version-url
|
45
|
+
V 54
|
46
|
+
/svnroot/vcftools/!svn/ver/397/examples/cmp-test-b.vcf
|
47
|
+
END
|
48
|
+
cmp-test-a-3.3.vcf
|
49
|
+
K 25
|
50
|
+
svn:wc:ra_dav:version-url
|
51
|
+
V 58
|
52
|
+
/svnroot/vcftools/!svn/ver/397/examples/cmp-test-a-3.3.vcf
|
53
|
+
END
|
54
|
+
query-test.out
|
55
|
+
K 25
|
56
|
+
svn:wc:ra_dav:version-url
|
57
|
+
V 54
|
58
|
+
/svnroot/vcftools/!svn/ver/325/examples/query-test.out
|
59
|
+
END
|
60
|
+
subset.indels.out
|
61
|
+
K 25
|
62
|
+
svn:wc:ra_dav:version-url
|
63
|
+
V 57
|
64
|
+
/svnroot/vcftools/!svn/ver/348/examples/subset.indels.out
|
65
|
+
END
|
66
|
+
cmp-test-b-3.3.vcf
|
67
|
+
K 25
|
68
|
+
svn:wc:ra_dav:version-url
|
69
|
+
V 58
|
70
|
+
/svnroot/vcftools/!svn/ver/397/examples/cmp-test-b-3.3.vcf
|
71
|
+
END
|
72
|
+
subset.SNPs.out
|
73
|
+
K 25
|
74
|
+
svn:wc:ra_dav:version-url
|
75
|
+
V 55
|
76
|
+
/svnroot/vcftools/!svn/ver/348/examples/subset.SNPs.out
|
77
|
+
END
|
78
|
+
merge-test.vcf.out
|
79
|
+
K 25
|
80
|
+
svn:wc:ra_dav:version-url
|
81
|
+
V 58
|
82
|
+
/svnroot/vcftools/!svn/ver/560/examples/merge-test.vcf.out
|
83
|
+
END
|
84
|
+
isec-n2-test.vcf.out
|
85
|
+
K 25
|
86
|
+
svn:wc:ra_dav:version-url
|
87
|
+
V 60
|
88
|
+
/svnroot/vcftools/!svn/ver/486/examples/isec-n2-test.vcf.out
|
89
|
+
END
|
90
|
+
annotate2.out
|
91
|
+
K 25
|
92
|
+
svn:wc:ra_dav:version-url
|
93
|
+
V 53
|
94
|
+
/svnroot/vcftools/!svn/ver/601/examples/annotate2.out
|
95
|
+
END
|
96
|
+
invalid-4.0.vcf
|
97
|
+
K 25
|
98
|
+
svn:wc:ra_dav:version-url
|
99
|
+
V 55
|
100
|
+
/svnroot/vcftools/!svn/ver/270/examples/invalid-4.0.vcf
|
101
|
+
END
|
102
|
+
concat-a.vcf
|
103
|
+
K 25
|
104
|
+
svn:wc:ra_dav:version-url
|
105
|
+
V 52
|
106
|
+
/svnroot/vcftools/!svn/ver/565/examples/concat-a.vcf
|
107
|
+
END
|
108
|
+
cmp-test.out
|
109
|
+
K 25
|
110
|
+
svn:wc:ra_dav:version-url
|
111
|
+
V 52
|
112
|
+
/svnroot/vcftools/!svn/ver/596/examples/cmp-test.out
|
113
|
+
END
|
114
|
+
annotate3.out
|
115
|
+
K 25
|
116
|
+
svn:wc:ra_dav:version-url
|
117
|
+
V 53
|
118
|
+
/svnroot/vcftools/!svn/ver/565/examples/annotate3.out
|
119
|
+
END
|
120
|
+
concat-b.vcf
|
121
|
+
K 25
|
122
|
+
svn:wc:ra_dav:version-url
|
123
|
+
V 52
|
124
|
+
/svnroot/vcftools/!svn/ver/342/examples/concat-b.vcf
|
125
|
+
END
|
126
|
+
annotate-test.vcf
|
127
|
+
K 25
|
128
|
+
svn:wc:ra_dav:version-url
|
129
|
+
V 57
|
130
|
+
/svnroot/vcftools/!svn/ver/466/examples/annotate-test.vcf
|
131
|
+
END
|
132
|
+
concat-c.vcf
|
133
|
+
K 25
|
134
|
+
svn:wc:ra_dav:version-url
|
135
|
+
V 52
|
136
|
+
/svnroot/vcftools/!svn/ver/342/examples/concat-c.vcf
|
137
|
+
END
|
138
|
+
merge-test-a.vcf
|
139
|
+
K 25
|
140
|
+
svn:wc:ra_dav:version-url
|
141
|
+
V 56
|
142
|
+
/svnroot/vcftools/!svn/ver/486/examples/merge-test-a.vcf
|
143
|
+
END
|
144
|
+
merge-test-b.vcf
|
145
|
+
K 25
|
146
|
+
svn:wc:ra_dav:version-url
|
147
|
+
V 56
|
148
|
+
/svnroot/vcftools/!svn/ver/486/examples/merge-test-b.vcf
|
149
|
+
END
|
150
|
+
valid-4.0.vcf.stats
|
151
|
+
K 25
|
152
|
+
svn:wc:ra_dav:version-url
|
153
|
+
V 59
|
154
|
+
/svnroot/vcftools/!svn/ver/601/examples/valid-4.0.vcf.stats
|
155
|
+
END
|
156
|
+
merge-test-c.vcf
|
157
|
+
K 25
|
158
|
+
svn:wc:ra_dav:version-url
|
159
|
+
V 56
|
160
|
+
/svnroot/vcftools/!svn/ver/325/examples/merge-test-c.vcf
|
161
|
+
END
|
162
|
+
valid-4.0.vcf
|
163
|
+
K 25
|
164
|
+
svn:wc:ra_dav:version-url
|
165
|
+
V 53
|
166
|
+
/svnroot/vcftools/!svn/ver/549/examples/valid-4.0.vcf
|
167
|
+
END
|
168
|
+
valid-4.1.vcf
|
169
|
+
K 25
|
170
|
+
svn:wc:ra_dav:version-url
|
171
|
+
V 53
|
172
|
+
/svnroot/vcftools/!svn/ver/596/examples/valid-4.1.vcf
|
173
|
+
END
|
174
|
+
concat.out
|
175
|
+
K 25
|
176
|
+
svn:wc:ra_dav:version-url
|
177
|
+
V 50
|
178
|
+
/svnroot/vcftools/!svn/ver/565/examples/concat.out
|
179
|
+
END
|
180
|
+
valid-3.3.vcf
|
181
|
+
K 25
|
182
|
+
svn:wc:ra_dav:version-url
|
183
|
+
V 53
|
184
|
+
/svnroot/vcftools/!svn/ver/234/examples/valid-3.3.vcf
|
185
|
+
END
|