scout/parse/hgnc.py
def parse_hgnc_genes(lines):
    """Parse lines with hgnc formated genes

        This is designed to take a dump with genes from HGNC.
        This is downloaded from:
        ftp://ftp.ebi.ac.uk/pub/databases/genenames/new/tsv/hgnc_complete_set.txt

        Args:
            lines(iterable(str)): An iterable with HGNC formated genes
        Yields:
            hgnc_gene(dict): A dictionary with the relevant information
    """
    header = []
    logger.info("Parsing hgnc genes...")
    for index, line in enumerate(lines):
        if index == 0:
            header = line.split('\t')
        elif len(line) > 1:
            hgnc_gene = parse_hgnc_line(line=line, header=header)
            if hgnc_gene:
                yield hgnc_gene
def parse_hgnc_genes(lines):
    header = []
    logger.info("Parsing hgnc genes...")
    for index, line in enumerate(lines):
        if index == 0:
            header = line.split('\t')
        elif len(line) > 1:
            hgnc_gene = parse_hgnc_line(line=line, header=header)
            if hgnc_gene:
                yield hgnc_gene
def parse_hgnc_genes ( lines ) : header = [ ] logger . info ( "Parsing hgnc genes..." ) for index , line in enumerate ( lines ) : if index == 0 : header = line . split ( '\t' ) elif len ( line ) > 1 : hgnc_gene = parse_hgnc_line ( line = line , header = header ) if hgnc_gene : yield hgnc_gene
Parse lines with hgnc formated genes

        This is designed to take a dump with genes from HGNC.
        This is downloaded from:
        ftp://ftp.ebi.ac.uk/pub/databases/genenames/new/tsv/hgnc_complete_set.txt

        Args:
            lines(iterable(str)): An iterable with HGNC formated genes
        Yields:
            hgnc_gene(dict): A dictionary with the relevant information
Parse lines with hgnc formated genes