Пример #1
0
def test_merge_pairheaders():
    headers = [['## pairs format v1.0'], ['## pairs format v1.0']]
    merged_header = _headerops._merge_pairheaders(headers)
    assert merged_header == headers[0]

    headers = [['## pairs format v1.0', '#a'], ['## pairs format v1.0', '#b']]
    merged_header = _headerops._merge_pairheaders(headers)
    assert merged_header == ['## pairs format v1.0', '#a', '#b']

    headers = [
        ['## pairs format v1.0', '#chromosomes: chr1 chr2'],
        ['## pairs format v1.0', '#chromosomes: chr1 chr2'],
    ]
    merged_header = _headerops._merge_pairheaders(headers)
    assert merged_header == headers[0]
Пример #2
0
def test_force_merge_pairheaders():
    headers = [
        ['## pairs format v1.0', '#chromosomes: chr1'],
        ['## pairs format v1.0', '#chromosomes: chr2'],
    ]
    merged_header = _headerops._merge_pairheaders(headers, force=True)
    assert merged_header == ['## pairs format v1.0', '#chromosomes: chr1 chr2']
Пример #3
0
def test_force_merge_pairheaders():
    headers = [
        ['## pairs format v1.0', '#chromsize: chr1 100'],
        ['## pairs format v1.0', '#chromsize: chr2 200'],
    ]
    merged_header = _headerops._merge_pairheaders(headers, force=True)
    assert merged_header == [
        '## pairs format v1.0', '#chromsize: chr1 100', '#chromsize: chr2 200'
    ]
Пример #4
0
def test_merge_different_pairheaders():
    headers = [['## pairs format v1.0'], ['## pairs format v1.1']]
    merged_header = _headerops._merge_pairheaders(headers)