def add_to_library(library, line):
    """Add a line from the library file to the library.

    A library entry contains:
    - name of the marker
    - sequence of the marker
    - replacement sequence
    - open handle to the .txt file
    - open handle to the _counted.txt file
    - number of times the marker has been seen
    - sequences containing the marker, its header and its count

    :arg list library: Library (see above).
    :arg str line: Line of the library file.
    """
    library.append(line.split())
    library[-1].append(open(library[-1][0] + '.txt', 'w'))
    library[-1].append(open(library[-1][0] + '_counted.txt', 'w'))
    library[-1].append(0)
    library[-1].append({})
