Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/mcmc_Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ $(TOIL_OS)/$(BASENAME).snarls: $(TOIL_OS)/$(BASENAME).vg

$(TOIL_OS)/$(BASENAME)_$(HAPLO_0)_thread.merge.vg: $(TOIL_OS)/$(BASENAME).vg $(TOIL_OS)/$(BASENAME).gbwt $(TOIL_OS)/$(BASENAME).xg
vg paths -d -v $(TOIL_OS)/$(BASENAME).vg > $(TOIL_OS)/$(BASENAME)_$(HAPLO_0)_thread.merge.vg
vg paths --gbwt $(TOIL_OS)/$(BASENAME).gbwt --extract-vg -x $(TOIL_OS)/$(BASENAME).xg -Q _thread_$(SAMP)_x_$(HAPLO_0) >> $(TOIL_OS)/$(BASENAME)_$(HAPLO_0)_thread.merge.vg
vg paths --gbwt $(TOIL_OS)/$(BASENAME).gbwt --retain-paths -x $(TOIL_OS)/$(BASENAME).xg -Q _thread_$(SAMP)_x_$(HAPLO_0) >> $(TOIL_OS)/$(BASENAME)_$(HAPLO_0)_thread.merge.vg

$(TOIL_OS)/$(BASENAME)_thread_$(SAMP)_$(HAPLO_0).vg: $(TOIL_OS)/$(BASENAME)_$(HAPLO_0)_thread.merge.vg
vg mod -N $(TOIL_OS)/$(BASENAME)_$(HAPLO_0)_thread.merge.vg > $(TOIL_OS)/$(BASENAME)_thread_$(SAMP)_$(HAPLO_0).vg
Expand All @@ -57,7 +57,7 @@ $(TOIL_OS)/$(BASENAME)_$(HAPLO_0).gam: $(TOIL_OS)/$(BASENAME).xg $(TOIL_OS)/$(BA

$(TOIL_OS)/$(BASENAME)_$(HAPLO_1)_thread.merge.vg: $(TOIL_OS)/$(BASENAME).vg $(TOIL_OS)/$(BASENAME).gbwt $(TOIL_OS)/$(BASENAME).xg
vg paths -d -v $(TOIL_OS)/$(BASENAME).vg > $(TOIL_OS)/$(BASENAME)_$(HAPLO_1)_thread.merge.vg
vg paths --gbwt $(TOIL_OS)/$(BASENAME).gbwt --extract-vg -x $(TOIL_OS)/$(BASENAME).xg -Q _thread_$(SAMP)_x_$(HAPLO_1) >> $(TOIL_OS)/$(BASENAME)_$(HAPLO_1)_thread.merge.vg
vg paths --gbwt $(TOIL_OS)/$(BASENAME).gbwt --retain-paths -x $(TOIL_OS)/$(BASENAME).xg -Q _thread_$(SAMP)_x_$(HAPLO_1) >> $(TOIL_OS)/$(BASENAME)_$(HAPLO_1)_thread.merge.vg

$(TOIL_OS)/$(BASENAME)_thread_$(SAMP)_$(HAPLO_1).vg: $(TOIL_OS)/$(BASENAME)_$(HAPLO_1)_thread.merge.vg
vg mod -N $(TOIL_OS)/$(BASENAME)_$(HAPLO_1)_thread.merge.vg > $(TOIL_OS)/$(BASENAME)_thread_$(SAMP)_$(HAPLO_1).vg
Expand Down
17 changes: 2 additions & 15 deletions src/subcommand/paths_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ void help_paths(char** argv) {
<< " (graph also required for most output options;" << endl
<< " -g takes priority over -x)" << endl
<< "output graph (.vg format):" << endl
<< " -V, --extract-vg output a path-only graph covering the selected paths" << endl
<< " -d, --drop-paths output a graph with the selected paths removed" << endl
<< " -r, --retain-paths output a graph with only the selected paths retained" << endl
<< " -n, --normalize-paths output a graph where equivalent paths in a site are" << endl
Expand Down Expand Up @@ -124,7 +123,6 @@ int main_paths(int argc, char** argv) {

bool extract_as_gam = false;
bool extract_as_gaf = false;
bool extract_as_vg = false;
bool list_names = false;
bool extract_as_fasta = false;
bool drop_paths = false;
Expand Down Expand Up @@ -228,8 +226,7 @@ int main_paths(int argc, char** argv) {
break;

case 'V':
extract_as_vg = true;
output_formats++;
logger.error() << "-V/--extract-vg has been removed" << endl;
break;

case 'd':
Expand Down Expand Up @@ -399,7 +396,7 @@ int main_paths(int argc, char** argv) {
logger.error() << "at least one input format (-x, -g) must be specified" << std::endl;
}
if (!gbwt_file.empty()) {
bool need_graph = (extract_as_gam || extract_as_gaf || extract_as_vg || drop_paths
bool need_graph = (extract_as_gam || extract_as_gaf || drop_paths
|| retain_paths || extract_as_fasta || list_lengths);
if (need_graph && graph_file.empty()) {
logger.error() << "a graph is needed for extracting threads in "
Expand Down Expand Up @@ -556,15 +553,10 @@ int main_paths(int argc, char** argv) {
// We may need to emit a stream of Alignments
unique_ptr<vg::io::AlignmentEmitter> aln_emitter;

// Or we might need to emit a stream of VG Graph objects
unique_ptr<vg::io::ProtobufEmitter<Graph>> graph_emitter;
if (extract_as_gam || extract_as_gaf) {
// Open up a GAM/GAF output stream
aln_emitter = vg::io::get_non_hts_alignment_emitter("-", extract_as_gaf ? "GAF" : "GAM", {}, get_thread_count(),
graph);
} else if (extract_as_vg) {
// Open up a VG Graph chunk output stream
graph_emitter = unique_ptr<vg::io::ProtobufEmitter<Graph>>(new vg::io::ProtobufEmitter<Graph>(cout));
}

if (gbwt_index) {
Expand Down Expand Up @@ -646,9 +638,6 @@ int main_paths(int argc, char** argv) {
if (extract_as_gam || extract_as_gaf) {
// Write as an Alignment. Must contain the whole path.
aln_emitter->emit_singles({alignment_from_path(*graph, path)});
} else if (extract_as_vg) {
// Write as a Path in a VG
chunk_to_emitter(path, *graph_emitter);
} else if (extract_as_fasta) {
write_fasta_sequence(name, path_sequence(*graph, path), cout);
}
Expand Down Expand Up @@ -966,8 +955,6 @@ int main_paths(int argc, char** argv) {
Path path = path_from_path_handle(*graph, path_handle);
if (extract_as_gam || extract_as_gaf) {
aln_emitter->emit_singles({alignment_from_path(*graph, path)});
} else if (extract_as_vg) {
chunk_to_emitter(path, *graph_emitter);
} else if (extract_as_fasta) {
write_fasta_sequence(graph->get_path_name(path_handle), path_sequence(*graph, path), cout);
}
Expand Down
2 changes: 1 addition & 1 deletion vgci/vgci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ KEEP_INTERMEDIATE_FILES=0
# Should we show stdout and stderr from tests? If so, set to "-s".
SHOW_OPT=""
# What toil-vg should we install?
TOIL_VG_PACKAGE="git+https://github.com/vgteam/toil-vg.git@a56a860ad31583ce4b1616c9fa2bfb4bfe06d635"
TOIL_VG_PACKAGE="git+https://github.com/vgteam/toil-vg.git@6fffa1128cdeaefb92d41db47de9a6565dd478d8"
# What toil should we install?
# Could be something like "toil[aws,mesos]==3.20.0"
# or "toil[wdl,aws,mesos]@git+https://github.com/DataBiosphere/toil.git@52aa2979f23c24001837b2808552973e7bb263e6"
Expand Down
Loading