ragtag_utilities/ContigAlignment.py
def keep_terminals(self, max_term_dist):
        """
        remove any alignments that aren't within max_term_dist of a reference terminus
        :param max_term_dist: maximum distance from a reference terminus
        """
        if max_term_dist <= 0:
            raise ValueError("max_term_dist must be a positive nonzero number.")

        if max_term_dist < 1:
            hits = [i for i in range(self.num_alns) if self.ref_starts[i] <= (max_term_dist*self.ref_lens[i]) or (self.ref_lens[i] - self.ref_ends[i]) <= (max_term_dist*self.ref_lens[i])]
        else:
            hits = [i for i in range(self.num_alns) if self.ref_starts[i] <= max_term_dist or (self.ref_lens[i] - self.ref_ends[i]) <= max_term_dist]
        return self._update_alns(hits)

        remove any alignments that aren't within max_term_dist of a reference terminus
        :param max_term_dist: maximum distance from a reference terminus
        
remove any alignments that aren't within max_term_dist of a reference terminus
remove any alignments that aren ' t within max_term_dist of a reference terminus
def keep_terminals(self, max_term_dist):
        if max_term_dist <= 0:
            raise ValueError("max_term_dist must be a positive nonzero number.")
        if max_term_dist < 1:
            hits = [i for i in range(self.num_alns) if self.ref_starts[i] <= (max_term_dist*self.ref_lens[i]) or (self.ref_lens[i] - self.ref_ends[i]) <= (max_term_dist*self.ref_lens[i])]
        else:
            hits = [i for i in range(self.num_alns) if self.ref_starts[i] <= max_term_dist or (self.ref_lens[i] - self.ref_ends[i]) <= max_term_dist]
        return self._update_alns(hits)
def keep_terminals ( self , max_term_dist ) : if max_term_dist <= 0 : raise ValueError ( "max_term_dist must be a positive nonzero number." ) if max_term_dist < 1 : hits = [ i for i in range ( self . num_alns ) if self . ref_starts [ i ] <= ( max_term_dist * self . ref_lens [ i ] ) or ( self . ref_lens [ i ] - self . ref_ends [ i ] ) <= ( max_term_dist * self . ref_lens [ i ] ) ] else : hits = [ i for i in range ( self . num_alns ) if self . ref_starts [ i ] <= max_term_dist or ( self . ref_lens [ i ] - self . ref_ends [ i ] ) <= max_term_dist ] return self . _update_alns ( hits )
remove any alignments that aren't within max_term_dist of a reference terminus
remove any alignments that aren ' t within max_term_dist of a reference terminus
"""
        remove any alignments that aren't within max_term_dist of a reference terminus
        :param max_term_dist: maximum distance from a reference terminus
        """
self
max_term_dist
maximum distance from a reference terminus
maximum distance from a reference terminus