Beispiel #1
0
def reverse_complement(sequence, conversion):
    """Convert a nucleotide sequence into its reverse complement

    Convert a nucleotide SEQUENCE into its reverse, complement or reverse
    complement.
    """
    result = pb.reverse_complement(sequence, conversion=conversion)
    click.echo(result)
Beispiel #2
0
def test_reverse_complement_complement():
    expect = "CAGATA"
    result = pb.reverse_complement("GTCTAT", conversion="complement")
    assert result == expect
Beispiel #3
0
def test_reverse_complement_reverse_short():
    expect = "CAGATA"
    result = pb.reverse_complement("ATAGAC", conversion="r")
    assert result == expect
Beispiel #4
0
def test_reverse_complement_short():
    expect = "CAGATA"
    result = pb.reverse_complement("TATCTG", conversion="rc")
    assert result == expect
Beispiel #5
0
def test_reverse_complement_error():
    with pytest.raises(ValueError):
        pb.reverse_complement("CAGATA", conversion="invalid")