예제 #1
0
    def test_dist(self):
        # dist = self.data.dist_matrix()
        # assert isinstance(dist, matplotlib.figure.Figure)
        copy_data = self.data.copy()
        copy_data.remove_redundant(level='sample', verbose=False, inplace=True)
        copy_data.dist_matrix()

        copy_data.heatmap(convert_to_log=True,
                          index='term_name',
                          columns='sample_id',
                          figsize=(6, 14),
                          annotate_sig=True,
                          linewidths=.01,
                          cluster_row=True)
        plt.close()
        dist = self.data.dist_matrix(figsize=(3, 3), level='each')
        ok_(isinstance(dist, matplotlib.figure.Figure))
        plt.close()

        df = load_data(
            os.path.join(os.path.dirname(__file__), 'Data',
                         'example_apoptosis.csv'))
        terms = [{'BAX'}, {'PARP4'}]
        heatmap_by_terms(df.species, ['1', '2'], terms)
        plt.close()
예제 #2
0
import os

from magine.data.experimental_data import load_data

file_path = os.path.join(os.path.dirname(__file__), 'Data',
                         'norris_et_al_2017_cisplatin_data.csv.gz')

exp_data = load_data(file_path, low_memory=False)
예제 #3
0
import os

from magine.data.experimental_data import load_data

# location of data file
file_path = os.path.join(os.path.dirname(__file__), 'Data',
                         'bendamustine_data.csv.gz')
""" 
This loads the ExperimentalData Class instance.
You can load it into any file with the line

'from exp_data import exp_data'

"""
exp_data = load_data(file_path, low_memory=False, index_col=0)
예제 #4
0
 def setUp(self):
     self._dir = os.path.join(os.path.dirname(__file__), 'Data')
     self.exp_data = load_data(
         os.path.join(self._dir, 'example_apoptosis.csv')
     )
     self.out_dir = tempfile.mkdtemp()
예제 #5
0
import os

from magine.data.experimental_data import load_data

data_dir = os.path.dirname(__file__)
exp_data = load_data(
    os.path.join(os.path.join(data_dir, 'Data'), 'example_apoptosis.csv'))