parsing_utils.py
def loadGenes(filename, graph):
    """ Load a set of genes from file, keeping onlt those who appear on the 
        graph, using alias checking for genes that initally do not appear """
    file = open(filename, 'r')
    count_genes = 0
    count_bad = 0
    causal_genes = []
    for line in file:
        gene = line.strip()
        if gene in graph.nodes:
            causal_genes.append(gene)
            count_genes += 1
        else:
            gene_true_name = checkAliases(gene, graph.nodes)
            if gene_true_name:
                causal_genes.append(gene_true_name)
                count_genes += 1
            else:
                print('Could not find suitable alias for', gene)
                count_bad += 1
    print('Loaded ' + str(count_genes) + ' genes (' + str(count_bad) + ' not found on graph)')
    file.close()
    return causal_genes
 Load a set of genes from file, keeping onlt those who appear on the 
        graph, using alias checking for genes that initally do not appear 
Load a set of genes from file, keeping onlt those who appear on the
graph, using alias checking for genes that initally do not appear
Load a set of genes from file keeping onlt those who appear on the graph using alias checking for genes that initally do not appear
def loadGenes(filename, graph):
    file = open(filename, 'r')
    count_genes = 0
    count_bad = 0
    causal_genes = []
    for line in file:
        gene = line.strip()
        if gene in graph.nodes:
            causal_genes.append(gene)
            count_genes += 1
        else:
            gene_true_name = checkAliases(gene, graph.nodes)
            if gene_true_name:
                causal_genes.append(gene_true_name)
                count_genes += 1
            else:
                print('Could not find suitable alias for', gene)
                count_bad += 1
    print('Loaded ' + str(count_genes) + ' genes (' + str(count_bad) + ' not found on graph)')
    file.close()
    return causal_genes
def loadGenes ( filename , graph ) : file = open ( filename , 'r' ) count_genes = 0 count_bad = 0 causal_genes = [ ] for line in file : gene = line . strip ( ) if gene in graph . nodes : causal_genes . append ( gene ) count_genes += 1 else : gene_true_name = checkAliases ( gene , graph . nodes ) if gene_true_name : causal_genes . append ( gene_true_name ) count_genes += 1 else : print ( 'Could not find suitable alias for' , gene ) count_bad += 1 print ( 'Loaded ' + str ( count_genes ) + ' genes (' + str ( count_bad ) + ' not found on graph)' ) file . close ( ) return causal_genes
Load a set of genes from file, keeping onlt those who appear on the
graph, using alias checking for genes that initally do not appear
Load a set of genes from file keeping onlt those who appear on the graph using alias checking for genes that initally do not appear
""" Load a set of genes from file, keeping onlt those who appear on the 
        graph, using alias checking for genes that initally do not appear """
filename
graph