@@ -890,6 +890,7 @@ int subcmd_genotype_sv(paw::Parser & parser)
890890 std::string sam{};
891891 std::string sams{};
892892 std::string sv_vcf{};
893+ std::string encoding{" vcf" };
893894 bool force_copy_reference{false };
894895 bool force_no_copy_reference{false };
895896 bool see_advanced_options{false };
@@ -1006,6 +1007,12 @@ int subcmd_genotype_sv(paw::Parser & parser)
10061007 " (0-level) in the header. The byte range of these blocks will also be printed in "
10071008 " ${prefix}.samples_byte_range." );
10081009
1010+ parser.parse_advanced_option (encoding, ' ' , " encoding" , " Select output encoding. Available are: vcf, popvcf" );
1011+
1012+ // set default compression level as 9 when popvcf, since level 9 is already very fast anyway in that encoding mode
1013+ if (encoding == " popvcf" )
1014+ opts.bgzf_compression_level = 9 ;
1015+
10091016 // Changed behaviour such that zero qual SVs are not filtered out by default
10101017 if (!force_filter_zero_qual)
10111018 opts.force_no_filter_zero_qual = true ;
@@ -1016,6 +1023,7 @@ int subcmd_genotype_sv(paw::Parser & parser)
10161023 parser.finalize ();
10171024 setup_logger ();
10181025
1026+ opts.encoding = (encoding == " popvcf" ) ? ' p' : ' v' ;
10191027 print_log (gyper::log_severity::info, " Running the 'genotype_sv' subcommand." );
10201028
10211029#ifndef NDEBUG
@@ -1302,20 +1310,31 @@ int subcmd_vcf_concatenate(paw::Parser & parser)
13021310
13031311int subcmd_vcf_merge (paw::Parser & parser)
13041312{
1313+ gyper::Options & opts = *(gyper::Options::instance ());
1314+
13051315 std::vector<std::string> vcfs;
13061316 std::string output_fn;
13071317 std::string file_list;
1318+ std::string encoding{" vcf" };
13081319 bool is_sv_vcf{false };
13091320
13101321 parser.parse_option (output_fn, ' o' , " output" , " Output VCF file name." );
13111322 parser.parse_option (file_list, ' ' , " file_list" , " File containing VCFs to merge." );
13121323 parser.parse_option (is_sv_vcf, ' ' , " sv" , " Set if the input VCFs were generated from genotype_sv." );
1324+ parser.parse_option (encoding, ' ' , " encoding" , " Select output encoding. Available are: vcf, popvcf" );
1325+
1326+ // set default compression level as 9 when popvcf, since level 9 is already very fast anyway in that encoding mode
1327+ if (encoding == " popvcf" )
1328+ opts.bgzf_compression_level = 9 ;
13131329
13141330 parser.parse_remaining_positional_arguments (vcfs, " vcfs..." , " VCFs to merge" );
13151331
13161332 parser.finalize ();
13171333 setup_logger ();
13181334
1335+ opts.encoding = (encoding == " popvcf" ) ? ' p' : ' v' ;
1336+ opts.is_on_final_output = true ;
1337+
13191338 if (is_sv_vcf)
13201339 gyper::graph.is_sv_graph = true ;
13211340
0 commit comments