Example #1
0
def trim(reads, left_trim=0, right_trim=0, min_length=10, append_label=False):
    """Trim reads from left and/pr right side.
    min_length is set to 10 by default and is the minimum
    length of the resulting read. If read length < min_length,
    the read is not trimmed and returned as is
    """
    return gt.trim(reads.__iter__(), left_trim, right_trim, min_length, append_label)
def test_chain_filter_indirect():
    infile = gt.InputFile(testfiles["bedconvert.map"])
    filtered = gt.trim(gt.unique(infile, 2), left=10, right=10)
    count = 0
    for t in filtered:
        count += 1
        assert len(t.read) == 81
    assert count == 1
def test_chain_filter_indirect():
    infile = gt.InputFile(testfiles["bedconvert.map"])
    filtered = gt.trim(gt.unique(infile, 2), left=10, right=10)
    count = 0
    for t in filtered:
        count += 1
        assert len(t.read) == 81
    assert count == 1
Example #4
0
def trim(reads, left_trim=0, right_trim=0, min_length=10, append_label=False):
    """Trim reads from left and/pr right side.
    min_length is set to 10 by default and is the minimum
    length of the resulting read. If read length < min_length,
    the read is not trimmed and returned as is
    """
    return gt.trim(reads.__iter__(), left_trim, right_trim, min_length,
                   append_label)