How to use the pyfaidx.complement function in pyfaidx

To help you get started, we’ve selected a few pyfaidx examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mdshw5 / pyfaidx / tests / test_sequence_class.py View on Github external
def test_comp_valid():
    assert complement(comp_valid).startswith("AACTTCTAAAnCG")
    assert complement(complement(comp_valid)) == comp_valid
github mdshw5 / pyfaidx / tests / test_sequence_class.py View on Github external
def test_comp_valid():
    assert complement(comp_valid).startswith("AACTTCTAAAnCG")
    assert complement(complement(comp_valid)) == comp_valid
github mdshw5 / pyfaidx / tests / test_sequence_class.py View on Github external
def test_comp_empty():
    assert complement('') == ''
github mdshw5 / pyfaidx / tests / test_sequence_class.py View on Github external
def test_comp_invalid():
    complement(comp_invalid)
github kipoi / kipoiseq / kipoiseq / extractors / vcf_seq.py View on Github external
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