Changeset 1814:c7d693f650af in orange-bioinformatics for _bioinformatics/obiGeneSets.py


Ignore:
Timestamp:
06/06/13 12:58:47 (11 months ago)
Author:
Flashpoint <vid.flashpoint@…>
Branch:
default
Message:

Added a genesets statistics function to obiGeneSets.py. Added additional columns in OWCustomSets.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/obiGeneSets.py

    r1812 r1814  
    176176    return GeneSets(handleNELines(contents, hline)) 
    177177 
     178def getGenesetsStats(genesets): 
     179    num_sets = len(genesets) 
     180    unique_genes = len(set([gene for geneset in genesets for gene in geneset.genes])) 
     181    genes_per_geneset = sum([len(geneset.genes) for geneset in genesets])/num_sets 
     182    return num_sets, unique_genes, genes_per_geneset 
    178183""" 
    179184We have multiple paths for gene set data: 
Note: See TracChangeset for help on using the changeset viewer.