Skip to content

Commit 98e3b7c

Browse files
committed
fix merge re -S option
1 parent c16d64b commit 98e3b7c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/subcommand/call_main.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,18 @@ int main_call(int argc, char** argv) {
584584

585585
// make sure we have some ref paths
586586
if (ref_paths.empty()) {
587-
if (!ref_sample.empty()) {
588-
cerr << "error [vg call]: No paths with selected reference sample \"" << ref_sample << "\" found. "
587+
if (!ref_sample_set.empty()) {
588+
string sample_string;
589+
if (ref_sample_set.size() == 1) {
590+
sample_string = "sample \"" + *ref_sample_set.begin() + "\"";
591+
} else {
592+
sample_string = "samples \"";
593+
for (const string& rsn : ref_sample_set) {
594+
sample_string += (sample_string.length() > 9 ? " " : "") + rsn;
595+
}
596+
sample_string += "\"";
597+
}
598+
cerr << "error [vg call]: No paths with selected reference " << sample_string << " found. "
589599
<< "Try using vg paths -M to see which samples are in your graph" << endl;
590600
return 1;
591601
}

0 commit comments

Comments
 (0)