ragtag_utilities/ContigAlignment.py
def filter_query_contained(self):
        """
        Remove alignments that are contained (w.r.t the query) within other alignments.
        This does not consider alignments contained by chains of alignments.
        Consider merging first (merge_alns()) to account for that.
        """
        cidx = set()
        for i in range(len(self._ref_headers)):
            for j in range(len(self._ref_headers)):
                # Check if j is contained by i
                if i == j:
                    continue
                if self._query_starts[i] <= self._query_starts[j] and self._query_ends[i] >= self._query_ends[j]:
                    if i not in cidx:  # Keeps at least one of many identical coordinates
                        cidx.add(j)

        hits = [i for i in range(len(self._ref_headers)) if i not in cidx]
        return self._update_alns(hits)

        Remove alignments that are contained (w.r.t the query) within other alignments.
        This does not consider alignments contained by chains of alignments.
        Consider merging first (merge_alns()) to account for that.
        
Remove alignments that are contained (w.r.t the query) within other alignments.
This does not consider alignments contained by chains of alignments.
Consider merging first (merge_alns()) to account for that.
Remove alignments that are contained ( w . r . t the query ) within other alignments . This does not consider alignments contained by chains of alignments . Consider merging first ( merge_alns () ) to account for that .
def filter_query_contained(self):
        cidx = set()
        for i in range(len(self._ref_headers)):
            for j in range(len(self._ref_headers)):
                if i == j:
                    continue
                if self._query_starts[i] <= self._query_starts[j] and self._query_ends[i] >= self._query_ends[j]:
                    if i not in cidx:  
                        cidx.add(j)
        hits = [i for i in range(len(self._ref_headers)) if i not in cidx]
        return self._update_alns(hits)
def filter_query_contained ( self ) : cidx = set ( ) for i in range ( len ( self . _ref_headers ) ) : for j in range ( len ( self . _ref_headers ) ) : if i == j : continue if self . _query_starts [ i ] <= self . _query_starts [ j ] and self . _query_ends [ i ] >= self . _query_ends [ j ] : if i not in cidx : cidx . add ( j ) hits = [ i for i in range ( len ( self . _ref_headers ) ) if i not in cidx ] return self . _update_alns ( hits )
Remove alignments that are contained (w.r.t the query) within other alignments.
Remove alignments that are contained ( w . r . t the query ) within other alignments .
"""
        Remove alignments that are contained (w.r.t the query) within other alignments.
        This does not consider alignments contained by chains of alignments.
        Consider merging first (merge_alns()) to account for that.
        """ # Check if j is contained by i # Keeps at least one of many identical coordinates
self