Skip to content

Commit

Permalink
Merge branch 'pin-requests' into read-lr-giraffe
Browse files Browse the repository at this point in the history
  • Loading branch information
adamnovak committed May 21, 2024
2 parents 0c64463 + 948e2c1 commit c70da62
Show file tree
Hide file tree
Showing 17 changed files with 335 additions and 276 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ ifeq ($(shell uname -s),Darwin)
# We don't actually do any static linking on Mac, so we leave this empty.
START_STATIC =
END_STATIC =

# We need to use special flags to let us rename libraries
LD_RENAMEABLE_FLAGS = -Wl,-headerpad -Wl,-headerpad_max_install_names
else
# We are not running on OS X
$(info OS is Linux)
Expand Down Expand Up @@ -252,7 +255,8 @@ else
# Note that END_STATIC is only safe to use in a mostly-dynamic build, and has to appear or we will try to statically link secret trailing libraries.
END_STATIC = -Wl,-Bdynamic


# We don't need any flags because we don't need to rename libraries with install_name_tool
LD_RENAMEABLE_FLAGS =
endif

# Set the C++ standard we are using
Expand Down Expand Up @@ -656,7 +660,7 @@ ifeq ($(shell uname -s),Darwin)
endif

$(LIB_DIR)/libdeflate.a: $(LIBDEFLATE_DIR)/*.h $(LIBDEFLATE_DIR)/lib/*.h $(LIBDEFLATE_DIR)/lib/*/*.h $(LIBDEFLATE_DIR)/lib/*.c $(LIBDEFLATE_DIR)/lib/*/*.c
+. ./source_me.sh && cd $(LIBDEFLATE_DIR) && V=1 $(MAKE) $(FILTER) && cp libdeflate.a $(CWD)/$(LIB_DIR) && cp libdeflate.h $(CWD)/$(INC_DIR)
+. ./source_me.sh && cd $(LIBDEFLATE_DIR) && V=1 LDFLAGS="$(LDFLAGS) $(LD_RENAMEABLE_FLAGS)" $(MAKE) $(FILTER) && cp libdeflate.a $(CWD)/$(LIB_DIR) && cp libdeflate.h $(CWD)/$(INC_DIR)

# We build htslib after libdeflate so it can use libdeflate.
# We need to do some wizardry to get it to pick up the right build and target system types on modern autotools.
Expand Down
2 changes: 1 addition & 1 deletion ontology/vg.html
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ <h2>
<td><a href="http://www.w3.org/2000/01/rdf-schema#comment">
rdfs:comment</a></td>
<td>
"A step along a path in the variant graph. A series of steps along a path represent an assembled sequence that was originally inserted into the the variant graph. A step points to a :Node or the reverse complement of a node and has a rank (step number)."
"A step along a path in the variant graph. A series of steps along a path represent an assembled sequence that was originally inserted into the variant graph. A step points to a :Node or the reverse complement of a node and has a rank (step number)."
<sup><a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#http://www.w3.org/2001/XMLSchema#string">
xsd:string</a></sup>
</td>
Expand Down
2 changes: 1 addition & 1 deletion ontology/vg.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
.
:Step
rdf:type owl:Class ;
rdfs:comment "A step along a path in the variant graph. A series of steps along a path represent an assembled sequence that was originally inserted into the the variant graph. A step points to a :Node or the reverse complement of a node and has a rank (step number)."^^xsd:string ;
rdfs:comment "A step along a path in the variant graph. A series of steps along a path represent an assembled sequence that was originally inserted into the variant graph. A step points to a :Node or the reverse complement of a node and has a rank (step number)."^^xsd:string ;
rdfs:label "Step"^^xsd:string ;
rdfs:subClassOf owl:Thing ;
.
Expand Down
397 changes: 201 additions & 196 deletions src/algorithms/alignment_path_offsets.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/algorithms/k_widest_paths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ vector<pair<double, vector<handle_t>>> yens_k_widest_paths(const HandleGraph* g,
forgotten_nodes.insert(g->flip(prev_path[j]));
}

// find our path from the the spur_node to the sink
// find our path from the spur_node to the sink
pair<double, vector<handle_t>> spur_path_v = widest_dijkstra(g, spur_node, sink, node_weight_callback, edge_weight_callback,
[&](handle_t h) {return forgotten_nodes.count(h);},
[&](edge_t e) {return forgotten_edges.count(e);},
Expand Down
2 changes: 1 addition & 1 deletion src/cactus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void getReachableBridges(stCactusEdgeEnd *edgeEnd1, stList *bridgeEnds) {
}

/**
* Finds an arbitrary pair of telomeres in a Cactus graph, which are are either
* Finds an arbitrary pair of telomeres in a Cactus graph, which are either
* a pair of bridge edge ends or a pair of chain edge ends, oriented such that
* they form a pair of boundaries.
*
Expand Down
2 changes: 1 addition & 1 deletion src/cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ void MEMClusterer::HitGraph::prune_low_scoring_edges(vector<vector<size_t>>& com
}
cerr << strm.str();
#endif
// the the original component
// the original component
components[component_idx] = move(new_components[0]);
// add the remaining to the end
for (size_t i = 1; i < new_components.size(); i++) {
Expand Down
13 changes: 12 additions & 1 deletion src/gbwt_extender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2284,7 +2284,14 @@ WFAAlignment WFAExtender::connect(std::string sequence, pos_t from, pos_t to) co
}

WFAAlignment WFAExtender::suffix(const std::string& sequence, pos_t from) const {
return this->connect(sequence, from, pos_t(0, false, 0));
WFAAlignment result = this->connect(sequence, from, pos_t(0, false, 0));

if (!result.edits.empty() && result.length == sequence.length() && (result.edits.back().first == WFAAlignment::match || result.edits.back().first == WFAAlignment::mismatch)) {
// The alignment used all of the sequence and has a match/mismatch at the appropriate end
result.score += this->aligner->full_length_bonus;
}

return result;
}

WFAAlignment WFAExtender::prefix(const std::string& sequence, pos_t to) const {
Expand All @@ -2297,6 +2304,10 @@ WFAAlignment WFAExtender::prefix(const std::string& sequence, pos_t to) const {
WFAAlignment result = this->connect(reverse_complement(sequence), to, pos_t(0, false, 0));
result.flip(*(this->graph), sequence);

if (!result.edits.empty() && result.length == sequence.length() && (result.edits.front().first == WFAAlignment::match || result.edits.front().first == WFAAlignment::mismatch)) {
result.score += this->aligner->full_length_bonus;
}

return result;
}

Expand Down
8 changes: 6 additions & 2 deletions src/gbwt_extender.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,11 @@ class WFAExtender {
* entire sequence with an acceptable score, returns the highest-scoring
* partial alignment, which may be empty.
*
* Applies the full-length bonus if the result ends with a match or mismatch.
* TODO: Use the full-length bonus to determine the optimal alignment.
*
* NOTE: This creates a suffix of the full alignment by aligning a
* prefix of the sequence.
* TODO: Should we use full-length bonuses?
*/
WFAAlignment suffix(const std::string& sequence, pos_t from) const;

Expand All @@ -424,9 +426,11 @@ class WFAExtender {
* sequence with an acceptable score, returns the highest-scoring partial
* alignment, which may be empty.
*
* Applies the full-length bonus if the result begins with a match or mismatch.
* TODO: Use the full-length bonus to determine the optimal alignment.
*
* NOTE: This creates a prefix of the full alignment by aligning a suffix
* of the sequence.
* TODO: Should we use full-length bonuses?
*/
WFAAlignment prefix(const std::string& sequence, pos_t to) const;

Expand Down
2 changes: 1 addition & 1 deletion src/graph_caller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2302,7 +2302,7 @@ string NestedFlowCaller::flatten_alt_allele(const string& nested_allele, int all
// todo: passing in a single ploidy simplisitic, would need to derive from the calls when
// reucrising
// in practice, the results will nearly the same but still needs fixing
// we try to get the the allele from the genotype if possible, but fallback on the fallback_allele
// we try to get the allele from the genotype if possible, but fallback on the fallback_allele
int trav_allele = fallback_allele >= 0 ? fallback_allele : record.genotype_by_ploidy[ploidy-1].first[allele];
const SnarlTraversal& traversal = record.travs[trav_allele];
string nested_snarl_allele = trav_string(graph, traversal);
Expand Down
2 changes: 1 addition & 1 deletion src/index_registry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ IndexRegistry VGIndexes::get_vg_index_registry() {
}
}

// we'll partition sequences that have the same samples (chunking the the VCFs
// we'll partition sequences that have the same samples (chunking the VCFs
// ultimately requires that we do this)
map<set<string>, vector<string>> sample_set_contigs;
for (int i = 0; i < vcf_samples.size(); ++i) {
Expand Down
2 changes: 1 addition & 1 deletion src/splicing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,7 @@ multipath_alignment_t&& fuse_spliced_alignments(const Alignment& alignment,
}
}
else if (!have_right_linker) {
// the splice segment on the right side is empty, make connection the the left side
// the splice segment on the right side is empty, make connection the left side
auto connection = left_mp_aln.mutable_subpath(right_subpaths_begin - 1)->add_connection();
connection->set_next(left_mp_aln.subpath_size());
connection->set_score(splice_score);
Expand Down
2 changes: 0 additions & 2 deletions src/subcommand/chunk_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,11 +715,9 @@ int main_chunk(int argc, char** argv) {
unique_ptr<MutablePathMutableHandleGraph> subgraph;
map<string, int> trace_thread_frequencies;
if (!component_ids.empty()) {
cout << "here?" << endl;
subgraph = vg::io::new_output_graph<MutablePathMutableHandleGraph>(output_format);
chunker.extract_component(component_ids[i], *subgraph, false);
output_regions[i] = region;
cout << "nope" << endl;
}
else if (id_range == false) {
subgraph = vg::io::new_output_graph<MutablePathMutableHandleGraph>(output_format);
Expand Down
2 changes: 1 addition & 1 deletion src/transcriptome.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ class Transcriptome {
/// Parse gtf/gff3 attribute value.
string parse_attribute_value(const string & attribute, const string & name) const;

/// Returns the the mean node length of the graph
/// Returns the mean node length of the graph
float mean_node_length() const;

/// Adds the exon coordinates to a transcript.
Expand Down
Loading

1 comment on commit c70da62

@adamnovak
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vg CI tests complete for branch read-lr-giraffe. View the full report here.

16 tests passed, 0 tests failed and 0 tests skipped in 17469 seconds

Please sign in to comment.