bin/bactopia/bactopia-datasets.py
def pubmlst_schemas(pubmlst_file):
    """Read the PubMLST mappings and return a dict."""
    pubmlst = {}
    with open(pubmlst_file, 'rt') as pubmlst_fh:
        for line in pubmlst_fh:
            line = line.rstrip()
            if line and not line.startswith('ariba'):
                ariba, species, schema = line.split('\t')
                if species not in pubmlst:
                    pubmlst[species] = {}
                pubmlst[species][schema] = ariba
    return pubmlst
Read the PubMLST mappings and return a dict.
Read the PubMLST mappings and return a dict.
Read the PubMLST mappings and return a dict .
def pubmlst_schemas(pubmlst_file):
    pubmlst = {}
    with open(pubmlst_file, 'rt') as pubmlst_fh:
        for line in pubmlst_fh:
            line = line.rstrip()
            if line and not line.startswith('ariba'):
                ariba, species, schema = line.split('\t')
                if species not in pubmlst:
                    pubmlst[species] = {}
                pubmlst[species][schema] = ariba
    return pubmlst
def pubmlst_schemas ( pubmlst_file ) : pubmlst = { } with open ( pubmlst_file , 'rt' ) as pubmlst_fh : for line in pubmlst_fh : line = line . rstrip ( ) if line and not line . startswith ( 'ariba' ) : ariba , species , schema = line . split ( '\t' ) if species not in pubmlst : pubmlst [ species ] = { } pubmlst [ species ] [ schema ] = ariba return pubmlst
Read the PubMLST mappings and return a dict.
Read the PubMLST mappings and return a dict .
"""Read the PubMLST mappings and return a dict."""
pubmlst_file