Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions analysis/data_sets_I/run_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
#
# Copyright (c) 2013, Novartis Institutes for BioMedical Research Inc.
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# met:
#
# * Redistributions of source code must retain the above copyright
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of Novartis Institutes for BioMedical Research Inc.
# nor the names of its contributors may be used to endorse or promote
# * Neither the name of Novartis Institutes for BioMedical Research Inc.
# nor the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Expand All @@ -45,7 +45,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

import gzip, cPickle, math, sys, os, os.path
import gzip, pickle, math, sys, os, os.path
import numpy as np
from scipy import special, stats
from collections import defaultdict
Expand Down Expand Up @@ -92,7 +92,7 @@

# loop over dataset sources
for dataset in conf.set_data.keys():
print dataset
print( dataset)
# output directories and input directory
outdir = outpath+'/'+dataset
if not os.path.exists(outdir): os.makedirs(outdir)
Expand All @@ -101,13 +101,13 @@
inpath = tmppath+'/'+dataset

# loop over targets
for target in conf.set_data:
print target
for target in conf.set_data[dataset]['ids']:
print( target)

# load results
validation = cPickle.load(gzip.open(inpath+'/validation_'+str(target)+'.pkl.gz', 'r'))
methodkeys = validation.keys()
fpkeys = validation[methodkeys[0]].keys()
validation = pickle.load(gzip.open(inpath+'/validation_'+str(target)+'.pkl.gz', 'rb'))
methodkeys = list(validation.keys())
fpkeys = list(validation[methodkeys[0]].keys())

# if ranks is not yet set: prepare it
if len(ranks) == 0:
Expand Down
22 changes: 11 additions & 11 deletions analysis/data_sets_I/run_fp_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
#
# Copyright (c) 2013, Novartis Institutes for BioMedical Research Inc.
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# met:
#
# * Redistributions of source code must retain the above copyright
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of Novartis Institutes for BioMedical Research Inc.
# nor the names of its contributors may be used to endorse or promote
# * Neither the name of Novartis Institutes for BioMedical Research Inc.
# nor the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Expand All @@ -43,7 +43,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

import gzip, cPickle, sys, os, os.path
import gzip, pickle, sys, os, os.path
from collections import defaultdict
from optparse import OptionParser

Expand Down Expand Up @@ -81,17 +81,17 @@

# loop over dataset sources
for dataset in conf.set_data.keys():
print dataset
print( dataset)
# input path
inpath = outpath+'/'+dataset

# loop over targets
for target in conf.set_data[dataset]['ids']:
print target
print( target)

# load results
results, fpkeys = ana_func.readFile(open(inpath+'/target_'+str(target)+'.txt', 'r'))
methodkeys = results.keys()
methodkeys = list(results.keys())

# if summary is not yet set: prepare it
if len(summary) == 0:
Expand Down
22 changes: 11 additions & 11 deletions analysis/data_sets_I/run_method_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
#
# Copyright (c) 2013, Novartis Institutes for BioMedical Research Inc.
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# met:
#
# * Redistributions of source code must retain the above copyright
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of Novartis Institutes for BioMedical Research Inc.
# nor the names of its contributors may be used to endorse or promote
# * Neither the name of Novartis Institutes for BioMedical Research Inc.
# nor the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Expand All @@ -43,7 +43,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

import gzip, cPickle, sys, os, os.path
import gzip, pickle, sys, os, os.path
from collections import defaultdict
from optparse import OptionParser

Expand Down Expand Up @@ -81,17 +81,17 @@

# loop over dataset sources
for dataset in conf.set_data.keys():
print dataset
print( dataset)
# input directory
inpath = outpath+'/'+dataset

# loop over targets
for target in conf.set_data[dataset]['ids']:
print target
print( target)

# load results
results, fpkeys = ana_func.readFile(open(inpath+'/target_'+str(target)+'.txt', 'r'))
methodkeys = results.keys()
methodkeys = list(results.keys())

# if summary is not yet set: prepare it
if len(summary) == 0:
Expand Down
22 changes: 11 additions & 11 deletions analysis/data_sets_II/run_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
#
# Copyright (c) 2013, Novartis Institutes for BioMedical Research Inc.
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# met:
#
# * Redistributions of source code must retain the above copyright
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of Novartis Institutes for BioMedical Research Inc.
# nor the names of its contributors may be used to endorse or promote
# * Neither the name of Novartis Institutes for BioMedical Research Inc.
# nor the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Expand All @@ -45,7 +45,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

import gzip, cPickle, math, sys, os, os.path
import gzip, pickle, math, sys, os, os.path
import numpy as np
from scipy import special, stats
from collections import defaultdict
Expand Down Expand Up @@ -99,11 +99,11 @@

# loop over targets
for target in conf.set_data:
print target
print( target)

# load results
validation = cPickle.load(gzip.open(inpath+'/validation_'+str(target)+'.pkl.gz', 'r'))
methodkeys = validation.keys()
validation = pickle.load(gzip.open(inpath+'/validation_'+str(target)+'.pkl.gz', 'rb'))
methodkeys = list(validation.keys())
fpkeys = validation[methodkeys[0]].keys()

# if ranks is not yet set: prepare it
Expand Down
20 changes: 10 additions & 10 deletions analysis/data_sets_II/run_fp_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
#
# Copyright (c) 2013, Novartis Institutes for BioMedical Research Inc.
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# met:
#
# * Redistributions of source code must retain the above copyright
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of Novartis Institutes for BioMedical Research Inc.
# nor the names of its contributors may be used to endorse or promote
# * Neither the name of Novartis Institutes for BioMedical Research Inc.
# nor the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Expand All @@ -43,7 +43,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

import gzip, cPickle, sys, os, os.path
import gzip, pickle, sys, os, os.path
from collections import defaultdict
from optparse import OptionParser

Expand Down Expand Up @@ -84,11 +84,11 @@

# loop over targets
for target in conf.set_data:
print target
print( target)

# load results
results, fpkeys = ana_func.readFile(open(inpath+'/target_'+str(target)+'.txt', 'r'))
methodkeys = results.keys()
methodkeys = list(results.keys())

# if summary is not yet set: prepare it
if len(summary) == 0:
Expand Down
18 changes: 9 additions & 9 deletions analysis/data_sets_II/run_method_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
#
# Copyright (c) 2013, Novartis Institutes for BioMedical Research Inc.
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# met:
#
# * Redistributions of source code must retain the above copyright
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of Novartis Institutes for BioMedical Research Inc.
# nor the names of its contributors may be used to endorse or promote
# * Neither the name of Novartis Institutes for BioMedical Research Inc.
# nor the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Expand All @@ -43,7 +43,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

import gzip, cPickle, sys, os, os.path
import gzip, pickle, sys, os, os.path
from collections import defaultdict
from optparse import OptionParser

Expand Down Expand Up @@ -84,7 +84,7 @@

# loop over targets
for target in conf.set_data:
print target
print( target)

# load results
results, fpkeys = ana_func.readFile(open(inpath+'/target_'+str(target)+'.txt', 'r'))
Expand Down
Loading