How to use the cutadapt.__main__.parse_lengths function in cutadapt

To help you get started, we’ve selected a few cutadapt 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 marcelm / cutadapt / tests / test_main.py View on Github external
def test_parse_lengths():
    assert parse_lengths("25") == (25, )
    assert parse_lengths("17:25") == (17, 25)
    assert parse_lengths("25:") == (25, None)
    assert parse_lengths(":25") == (None, 25)
    with pytest.raises(CommandLineError):
        parse_lengths("1:2:3")
    with pytest.raises(CommandLineError):
        parse_lengths("a:2")
    with pytest.raises(CommandLineError):
        parse_lengths("a")
    with pytest.raises(CommandLineError):
        parse_lengths("2:a")
    with pytest.raises(CommandLineError):
        parse_lengths(":")
github marcelm / cutadapt / tests / test_main.py View on Github external
def test_parse_lengths():
    assert parse_lengths("25") == (25, )
    assert parse_lengths("17:25") == (17, 25)
    assert parse_lengths("25:") == (25, None)
    assert parse_lengths(":25") == (None, 25)
    with pytest.raises(CommandLineError):
        parse_lengths("1:2:3")
    with pytest.raises(CommandLineError):
        parse_lengths("a:2")
    with pytest.raises(CommandLineError):
        parse_lengths("a")
    with pytest.raises(CommandLineError):
        parse_lengths("2:a")
    with pytest.raises(CommandLineError):
        parse_lengths(":")
github marcelm / cutadapt / tests / test_main.py View on Github external
def test_parse_lengths():
    assert parse_lengths("25") == (25, )
    assert parse_lengths("17:25") == (17, 25)
    assert parse_lengths("25:") == (25, None)
    assert parse_lengths(":25") == (None, 25)
    with pytest.raises(CommandLineError):
        parse_lengths("1:2:3")
    with pytest.raises(CommandLineError):
        parse_lengths("a:2")
    with pytest.raises(CommandLineError):
        parse_lengths("a")
    with pytest.raises(CommandLineError):
        parse_lengths("2:a")
    with pytest.raises(CommandLineError):
        parse_lengths(":")
github marcelm / cutadapt / tests / test_main.py View on Github external
def test_parse_lengths():
    assert parse_lengths("25") == (25, )
    assert parse_lengths("17:25") == (17, 25)
    assert parse_lengths("25:") == (25, None)
    assert parse_lengths(":25") == (None, 25)
    with pytest.raises(CommandLineError):
        parse_lengths("1:2:3")
    with pytest.raises(CommandLineError):
        parse_lengths("a:2")
    with pytest.raises(CommandLineError):
        parse_lengths("a")
    with pytest.raises(CommandLineError):
        parse_lengths("2:a")
    with pytest.raises(CommandLineError):
        parse_lengths(":")
github marcelm / cutadapt / tests / test_main.py View on Github external
def test_parse_lengths():
    assert parse_lengths("25") == (25, )
    assert parse_lengths("17:25") == (17, 25)
    assert parse_lengths("25:") == (25, None)
    assert parse_lengths(":25") == (None, 25)
    with pytest.raises(CommandLineError):
        parse_lengths("1:2:3")
    with pytest.raises(CommandLineError):
        parse_lengths("a:2")
    with pytest.raises(CommandLineError):
        parse_lengths("a")
    with pytest.raises(CommandLineError):
        parse_lengths("2:a")
    with pytest.raises(CommandLineError):
        parse_lengths(":")
github marcelm / cutadapt / tests / test_main.py View on Github external
def test_parse_lengths():
    assert parse_lengths("25") == (25, )
    assert parse_lengths("17:25") == (17, 25)
    assert parse_lengths("25:") == (25, None)
    assert parse_lengths(":25") == (None, 25)
    with pytest.raises(CommandLineError):
        parse_lengths("1:2:3")
    with pytest.raises(CommandLineError):
        parse_lengths("a:2")
    with pytest.raises(CommandLineError):
        parse_lengths("a")
    with pytest.raises(CommandLineError):
        parse_lengths("2:a")
    with pytest.raises(CommandLineError):
        parse_lengths(":")
github marcelm / cutadapt / tests / test_main.py View on Github external
def test_parse_lengths():
    assert parse_lengths("25") == (25, )
    assert parse_lengths("17:25") == (17, 25)
    assert parse_lengths("25:") == (25, None)
    assert parse_lengths(":25") == (None, 25)
    with pytest.raises(CommandLineError):
        parse_lengths("1:2:3")
    with pytest.raises(CommandLineError):
        parse_lengths("a:2")
    with pytest.raises(CommandLineError):
        parse_lengths("a")
    with pytest.raises(CommandLineError):
        parse_lengths("2:a")
    with pytest.raises(CommandLineError):
        parse_lengths(":")
github marcelm / cutadapt / tests / test_main.py View on Github external
def test_parse_lengths():
    assert parse_lengths("25") == (25, )
    assert parse_lengths("17:25") == (17, 25)
    assert parse_lengths("25:") == (25, None)
    assert parse_lengths(":25") == (None, 25)
    with pytest.raises(CommandLineError):
        parse_lengths("1:2:3")
    with pytest.raises(CommandLineError):
        parse_lengths("a:2")
    with pytest.raises(CommandLineError):
        parse_lengths("a")
    with pytest.raises(CommandLineError):
        parse_lengths("2:a")
    with pytest.raises(CommandLineError):
        parse_lengths(":")
github marcelm / cutadapt / tests / test_main.py View on Github external
def test_parse_lengths():
    assert parse_lengths("25") == (25, )
    assert parse_lengths("17:25") == (17, 25)
    assert parse_lengths("25:") == (25, None)
    assert parse_lengths(":25") == (None, 25)
    with pytest.raises(CommandLineError):
        parse_lengths("1:2:3")
    with pytest.raises(CommandLineError):
        parse_lengths("a:2")
    with pytest.raises(CommandLineError):
        parse_lengths("a")
    with pytest.raises(CommandLineError):
        parse_lengths("2:a")
    with pytest.raises(CommandLineError):
        parse_lengths(":")