Skip to content

Commit

Permalink
don't modify the clustering indicators for Themisto (user should do it)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmaklin committed Jan 27, 2020
1 parent 5b80d65 commit 18a61d4
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,13 @@ int main (int argc, char *argv[]) {
ReadClusterIndicators(indicators_file, reference);
std::cerr << " read " << reference.n_refs << " group indicators" << std::endl;

std::cerr << " reading pseudoalignments" << '\n';
if (!args.themisto_mode) {
// Check that the number of reference sequences matches in the grouping and the alignment.
VerifyGrouping(*args.infiles.run_info, reference.n_refs);
std::cerr << " reading pseudoalignments" << '\n';
ReadBitfield(args.infiles, reference.n_refs, bitfields);
} else {
std::cerr << " reading pseudoalignments" << '\n';
ReadBitfield(args.tinfile1, args.tinfile2, args.themisto_merge_mode, reference.n_refs, bitfields);
// Convert the clustering into Themisto colors
std::vector<signed> colors;
std::set<signed> uniques;
for (size_t i = 0; i < reference.grouping.indicators.size(); ++i) {
if (uniques.find(i) == uniques.end()) {
uniques.insert(i);
colors.push_back(i);
}
}
reference.grouping.indicators = colors;
}

std::cerr << " read " << (args.batch_mode ? bitfields.size() : bitfields[0].num_ecs()) << (args.batch_mode ? " samples from the batch" : " unique alignments") << std::endl;
Expand Down

0 comments on commit 18a61d4

Please sign in to comment.