From a1e57d7820640eef91c3a0390c2c880a93d1ec3e Mon Sep 17 00:00:00 2001 From: einarr Date: Fri, 6 Feb 2009 23:48:25 +0000 Subject: [PATCH] Smokers workflow automatically loads annotations on the go-terms and gene_ids dimensions. --- workflows/smokers.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/workflows/smokers.py b/workflows/smokers.py index 463e174..8256b04 100644 --- a/workflows/smokers.py +++ b/workflows/smokers.py @@ -3,7 +3,7 @@ import os.path import webbrowser import cPickle -from laydi import logger, plots,workflow,dataset,main +from laydi import logger, plots, workflow, dataset, main, annotations from laydi.lib import blmfuncs,nx_utils,validation,engines,cx_stats,cx_utils import gobrowser, geneontology import scipy @@ -74,6 +74,15 @@ class SmallTestWorkflow(workflow.Workflow): go.add_function(MapGene2GO()) self.add_stage(go) + # Load annotations + fn = self.get_data_file_name('go-terms.ann') + if fn is not None: + annotations.read_annotations_file(fn) + + fn = self.get_data_file_name('gene_ids.ann') + if fn is not None: + annotations.read_annotations_file(fn) + # EXTRA PLOTS #plt = workflow.Stage('net', 'Network') #plt.add_function(nx_analyser.KeggNetworkAnalyser())