def __init__(self, min_length, location=None, extended_location=None, include_reverse_complement=True, boost=1.0, localization_data=None): """Initialize.""" self.min_length = min_length if isinstance(location, tuple): location = Location.from_tuple(location) self.location = location if isinstance(extended_location, tuple): extended_location = Location.from_tuple(extended_location) self.extended_location = extended_location self.include_reverse_complement = include_reverse_complement self.boost = 1.0 self.localization_data = localization_data
def __init__(self, blast_db=None, sequences=None, word_size=4, perc_identity=100, num_alignments=100000, num_threads=3, min_align_length=20, ungapped=True, e_value=1e80, culling_limit=1, location=None): """Initialize.""" if isinstance(location, tuple): location = Location.from_tuple(location) self.blast_db = blast_db self.sequences = sequences self.word_size = word_size self.perc_identity = perc_identity self.num_alignments = num_alignments self.num_threads = num_threads self.min_align_length = min_align_length self.location = location self.e_value = e_value self.ungapped = ungapped self.culling_limit = culling_limit
def __init__(self, sequence=None, location=None, boost=1.0): """Initialize.""" self.sequence = sequence if isinstance(location, tuple): location = Location.from_tuple(location, default_strand=+1) self.location = location self.boost = boost
def __init__(self, locations, compatibility_condition, condition_label='', boost=1.0): self.locations = [ Location.from_tuple(location) for location in locations ] self.compatibility_condition = compatibility_condition self.condition_label = condition_label self.boost = boost
def __init__(self, location=None, translation=None, boost=1.0): """Initialize.""" self.translation = translation if isinstance(location, tuple): location = Location.from_tuple(location, default_strand=+1) if (location is not None) and (location.strand not in [-1, 1]): location = Location(location.start, location.end, 1) self.set_location(location) self.boost = boost self.initialize_translation_from_problem = (translation is None) self.initialize_location_from_problem = (location is None)
def __init__(self, stem_size=20, hairpin_window=200, location=None, boost=1.0): """Initialize.""" if isinstance(location, tuple): location = Location.from_tuple(location) self.stem_size = stem_size self.hairpin_window = hairpin_window self.location = location self.boost = boost
def __init__(self, location=None, indices=None, target_sequence=None, boost=1.0): """Initialize.""" if isinstance(location, tuple): location = Location.from_tuple(location) self.location = location self.indices = np.array(indices) if (indices is not None) else None self.target_sequence = target_sequence # self.passive_objective = passive_objective self.boost = boost
def __init__(self, max_energy=-5.0, location=None, optimize_initiator=False, boost=1.0): self.max_e = max_energy self.boost = boost self.optimize_initiator = optimize_initiator if isinstance(location, tuple): location = Location.from_tuple(location) if location is not None and (location.strand == -1): location = Location(location.start, location.end, 1) self.location = location
def __init__(self, pattern=None, occurences=1, location=None, center=True, boost=1.0): """Initialize.""" if isinstance(pattern, str): pattern = SequencePattern.from_string(pattern) self.pattern = pattern if isinstance(location, tuple): location = Location.from_tuple(location) self.location = location self.boost = boost self.occurences = occurences self.center = center self.boost = boost
def __init__(self, mini=0, maxi=1.0, target=None, window=None, location=None, boost=1.0): """Initialize.""" if target is not None: mini = maxi = target self.target = target self.mini = mini self.maxi = maxi self.window = window if isinstance(location, tuple): location = Location.from_tuple(location) self.location = location self.boost = boost
def __init__(self, choices=None, enzymes=None, location=None, boost=1.0): """Initialize.""" if enzymes is not None: choices = [enzyme_pattern(e) for e in enzymes] if choices is None: raise ValueError('`choices` or `enzymes` should not be None.') choices = [ choice if isinstance(choice, DnaNotationPattern) else DnaNotationPattern(choice) for choice in choices ] choices = [ variant for choice in choices for variant in choice.all_variants() ] self.choices = choices if isinstance(location, tuple): location = Location.from_tuple(location, default_strand=+1) self.location = location self.boost = boost
def __init__(self, pattern=None, occurences=1, location=None, enzyme=None, center=True, boost=1.0): """Initialize.""" if enzyme is not None: pattern = enzyme_pattern(enzyme) if isinstance(pattern, str): pattern = DnaNotationPattern(pattern) self.pattern = pattern if isinstance(location, tuple): location = Location.from_tuple(location) self.location = location self.enzyme = enzyme self.boost = boost self.occurences = occurences self.center = center self.boost = boost