Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_comp_valid():
assert complement(comp_valid).startswith("AACTTCTAAAnCG")
assert complement(complement(comp_valid)) == comp_valid
def test_comp_valid():
assert complement(comp_valid).startswith("AACTTCTAAAnCG")
assert complement(complement(comp_valid)) == comp_valid
def test_comp_empty():
assert complement('') == ''
def test_comp_invalid():
complement(comp_invalid)
up_sb.restore(seq)
down_sb.restore(seq)
# 6. Concate sequences from the upstream and downstream splits. Concat
# upstream and downstream sequence. Cut to fix the length.
down_str = down_sb.concat()
up_str = up_sb.concat()
if fixed_len:
down_str, up_str = self._cut_to_fix_len(
down_str, up_str, interval, anchor)
seq = down_str + up_str
if interval.strand == '-':
seq = complement(seq)[::-1]
return seq