In [1]:
%matplotlib notebook
import sys
import pandas as pd
import os
import tables
import pickle

# os.environ['R_LIBS_USER'] = '/project/projectdirs/metatlas/r_pkgs/'

# sys.path.insert(0, '/project/projectdirs/metatlas/python_pkgs/')
#sys.path.insert(0,'/global/project/projectdirs/metatlas/anaconda/lib/python2.7/site-packages' )

from metatlas import metatlas_objects as metob
from metatlas import h5_query as h5q
from metatlas import gui as mgui

import qgrid
import metatlas_get_data_helper_fun as ma_data

In [2]:
mgui.show_experiments()
# lcms_files = metob.retrieve('Lcmsrun', mzml_file = '%_SJ_%BEMC%',username='*')
# print len(lcms_files)
# metob.edit_objects(lcms_files)


[{'creation_time': '2015-09-19T21:33:26',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_9.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_9.h5',
 'head_id': u'06f898a682ea45779b1a309570d19bfa',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:20',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_9.mzML',
 'name': u'20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_9.mzML',
 'prev_uid': u'd79a27dfec814c25a12a49d90e80ab88',
 'sample': None,
 'unique_id': u'06f898a682ea45779b1a309570d19bfa',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:26',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_60.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_60.h5',
 'head_id': u'0be76bd5150c4d4d92537821c3d3c3c4',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:20',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_60.mzML',
 'name': u'20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_60.mzML',
 'prev_uid': u'2e95c84e81644f8ca3409cc4a90c488e',
 'sample': None,
 'unique_id': u'0be76bd5150c4d4d92537821c3d3c3c4',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:26',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F11_1to10dil_C18_POS_MSMS_ACN_7.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_1to10dil_C18_POS_MSMS_ACN_7.h5',
 'head_id': u'2e445c35601248b3bae4023a5ce7a8d6',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:20',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_1to10dil_C18_POS_MSMS_ACN_7.mzML',
 'name': u'20141211_actinorhodin_agar_2F11_1to10dil_C18_POS_MSMS_ACN_7.mzML',
 'prev_uid': u'7f7e661a34984c06a74d66229be78662',
 'sample': None,
 'unique_id': u'2e445c35601248b3bae4023a5ce7a8d6',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:26',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_6.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_6.h5',
 'head_id': u'4fddbd7fab7f437bb2d8c2e30244c637',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:20',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_6.mzML',
 'name': u'20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_6.mzML',
 'prev_uid': u'86ebf29816fe44258e7f79c22e2d6820',
 'sample': None,
 'unique_id': u'4fddbd7fab7f437bb2d8c2e30244c637',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:28',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_II_IV_C18_NEG_MSMS_ACN_20.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_C18_NEG_MSMS_ACN_20.h5',
 'head_id': u'502b6e4bc60a487588600fc622ca1cf1',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:20',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_C18_NEG_MSMS_ACN_20.mzML',
 'name': u'20141211_actinorhodin_agar_II_IV_C18_NEG_MSMS_ACN_20.mzML',
 'prev_uid': u'4fdde71e16464937b072ea91cddb86ef',
 'sample': None,
 'unique_id': u'502b6e4bc60a487588600fc622ca1cf1',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:26',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_POS_MSMS_ACN_pre3.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_pre3.h5',
 'head_id': u'513bc89d567c4f11a790cd2c37c81bd7',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:20',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_pre3.mzML',
 'name': u'20141211_MeOHBlank_C18_POS_MSMS_ACN_pre3.mzML',
 'prev_uid': u'58b10694968d426893c879e437e0e3aa',
 'sample': None,
 'unique_id': u'513bc89d567c4f11a790cd2c37c81bd7',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:28',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_II_IV_C18_POS_MSMS_ACN_10.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_C18_POS_MSMS_ACN_10.h5',
 'head_id': u'56471a27392b41c1985f5a8994fa776c',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:20',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_C18_POS_MSMS_ACN_10.mzML',
 'name': u'20141211_actinorhodin_agar_II_IV_C18_POS_MSMS_ACN_10.mzML',
 'prev_uid': u'feb4632b23a64a00a83a4525d8f7138d',
 'sample': None,
 'unique_id': u'56471a27392b41c1985f5a8994fa776c',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:27',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F4_C18_NEG_MSMS_ACN_50.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_C18_NEG_MSMS_ACN_50.h5',
 'head_id': u'6138e7242a9a496c8705e7e0c89fab9f',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:20',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_C18_NEG_MSMS_ACN_50.mzML',
 'name': u'20141211_actinorhodin_agar_2F4_C18_NEG_MSMS_ACN_50.mzML',
 'prev_uid': u'64d5b57190ee4348ac08a37c41376517',
 'sample': None,
 'unique_id': u'6138e7242a9a496c8705e7e0c89fab9f',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:26',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F11_1to10dil_C18_NEG_MSMS_ACN_8.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_1to10dil_C18_NEG_MSMS_ACN_8.h5',
 'head_id': u'9330fe391a54475dbdb48a09230272c5',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:20',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_1to10dil_C18_NEG_MSMS_ACN_8.mzML',
 'name': u'20141211_actinorhodin_agar_2F11_1to10dil_C18_NEG_MSMS_ACN_8.mzML',
 'prev_uid': u'8867c0f11cf1486eaa30cb72de151cfb',
 'sample': None,
 'unique_id': u'9330fe391a54475dbdb48a09230272c5',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:26',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_30.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_30.h5',
 'head_id': u'94fd1228622c4efabd351b0ea0d060a9',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:20',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_30.mzML',
 'name': u'20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_30.mzML',
 'prev_uid': u'b0a25a8e580949cda8feb0674722d244',
 'sample': None,
 'unique_id': u'94fd1228622c4efabd351b0ea0d060a9',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:27',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F11_C18_POS_MSMS_ACN_70.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_C18_POS_MSMS_ACN_70.h5',
 'head_id': u'9a98b54784214c278e42a748315d249c',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:20',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_C18_POS_MSMS_ACN_70.mzML',
 'name': u'20141211_actinorhodin_agar_2F11_C18_POS_MSMS_ACN_70.mzML',
 'prev_uid': u'3731f542ac90462daccfbfdb60746cc8',
 'sample': None,
 'unique_id': u'9a98b54784214c278e42a748315d249c',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:25',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_POS_MSMS_ACN_pre1_141211150851.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_pre1_141211150851.h5',
 'head_id': u'9db02bd901064dd680e19eb9d43b6fec',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:20',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_pre1_141211150851.mzML',
 'name': u'20141211_MeOHBlank_C18_POS_MSMS_ACN_pre1_141211150851.mzML',
 'prev_uid': u'6351ee8209c14ae2919b386378b93e88',
 'sample': None,
 'unique_id': u'9db02bd901064dd680e19eb9d43b6fec',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:25',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_POS_MSMS_ACN_pre2.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_pre2.h5',
 'head_id': u'a5e0880732a34926ba01b42f7301b57d',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:20',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_pre2.mzML',
 'name': u'20141211_MeOHBlank_C18_POS_MSMS_ACN_pre2.mzML',
 'prev_uid': u'd658a46c26a84e639759579dbbfd7072',
 'sample': None,
 'unique_id': u'a5e0880732a34926ba01b42f7301b57d',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:27',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F11_C18_NEG_MSMS_ACN_80.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_C18_NEG_MSMS_ACN_80.h5',
 'head_id': u'c2a6f0df42614f1ebec53b2f39a714cb',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:20',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_C18_NEG_MSMS_ACN_80.mzML',
 'name': u'20141211_actinorhodin_agar_2F11_C18_NEG_MSMS_ACN_80.mzML',
 'prev_uid': u'560db2eee3a44efe91967348a407d5c3',
 'sample': None,
 'unique_id': u'c2a6f0df42614f1ebec53b2f39a714cb',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:25',
 'description': u'20141211_Actinorhodin 20141211_ITSD_C18_FPS_MSMS_ACN_mid_100.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_ITSD_C18_FPS_MSMS_ACN_mid_100.h5',
 'head_id': u'd1d59fd36f9b465096e8c5ef5dd81043',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:21',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_ITSD_C18_FPS_MSMS_ACN_mid_100.mzML',
 'name': u'20141211_ITSD_C18_FPS_MSMS_ACN_mid_100.mzML',
 'prev_uid': u'ca7bff2918ec40c5a17b23dd2f27b129',
 'sample': None,
 'unique_id': u'd1d59fd36f9b465096e8c5ef5dd81043',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:28',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_II_IV_1to10dil_C18_NEG_MSMS_ACN_2.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_1to10dil_C18_NEG_MSMS_ACN_2.h5',
 'head_id': u'd3e77b46e0c74cf78282be8b3347c75d',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:21',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_1to10dil_C18_NEG_MSMS_ACN_2.mzML',
 'name': u'20141211_actinorhodin_agar_II_IV_1to10dil_C18_NEG_MSMS_ACN_2.mzML',
 'prev_uid': u'41eaa637e8af4035898ddfdbeb040f20',
 'sample': None,
 'unique_id': u'd3e77b46e0c74cf78282be8b3347c75d',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:27',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F4_1to10dil_C18_POS_MSMS_ACN_4.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_1to10dil_C18_POS_MSMS_ACN_4.h5',
 'head_id': u'dabd70fde99247049e7674779917b3da',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:21',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_1to10dil_C18_POS_MSMS_ACN_4.mzML',
 'name': u'20141211_actinorhodin_agar_2F4_1to10dil_C18_POS_MSMS_ACN_4.mzML',
 'prev_uid': u'54fe141ea40b4a35bcc26fffdbf5b40f',
 'sample': None,
 'unique_id': u'dabd70fde99247049e7674779917b3da',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:27',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F4_1to10dil_C18_NEG_MSMS_ACN_5.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_1to10dil_C18_NEG_MSMS_ACN_5.h5',
 'head_id': u'de8d88c81490424283fc844bd92e299e',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:21',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_1to10dil_C18_NEG_MSMS_ACN_5.mzML',
 'name': u'20141211_actinorhodin_agar_2F4_1to10dil_C18_NEG_MSMS_ACN_5.mzML',
 'prev_uid': u'329f424aa81c4f65b6f5ee58a5137d52',
 'sample': None,
 'unique_id': u'de8d88c81490424283fc844bd92e299e',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:25',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_FPS_MSMS_ACN_mid_90.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_FPS_MSMS_ACN_mid_90.h5',
 'head_id': u'e95408bee5184a7e891e724164b33215',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:21',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_FPS_MSMS_ACN_mid_90.mzML',
 'name': u'20141211_MeOHBlank_C18_FPS_MSMS_ACN_mid_90.mzML',
 'prev_uid': u'3b46470f4dba450da6665e49bf49c6d1',
 'sample': None,
 'unique_id': u'e95408bee5184a7e891e724164b33215',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:27',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F4_C18_POS_MSMS_ACN_40.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_C18_POS_MSMS_ACN_40.h5',
 'head_id': u'ecca425842374062ad8d63a227ad66cf',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:21',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_C18_POS_MSMS_ACN_40.mzML',
 'name': u'20141211_actinorhodin_agar_2F4_C18_POS_MSMS_ACN_40.mzML',
 'prev_uid': u'a4c09b2dc04b49b1a64b7cf87a26ee60',
 'sample': None,
 'unique_id': u'ecca425842374062ad8d63a227ad66cf',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:25',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_3.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_3.h5',
 'head_id': u'f17652d2cc4b4cf4bf18a287255dcf96',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:21',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_3.mzML',
 'name': u'20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_3.mzML',
 'prev_uid': u'12c6b443588f42d489f6644cd82feebf',
 'sample': None,
 'unique_id': u'f17652d2cc4b4cf4bf18a287255dcf96',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:28',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_II_IV_1to10dil_C18_POS_MSMS_ACN_1.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_1to10dil_C18_POS_MSMS_ACN_1.h5',
 'head_id': u'f9b85c94cd084c8f83cfc549b3d67e16',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-13T09:50:21',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_1to10dil_C18_POS_MSMS_ACN_1.mzML',
 'name': u'20141211_actinorhodin_agar_II_IV_1to10dil_C18_POS_MSMS_ACN_1.mzML',
 'prev_uid': u'a25cd0b839f04e58840abd120be0919f',
 'sample': None,
 'unique_id': u'f9b85c94cd084c8f83cfc549b3d67e16',
 'username': u'kblouie'}, {'creation_time': '2015-09-19T21:33:25',
 'description': u'20141211_Actinorhodin 20141211_ITSD_C18_FPS_MSMS_ACN_mid_100.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_ITSD_C18_FPS_MSMS_ACN_mid_100.h5',
 'head_id': u'148ef4c7fac94e10ad83b0eed474e9c1',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:36:58',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_ITSD_C18_FPS_MSMS_ACN_mid_100.mzML',
 'name': u'20141211_ITSD_C18_FPS_MSMS_ACN_mid_100.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'148ef4c7fac94e10ad83b0eed474e9c1',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:25',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_FPS_MSMS_ACN_mid_90.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_FPS_MSMS_ACN_mid_90.h5',
 'head_id': u'5dbb8277e49844fda94b20366113f8a6',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:37:14',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_FPS_MSMS_ACN_mid_90.mzML',
 'name': u'20141211_MeOHBlank_C18_FPS_MSMS_ACN_mid_90.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'5dbb8277e49844fda94b20366113f8a6',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:25',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_POS_MSMS_ACN_pre1_141211150851.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_pre1_141211150851.h5',
 'head_id': u'b6b9d60b390c4021b6fd4bb1392705ee',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:37:31',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_pre1_141211150851.mzML',
 'name': u'20141211_MeOHBlank_C18_POS_MSMS_ACN_pre1_141211150851.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'b6b9d60b390c4021b6fd4bb1392705ee',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:25',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_3.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_3.h5',
 'head_id': u'22fcca6168a1470bab6dca00dbbf56c5',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:37:48',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_3.mzML',
 'name': u'20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_3.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'22fcca6168a1470bab6dca00dbbf56c5',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:25',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_POS_MSMS_ACN_pre2.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_pre2.h5',
 'head_id': u'47ed670c4ae349e1bc2e58d357de77e6',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:38:04',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_pre2.mzML',
 'name': u'20141211_MeOHBlank_C18_POS_MSMS_ACN_pre2.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'47ed670c4ae349e1bc2e58d357de77e6',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:26',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_30.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_30.h5',
 'head_id': u'c540a4f711c64a169e900981cebf008b',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:38:22',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_30.mzML',
 'name': u'20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_30.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'c540a4f711c64a169e900981cebf008b',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:26',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_6.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_6.h5',
 'head_id': u'9a4ee53f841d445c942b36cacd46293e',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:38:41',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_6.mzML',
 'name': u'20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_6.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'9a4ee53f841d445c942b36cacd46293e',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:26',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F11_1to10dil_C18_NEG_MSMS_ACN_8.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_1to10dil_C18_NEG_MSMS_ACN_8.h5',
 'head_id': u'b7d6d4d4e5bc4c80a50973d72d5dac85',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:38:55',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_1to10dil_C18_NEG_MSMS_ACN_8.mzML',
 'name': u'20141211_actinorhodin_agar_2F11_1to10dil_C18_NEG_MSMS_ACN_8.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'b7d6d4d4e5bc4c80a50973d72d5dac85',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:26',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_60.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_60.h5',
 'head_id': u'06c974a800ef41c28cab36137b73e051',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:39:13',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_60.mzML',
 'name': u'20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_60.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'06c974a800ef41c28cab36137b73e051',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:26',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F11_1to10dil_C18_POS_MSMS_ACN_7.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_1to10dil_C18_POS_MSMS_ACN_7.h5',
 'head_id': u'bf3722df790a49979223793842b0fa64',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:39:32',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_1to10dil_C18_POS_MSMS_ACN_7.mzML',
 'name': u'20141211_actinorhodin_agar_2F11_1to10dil_C18_POS_MSMS_ACN_7.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'bf3722df790a49979223793842b0fa64',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:26',
 'description': u'20141211_Actinorhodin 20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_9.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_9.h5',
 'head_id': u'a62086ef338143be928a2a2c69a7535a',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:39:49',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_9.mzML',
 'name': u'20141211_MeOHBlank_C18_POS_MSMS_ACN_mid_9.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'a62086ef338143be928a2a2c69a7535a',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:27',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F11_C18_NEG_MSMS_ACN_80.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_C18_NEG_MSMS_ACN_80.h5',
 'head_id': u'0a4d8725ea7340ff8822ab0d15aa4a53',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:40:03',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_C18_NEG_MSMS_ACN_80.mzML',
 'name': u'20141211_actinorhodin_agar_2F11_C18_NEG_MSMS_ACN_80.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'0a4d8725ea7340ff8822ab0d15aa4a53',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:27',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F11_C18_POS_MSMS_ACN_70.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_C18_POS_MSMS_ACN_70.h5',
 'head_id': u'488a31239e4749968eebdc6be4a37be3',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:40:24',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F11_C18_POS_MSMS_ACN_70.mzML',
 'name': u'20141211_actinorhodin_agar_2F11_C18_POS_MSMS_ACN_70.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'488a31239e4749968eebdc6be4a37be3',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:27',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F4_1to10dil_C18_NEG_MSMS_ACN_5.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_1to10dil_C18_NEG_MSMS_ACN_5.h5',
 'head_id': u'7f6b62e01e5e425fb46d2005c68b6345',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:40:38',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_1to10dil_C18_NEG_MSMS_ACN_5.mzML',
 'name': u'20141211_actinorhodin_agar_2F4_1to10dil_C18_NEG_MSMS_ACN_5.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'7f6b62e01e5e425fb46d2005c68b6345',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:27',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F4_1to10dil_C18_POS_MSMS_ACN_4.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_1to10dil_C18_POS_MSMS_ACN_4.h5',
 'head_id': u'55ba3d978d7641cf93a99f6649573cff',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:40:56',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_1to10dil_C18_POS_MSMS_ACN_4.mzML',
 'name': u'20141211_actinorhodin_agar_2F4_1to10dil_C18_POS_MSMS_ACN_4.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'55ba3d978d7641cf93a99f6649573cff',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:27',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F4_C18_NEG_MSMS_ACN_50.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_C18_NEG_MSMS_ACN_50.h5',
 'head_id': u'ea509f86341d4167b52043ae18bf7c92',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:41:10',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_C18_NEG_MSMS_ACN_50.mzML',
 'name': u'20141211_actinorhodin_agar_2F4_C18_NEG_MSMS_ACN_50.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'ea509f86341d4167b52043ae18bf7c92',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:27',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_2F4_C18_POS_MSMS_ACN_40.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_C18_POS_MSMS_ACN_40.h5',
 'head_id': u'87ac62b2e5b546cbb4bfba061d6effad',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:41:30',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_2F4_C18_POS_MSMS_ACN_40.mzML',
 'name': u'20141211_actinorhodin_agar_2F4_C18_POS_MSMS_ACN_40.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'87ac62b2e5b546cbb4bfba061d6effad',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:28',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_II_IV_1to10dil_C18_NEG_MSMS_ACN_2.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_1to10dil_C18_NEG_MSMS_ACN_2.h5',
 'head_id': u'91e44c2076c544a7807fa276266f606d',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:41:43',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_1to10dil_C18_NEG_MSMS_ACN_2.mzML',
 'name': u'20141211_actinorhodin_agar_II_IV_1to10dil_C18_NEG_MSMS_ACN_2.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'91e44c2076c544a7807fa276266f606d',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:28',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_II_IV_C18_NEG_MSMS_ACN_20.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_C18_NEG_MSMS_ACN_20.h5',
 'head_id': u'cb37a5f999014d3a9f462f6ba20c469a',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:41:57',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_C18_NEG_MSMS_ACN_20.mzML',
 'name': u'20141211_actinorhodin_agar_II_IV_C18_NEG_MSMS_ACN_20.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'cb37a5f999014d3a9f462f6ba20c469a',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:28',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_II_IV_1to10dil_C18_POS_MSMS_ACN_1.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_1to10dil_C18_POS_MSMS_ACN_1.h5',
 'head_id': u'06d7674208dc434793a44295417f8775',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:42:15',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_1to10dil_C18_POS_MSMS_ACN_1.mzML',
 'name': u'20141211_actinorhodin_agar_II_IV_1to10dil_C18_POS_MSMS_ACN_1.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'06d7674208dc434793a44295417f8775',
 'username': u'pasteur'}, {'creation_time': '2015-09-19T21:33:28',
 'description': u'20141211_Actinorhodin 20141211_actinorhodin_agar_II_IV_C18_POS_MSMS_ACN_10.mzML',
 'experiment': u'20141211_Actinorhodin',
 'hdf5_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_C18_POS_MSMS_ACN_10.h5',
 'head_id': u'5c0ac00eb7e2468b8e079d27c7332956',
 'injection_volume': 0.0,
 'injection_volume_units': 'xx',
 'last_modified': '2015-12-27T03:42:35',
 'method': None,
 'mzml_file': u'/global/project/projectdirs/metatlas/raw_data/kblouie/20141211_Actinorhodin/20141211_actinorhodin_agar_II_IV_C18_POS_MSMS_ACN_10.mzML',
 'name': u'20141211_actinorhodin_agar_II_IV_C18_POS_MSMS_ACN_10.mzML',
 'prev_uid': u'origin',
 'sample': None,
 'unique_id': u'5c0ac00eb7e2468b8e079d27c7332956',
 'username': u'pasteur'}]

In [16]:
f = '/global/project/projectdirs/metatlas/raw_data/tls/20150920_TS_BSCporewater_neg_6550/150920_TS_neg_19B_49h.h5'
with tables.open_file(f) as fid:
    data = h5q.get_data(fid,ms_level=1,polarity = 0)

In [17]:
data


Out[17]:
array([(60.002628326416016, 231.50694274902344, 36.82743453979492),
       (60.003421783447266, 329.058837890625, 27.451549530029297),
       (60.003604888916016, 242.08688354492188, 37.627567291259766), ...,
       (1199.703369140625, 266.8292541503906, 27.14313316345215),
       (1199.703857421875, 268.0277099609375, 20.5174503326416),
       (1199.703857421875, 236.2022705078125, 18.933950424194336)], 
      dtype=[('mz', '<f4'), ('i', '<f4'), ('rt', '<f4')])

In [15]:
#Select the group
# group = metob.retrieve('Groups', name = '%LS_Archetypes%hilic%neg%')
temp_group = metob.retrieve('Groups', name = '%LS_Archetypes%R2A%hilic%pos%')
# temp_group = metob.retrieve('Groups', name = '%Replicate_Analysis_R2A_HILIC_neg%')
print temp_group
group = []
for i,g in enumerate(temp_group):
    if len(g.items) > 0:
        group.append(g)

# group = metob.retrieve('Groups',name='%Avena_Hopland%RootCass%_neg')
# group = metob.retrieve('Groups',name='%Avena_Hopland%RootCass%_pos')
# group = metob.retrieve('Groups',name='%Avena_Hopland%RootExu%')
# group = metob.retrieve('Groups',name='%Avena_Hopland%RootExu%_pos')
# group = metob.retrieve('Groups',name='%Avena_Hopland%RootExu%_neg')

mgui.edit_objects(group)


[{'creation_time': '2015-12-01T00:00:34',
 'description': u'none',
 'head_id': u'b424034a207948a4a28beb0099fff780',
 'items': [{'creation_time': '2015-09-20T03:38:09',
 'description': u'20150504_LPSilva_Actino_HILIC_POS_51isolates 20150424_pHILIC_POS_MSMS_R2A-1.mzML',
 'experiment': u'20150504_LPSilva_Actino_HILIC_POS_51isolates',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/lpsilva/20150504_LPSilva_Actino_HILIC_POS_51isolates/20150424_pHILIC_POS_MSMS_R2A-1.h5',
 'head_id': u'b815401e82fe40669bfb8615839aba68',
 'last_modified': '2015-12-13T15:50:24',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/lpsilva/20150504_LPSilva_Actino_HILIC_POS_51isolates/20150424_pHILIC_POS_MSMS_R2A-1.mzML',
 'name': u'20150424_pHILIC_POS_MSMS_R2A-1.mzML',
 'prev_uid': u'6f1a26a40b8a48bfb03d7a47501fb94b',
 'sample': None,
 'unique_id': u'b815401e82fe40669bfb8615839aba68',
 'username': u'bpb'},
           {'creation_time': '2015-09-20T03:38:10',
 'description': u'20150504_LPSilva_Actino_HILIC_POS_51isolates 20150424_pHILIC_POS_MSMS_R2A-2.mzML',
 'experiment': u'20150504_LPSilva_Actino_HILIC_POS_51isolates',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/lpsilva/20150504_LPSilva_Actino_HILIC_POS_51isolates/20150424_pHILIC_POS_MSMS_R2A-2.h5',
 'head_id': u'a46a7115b86f44c8bbd428fa3b60c4e5',
 'last_modified': '2015-12-13T15:50:24',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/lpsilva/20150504_LPSilva_Actino_HILIC_POS_51isolates/20150424_pHILIC_POS_MSMS_R2A-2.mzML',
 'name': u'20150424_pHILIC_POS_MSMS_R2A-2.mzML',
 'prev_uid': u'490a4af399054bb5a322f047da551780',
 'sample': None,
 'unique_id': u'a46a7115b86f44c8bbd428fa3b60c4e5',
 'username': u'bpb'},
           {'creation_time': '2015-09-20T03:38:11',
 'description': u'20150504_LPSilva_Actino_HILIC_POS_51isolates 20150424_pHILIC_POS_MSMS_R2A-3.mzML',
 'experiment': u'20150504_LPSilva_Actino_HILIC_POS_51isolates',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/lpsilva/20150504_LPSilva_Actino_HILIC_POS_51isolates/20150424_pHILIC_POS_MSMS_R2A-3.h5',
 'head_id': u'145b831f71b14828834680b2ad3a91c6',
 'last_modified': '2015-12-13T15:50:24',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/lpsilva/20150504_LPSilva_Actino_HILIC_POS_51isolates/20150424_pHILIC_POS_MSMS_R2A-3.mzML',
 'name': u'20150424_pHILIC_POS_MSMS_R2A-3.mzML',
 'prev_uid': u'651b77096c7e4191b76b0f7abaddcd7d',
 'sample': None,
 'unique_id': u'145b831f71b14828834680b2ad3a91c6',
 'username': u'bpb'},
           {'creation_time': '2015-09-20T03:38:11',
 'description': u'20150504_LPSilva_Actino_HILIC_POS_51isolates 20150424_pHILIC_POS_MSMS_R2A-4.mzML',
 'experiment': u'20150504_LPSilva_Actino_HILIC_POS_51isolates',
 'hdf5_file': u'/project/projectdirs/metatlas/raw_data/lpsilva/20150504_LPSilva_Actino_HILIC_POS_51isolates/20150424_pHILIC_POS_MSMS_R2A-4.h5',
 'head_id': u'7f168375c6414f6b83945c37e6071672',
 'last_modified': '2015-12-13T15:50:24',
 'method': None,
 'mzml_file': u'/project/projectdirs/metatlas/raw_data/lpsilva/20150504_LPSilva_Actino_HILIC_POS_51isolates/20150424_pHILIC_POS_MSMS_R2A-4.mzML',
 'name': u'20150424_pHILIC_POS_MSMS_R2A-4.mzML',
 'prev_uid': u'57f619a2bfbe4480bf971b03e0ae793c',
 'sample': None,
 'unique_id': u'7f168375c6414f6b83945c37e6071672',
 'username': u'bpb'}],
 'last_modified': '2015-12-01T00:00:34',
 'name': u'20151130_LS_Archetypes_R2A_HILIC_pos',
 'prev_uid': u'origin',
 'unique_id': u'b424034a207948a4a28beb0099fff780',
 'username': u'bpb'}]
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-15-e47cd4b1d22c> in <module>()
     15 # group = metob.retrieve('Groups',name='%Avena_Hopland%RootExu%_neg')
     16 
---> 17 mgui.edit_objects(group)

/global/project/projectdirs/metatlas/anaconda/lib/python2.7/site-packages/metatlas/gui.pyc in edit_objects(objects)
    323         return _edit_object(objects)
    324     if len(objects) == 1:
--> 325         return _edit_object(objects[0])
    326 
    327     grid = create_qgrid(objects)

/global/project/projectdirs/metatlas/anaconda/lib/python2.7/site-packages/metatlas/gui.pyc in _edit_object(obj)
    276                 value is None):
    277             if isinstance(trait, traitlets.Instance):
--> 278                 value = value.unique_id
    279             elif isinstance(trait, traitlets.List):
    280                 value = [o.unique_id for o in value]

AttributeError: 'NotifyList' object has no attribute 'unique_id'

In [20]:
#Select the atlas
# atlas = metob.retrieve('Atlas',name = '%_Hilic_QExactive_AvenaExudates_2%')
# atlas = metob.retrieve('Atlas',name = '%_Positive%_Hilic_QExactive_AvenaExudates_2%')
# atlas = metob.retrieve('Atlas',name = '%_Negative%_Hilic_QExactive_AvenaExudates_2%')
# atlas = metob.retrieve('Atlas',name = '%internal standards%')
atlas = metob.retrieve('Atlas',name = '%Positive_Hilic_QExactive_Archetypes%')#_Archetypes_ISTDs%')
# 20151130_LS_Positive_Hilic_QExactive_Archetypes_ISTDs
# 20151130_LS_Negative_Hilic_QExactive_Archetypes_ISTDs
mgui.edit_objects(atlas)

In [29]:
# myAtlases = [atlas[0],atlas[1]] #concatenate the atlases you want to use
# myAtlases = [atlas[0]]
myAtlas = [atlas[1]]
compound_list = []
for i in range(len(myAtlas[0].compound_identifications)):
    compound_list.append(myAtlas[0].compound_identifications[i].compound[0].name)

cols = ['inchi',
 'mono_isotopic_molecular_weight',
 'creation_time',
 'description',
 'formula',
 'functional_sets',
 'last_modified',
 'reference_xrefs',
 'synonyms',
 'unique_id',
 'url',
 'username']
    
    # print myAtlas[0].compound_identifications[0].compound
atlas_export = pd.DataFrame( index=compound_list, columns=cols)

atlas_export['name'] = compound_list
atlas_export.set_index('name',drop=True)
for i in range(len(myAtlas[0].compound_identifications)):
    n = myAtlas[0].compound_identifications[i].compound[0].name
    for c in cols:
        g = getattr(myAtlas[0].compound_identifications[i].compound[0],c)
        if g:
            atlas_export.ix[n,c] = getattr(myAtlas[0].compound_identifications[i].compound[0],c)
    atlas_export.ix[n,'rt_min'] = myAtlas[0].compound_identifications[i].rt_references[0].rt_min
    atlas_export.ix[n,'rt_max'] = myAtlas[0].compound_identifications[i].rt_references[0].rt_max
    atlas_export.ix[n,'rt_peak'] = myAtlas[0].compound_identifications[i].rt_references[0].rt_peak
    atlas_export.ix[n,'mz'] = myAtlas[0].compound_identifications[i].mz_references[0].mz
    atlas_export.ix[n,'mz_tolerance'] = myAtlas[0].compound_identifications[i].mz_references[0].mz_tolerance
atlas_export.to_csv('20151214_leslie_hilic_pos.csv')
# for d in data:
#     c = d[2]
#     f = d[4]
#     if len(d[1])>0:
#         v = max(d[1])
#     else:
#         v = 0
#     peak_height.ix[c,f] = v

In [27]:
myAtlas[0].compound_identifications[i].rt_references[0].rt_min
myAtlas[0].compound_identifications[i].rt_references[0].rt_max
myAtlas[0].compound_identifications[i].rt_references[0].rt_peak
myAtlas[0].compound_identifications[i].mz_references[0]
myAtlas[0].compound_identifications[i].mz_references[0].mz
myAtlas[0].compound_identifications[i].mz_references[0].mz_tolerance


Out[27]:
15.0

In [17]:
myAtlases = [atlas[1]]

In [11]:
print myAtlases[0].compound_identifications[0].compound[0].name
myAtlases[0].compound_identifications[0].mz_references
# print myAtlases[0].compound_identifications[0].references[0].mz
# print myAtlases[0].compound_identifications[0].references[0].mz_tolerance
# print myAtlases[0].compound_identifications[0].rt_references[0].rt_min
# print myAtlases[0].compound_identifications[0].rt_references[0].rt_max
# print myAtlases[0].compound_identifications[0].rt_references[0].rt_peak
# print myAtlases[0].compound_identifications[0].rt_references[0].rt_units

# print myAtlases[0].compound_identifications[0].references[1].RTmax
# print myAtlases[0].compound_identifications[0].references[1].RTpeak
# a = atlas.compound_identifications[0]
# a.description


d5-benzoic acid
Out[11]:
[]

In [6]:
# print len(allcompounds)
# print allcompounds[0]
# print allcompounds[1]
# compound_list = []
# for c in allcompounds:
#     compound_list.append(c['name'])
# dataCols = ['mzmin','mzmax','rtmin','rtmax']
# myAtlas = pd.DataFrame( index=compound_list, columns=dataCols, dtype=float)

# for c in allcompounds:
#     for d in dataCols:
#         myAtlas.ix[c['name'],d] = c[d]
# qgrid.show_grid(myAtlas)

In [9]:
# print myreferences[0].compound[0].name
# print myreferences[0].references[0].mz
# print myreferences[0].references[1].RTpeak

In [6]:


In [18]:
# get and pickle everything This is MSMS, raw MS1 datapoints, compound, group info, and file info
# combine positive and negative mode atlas, by join atlases together vs two compound references
# typically file-groups are NOT split by polarity, files with un-matched polarity will be discarded for analysis of an identification
from metatlas import h5_query as h5q
import os
import tables
import dill
ma_data = reload(ma_data)
data = []
for i,treatment_groups in enumerate(group):
    for j in range(len(treatment_groups.items)):
        myFile = treatment_groups.items[j].hdf5_file
        print i,myFile
        row = []
        for atlas in myAtlases:
            for compound in atlas.compound_identifications:
                result = {}
                result['lcmsrun'] = treatment_groups.items[j] #.unique_id
                result['group'] = treatment_groups #.unique_id
#                 result['atlas'] = atlas.unique_id
                result['identification'] = compound #.unique_id
                result['data'] = ma_data.get_data_for_a_compound(compound.mz_references[0],
                                        compound.rt_references[0],
                                        [ 'ms1_summary', 'eic', 'msms' ],
                                        myFile,0.3)
#                 print result['data']['ms1_summary']
                row.append(result)
        data.append(row)
with open('20160106_save_data_pos_r2a_replicates_hilic.pkl','w') as f:
    dill.dump(data,f)


0 /project/projectdirs/metatlas/raw_data/lpsilva/20150504_LPSilva_Actino_HILIC_POS_51isolates/20150424_pHILIC_POS_MSMS_R2A-1.h5
0 /project/projectdirs/metatlas/raw_data/lpsilva/20150504_LPSilva_Actino_HILIC_POS_51isolates/20150424_pHILIC_POS_MSMS_R2A-2.h5
0 /project/projectdirs/metatlas/raw_data/lpsilva/20150504_LPSilva_Actino_HILIC_POS_51isolates/20150424_pHILIC_POS_MSMS_R2A-3.h5
0 /project/projectdirs/metatlas/raw_data/lpsilva/20150504_LPSilva_Actino_HILIC_POS_51isolates/20150424_pHILIC_POS_MSMS_R2A-4.h5

In [7]:
data[0][0]['data']


Out[7]:
{'eic': {'intensity': array([  1.29519736e+04,   2.42093789e+04,   2.49738125e+04,
           3.11992812e+04,   3.15344688e+04,   6.35300391e+04,
           8.90617969e+04,   1.10729250e+05,   1.17598562e+05,
           6.68327500e+04,   9.95365625e+04,   8.34206250e+04,
           8.91792500e+04,   6.28883125e+04,   8.48820625e+04,
           8.49846250e+04,   8.58570000e+04,   8.59568750e+04,
           1.07759625e+05,   1.08285750e+05,   1.19434250e+05,
           1.40532250e+05,   1.44119500e+05,   1.54220750e+05,
           1.50184250e+05,   1.44659000e+05,   1.26636750e+05,
           1.25226000e+05,   1.16083250e+05,   1.07779000e+05,
           1.04105250e+05,   7.25500000e+04,   5.49607500e+04,
           2.73907500e+04,   2.12835000e+04,   1.70222500e+04,
           1.94332500e+04,   1.48000000e+04,   1.06090000e+04,
           1.05970000e+04,   6.95600000e+03,   9.98125000e+03,
           6.26800000e+03,   2.88975000e+03,   7.12400000e+03,
           2.86575000e+03,   2.53775000e+03,   5.09125000e+03,
           5.46725000e+03,   6.41050000e+03,   3.30350000e+03,
           5.03875000e+03,   7.13500000e+03,   8.82375000e+03,
           1.26395000e+04,   1.23217500e+04,   1.72695000e+04,
           2.08132500e+04,   2.76935000e+04,   3.75457500e+04,
           5.04075000e+04,   7.88115000e+04,   9.68902500e+04,
           1.79129750e+05,   2.83346000e+05,   4.19647500e+05,
           6.21539500e+05,   8.34228000e+05,   1.19976750e+06,
           1.57344700e+06,   1.94058400e+06,   2.47854600e+06,
           3.75742500e+06,   4.33471400e+06,   4.75906600e+06,
           4.90027800e+06,   6.98421000e+06,   6.95590800e+06,
           8.16382400e+06,   7.58091200e+06,   7.01474400e+06,
           6.55264000e+06,   7.62947200e+06,   6.46512000e+06,
           7.48177600e+06,   5.48298400e+06,   5.10733600e+06,
           4.02980000e+06,   4.33424800e+06,   3.98467200e+06,
           3.06313600e+06,   2.18289600e+06,   2.42668800e+06,
           2.03624800e+06,   1.97527200e+06,   1.75364000e+06,
           1.79571200e+06,   1.63038400e+06,   1.38254400e+06,
           1.64148800e+06,   1.14422400e+06,   1.25272000e+06,
           9.56992000e+05,   9.42352000e+05,   9.49648000e+05,
           6.83472000e+05,   6.36736000e+05,   5.74848000e+05,
           5.83088000e+05,   4.71248000e+05,   4.44752000e+05,
           4.05248000e+05,   3.49120000e+05,   3.19824000e+05,
           2.82448000e+05,   2.64720000e+05,   2.03920000e+05,
           2.42144000e+05,   1.83792000e+05,   1.48480000e+05,
           1.41712000e+05,   1.44192000e+05,   1.30144000e+05,
           1.16464000e+05,   1.12128000e+05,   1.07168000e+05,
           1.06976000e+05,   8.69760000e+04,   7.90720000e+04,
           5.99520000e+04,   6.32320000e+04,   7.09920000e+04,
           6.92480000e+04,   5.00000000e+04,   5.59680000e+04,
           5.29280000e+04,   5.18720000e+04,   5.83040000e+04,
           4.70080000e+04,   6.11040000e+04,   5.34560000e+04,
           4.59040000e+04,   5.04800000e+04,   5.47680000e+04,
           6.53600000e+04,   5.98080000e+04,   4.36000000e+04,
           4.96480000e+04,   5.62720000e+04,   6.84640000e+04,
           7.23680000e+04,   5.63200000e+04,   5.56320000e+04,
           5.46240000e+04,   5.98400000e+04,   4.53440000e+04,
           4.42080000e+04,   3.89760000e+04,   4.10560000e+04,
           3.68160000e+04,   4.39200000e+04,   3.59360000e+04,
           2.99040000e+04,   2.97600000e+04,   3.13120000e+04,
           3.57280000e+04], dtype=float32),
  'polarity': 1,
  'rt': array([ 10.22797775,  10.2377739 ,  10.24757004,  10.25713253,
          10.26685905,  10.27564144,  10.28439331,  10.29304123,
          10.3018074 ,  10.31011772,  10.31887436,  10.32770538,
          10.33646965,  10.34541798,  10.35425758,  10.36333179,
          10.3722887 ,  10.38121605,  10.39028931,  10.39933014,
          10.4082756 ,  10.41723156,  10.42623901,  10.435256  ,
          10.44428539,  10.45335579,  10.46234894,  10.47144508,
          10.4805851 ,  10.48933125,  10.49817944,  10.50747395,
          10.51665592,  10.52622604,  10.53606224,  10.54584694,
          10.55564499,  10.56541824,  10.57519531,  10.58498096,
          10.59477234,  10.60455132,  10.61434078,  10.62412643,
          10.63393116,  10.64372635,  10.65350628,  10.66328716,
          10.67307854,  10.68286419,  10.69264507,  10.70242691,
          10.71219921,  10.72202206,  10.73180199,  10.74158859,
          10.75138092,  10.7611618 ,  10.77097034,  10.7807579 ,
          10.79054737,  10.80035114,  10.81013489,  10.81991577,
          10.82972431,  10.83950806,  10.84928894,  10.85909462,
          10.86889935,  10.87870789,  10.88852882,  10.89830399,
          10.90813255,  10.9179287 ,  10.92772007,  10.9375124 ,
          10.94729519,  10.95708656,  10.96688461,  10.97666836,
          10.98647594,  10.99626637,  11.00605392,  11.01584339,
          11.02563858,  11.03542042,  11.0452137 ,  11.05500984,
          11.06481838,  11.07460785,  11.08439541,  11.09417439,
          11.10397911,  11.11376953,  11.12355804,  11.13335228,
          11.14314842,  11.15294456,  11.16272736,  11.1725502 ,
          11.18233681,  11.19213676,  11.20192528,  11.21170616,
          11.22149086,  11.23130226,  11.24111843,  11.25092125,
          11.26071358,  11.27050591,  11.2802887 ,  11.2900753 ,
          11.29987907,  11.30965614,  11.3191061 ,  11.32891846,
          11.3387022 ,  11.34849644,  11.35830212,  11.36809254,
          11.37794971,  11.38772869,  11.39750957,  11.4073019 ,
          11.41711426,  11.42690563,  11.43670845,  11.44650841,
          11.45630836,  11.46609116,  11.4758997 ,  11.48568916,
          11.49547482,  11.50526428,  11.51504993,  11.52484226,
          11.53465557,  11.54446411,  11.55427456,  11.56410599,
          11.57389832,  11.58368111,  11.59348106,  11.60325623,
          11.61306667,  11.62285614,  11.6326437 ,  11.64244175,
          11.65224648,  11.66204643,  11.67183876,  11.68162727,
          11.69141006,  11.70119953,  11.71098137,  11.72077465,
          11.73056889,  11.74035645,  11.75016022,  11.75996017,
          11.76975441,  11.77955437,  11.78935432,  11.79914761,
          11.80895805,  11.81876183], dtype=float32)},
 'ms1_summary': {'mz_centroid': 90.055763,
  'mz_peak': 90.055786,
  'peak_area': 887352.75,
  'peak_height': 236646.86,
  'polarity': 1,
  'rt_centroid': 10.853844,
  'rt_peak': 10.795056},
 'msms': {'data': array([ (59.97118377685547, 1140.446044921875, 10.835905075073242, 90.05999755859375, 283345.90625, 20.0),
         (61.72518539428711, 1347.5426025390625, 10.835905075073242, 90.05999755859375, 283345.90625, 20.0),
         (64.1128921508789, 1239.113525390625, 10.835905075073242, 90.05999755859375, 283345.90625, 20.0),
         (65.59719848632812, 1312.1641845703125, 10.835905075073242, 90.05999755859375, 283345.90625, 20.0),
         (70.06611633300781, 6754.47021484375, 10.835905075073242, 90.05999755859375, 283345.90625, 20.0),
         (72.08172607421875, 2713.16552734375, 10.835905075073242, 90.05999755859375, 283345.90625, 20.0),
         (80.2898941040039, 1130.07080078125, 10.835905075073242, 90.05999755859375, 283345.90625, 20.0),
         (88.0765380859375, 21636.6484375, 10.835905075073242, 90.05999755859375, 283345.90625, 20.0),
         (88.28744506835938, 1261.2904052734375, 10.835905075073242, 90.05999755859375, 283345.90625, 20.0),
         (89.07991790771484, 1576.0416259765625, 10.835905075073242, 90.05999755859375, 283345.90625, 20.0),
         (90.05532836914062, 1811.094482421875, 10.835905075073242, 90.05999755859375, 283345.90625, 20.0),
         (91.05504608154297, 1939.3316650390625, 10.835905075073242, 90.05999755859375, 283345.90625, 20.0),
         (68.93399047851562, 2695.657958984375, 11.020352363586426, 90.05999755859375, 6465119.5, 20.0),
         (70.06603240966797, 4331.9111328125, 11.020352363586426, 90.05999755859375, 6465119.5, 20.0),
         (88.07646942138672, 18082.388671875, 11.020352363586426, 90.05999755859375, 6465119.5, 20.0),
         (90.05575561523438, 59360.35546875, 11.020352363586426, 90.05999755859375, 6465119.5, 20.0),
         (57.43141174316406, 1115.161376953125, 11.196645736694336, 90.05999755859375, 1252725.875, 20.0),
         (70.06611633300781, 5520.91845703125, 11.196645736694336, 90.05999755859375, 1252725.875, 20.0),
         (72.08191680908203, 2627.969970703125, 11.196645736694336, 90.05999755859375, 1252725.875, 20.0),
         (73.0849380493164, 1137.9666748046875, 11.196645736694336, 90.05999755859375, 1252725.875, 20.0),
         (73.85841369628906, 1133.70556640625, 11.196645736694336, 90.05999755859375, 1252725.875, 20.0),
         (77.85479736328125, 1697.6953125, 11.196645736694336, 90.05999755859375, 1252725.875, 20.0),
         (88.07647705078125, 21345.900390625, 11.196645736694336, 90.05999755859375, 1252725.875, 20.0),
         (88.2959976196289, 1226.486083984375, 11.196645736694336, 90.05999755859375, 1252725.875, 20.0),
         (90.05577087402344, 9590.4541015625, 11.196645736694336, 90.05999755859375, 1252725.875, 20.0),
         (91.0550765991211, 2583.353271484375, 11.196645736694336, 90.05999755859375, 1252725.875, 20.0),
         (53.599952697753906, 929.1982421875, 11.372602462768555, 90.05553436279297, 148479.359375, 20.0),
         (55.83987045288086, 1052.127197265625, 11.372602462768555, 90.05553436279297, 148479.359375, 20.0),
         (70.0660629272461, 5205.19189453125, 11.372602462768555, 90.05553436279297, 148479.359375, 20.0),
         (88.02259063720703, 1694.0731201171875, 11.372602462768555, 90.05553436279297, 148479.359375, 20.0),
         (88.07649993896484, 16998.85546875, 11.372602462768555, 90.05553436279297, 148479.359375, 20.0),
         (91.05525970458984, 1914.97412109375, 11.372602462768555, 90.05553436279297, 148479.359375, 20.0),
         (92.0393295288086, 1450.9754638671875, 11.372602462768555, 90.05553436279297, 148479.359375, 20.0)], 
        dtype=[('mz', '<f4'), ('i', '<f4'), ('rt', '<f4'), ('precursor_MZ', '<f4'), ('precursor_intensity', '<f4'), ('collision_energy', '<f4')]),
  'most_intense_precursor': {'precursor_intensity': array([ 6465119.5     ,  1252725.875   ,   283345.90625 ,   148479.359375], dtype=float32),
   'precursor_mz': array([ 90.05999756,  90.05999756,  90.05999756,  90.05553436], dtype=float32),
   'spectra': array([[    68.93399048,   2695.65795898],
          [    70.06603241,   4331.91113281],
          [    88.07646942,  18082.38867188],
          [    90.05575562,  59360.35546875]], dtype=float32)},
  'polarity': 1}}

In [12]:
# result['identification']

In [25]:
# file_column_name = []
# group_column_name = []
# for i,treatment_groups in enumerate(group):
#     for j in range(len(treatment_groups.items)):
#         myFile = treatment_groups.items[j].hdf5_file
#         file_column_name.append(os.path.basename(myFile))
#         group_column_name.append(treatment_groups.name)
# # print file_column_name
# # print group_column_name
# compound_list = []
# for compound in atlas.compound_identifications[:3]:
#     compound_list.append(compound.compound[0].name)

In [24]:
# # column name list
# # row name list
# import pandas as pd
# import os
# peak_height = pd.DataFrame( index=compound_list, columns=file_column_name, dtype=float)
# # peak_height['compound'] = compound_list
# # peak_height.set_index('compound',drop=True)
# for d in data:
#     c = d[2]
#     f = d[4]
#     if len(d[1])>0:
#         v = max(d[1])
#     else:
#         v = 0
#     peak_height.ix[c,f] = v
    
# peak_area = pd.DataFrame( index=compound_list, columns=file_column_name, dtype=float)
# # peak_height['compound'] = compound_list
# # peak_height.set_index('compound',drop=True)
# for d in data:
#     c = d[2]
#     f = d[4]
#     if len(d[1])>0:
#         v = sum(d[1])
#     else:
#         v = 0
#     peak_area.ix[c,f] = v

In [13]:
# qgrid.show_grid(peak_height)


//anaconda/lib/python2.7/site-packages/pandas/core/internals.py:956: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  return self._try_coerce_result(func(values, other))

In [19]:
# columns = []
# for i,f in enumerate(file_column_name):
#     columns.append((group_column_name[i],f))
# peak_height.columns = pd.MultiIndex.from_tuples(columns,names=['group', 'file'])
# peak_area.columns = pd.MultiIndex.from_tuples(columns,names=['group', 'file'])


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-19-455c690ba0b0> in <module>()
      1 columns = []
----> 2 for i,f in enumerate(file_column_name):
      3     columns.append((group_column_name[i],f))
      4 peak_height.columns = pd.MultiIndex.from_tuples(columns,names=['group', 'file'])
      5 peak_area.columns = pd.MultiIndex.from_tuples(columns,names=['group', 'file'])

NameError: name 'file_column_name' is not defined

In [18]:
# m = peak_height.groupby(axis=1,level='group').mean()
# qgrid.show_grid(m)


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-18-563ccb1f649b> in <module>()
----> 1 m = peak_height.groupby(axis=1,level='group').mean()
      2 qgrid.show_grid(m)

NameError: name 'peak_height' is not defined

In [26]:
# from matplotlib import pyplot as plt

# m = peak_height.ix['adenine'].groupby(level='group').mean()
# e = peak_height.ix['adenine'].groupby(level='group').std()
# c = peak_height.ix['adenine'].groupby(level='group').count()

# for i in range(len(e)):
#     if c[i]>0:
#         e[i] = e[i] / c[i]**0.5

# fig, ax = plt.subplots()
# m.plot(yerr=e, kind='bar')
# plt.tight_layout()
# a = plt.gca()
# a.set_yscale('log')
# plt.show()



In [27]:
# peak_height.to_csv('compounds neg peak height.tab',sep='\t')
# peak_area.to_csv('compounds neg peak area.tab',sep='\t')

In [17]:
# df=pd.DataFrame({'a':[1,2,3],'b':[4,5,6]})

# columns=[('c','a'),('c','b')]

# df.columns=pd.MultiIndex.from_tuples(columns)
# df


Out[17]:
c
a b
0 1 4
1 2 5
2 3 6

In [73]:
%%javascript
var nb = IPython.notebook;
var kernel = IPython.notebook.kernel;
var command = "NOTEBOOK_FULL_PATH = '" + nb.base_url + nb.notebook_path + "'";
kernel.execute(command);



In [74]:
import os
filename = os.path.basename(NOTEBOOK_FULL_PATH)
%system cp $filename /project/projectdirs/openmsi/www/
temp = '%s/%s'%('/project/projectdirs/openmsi/www',filename)
%system chmod 775 $temp
print 'http://nbviewer.ipython.org/url/portal.nersc.gov/project/openmsi/%s?flush_cache=true'%filename


http://nbviewer.ipython.org/url/portal.nersc.gov/project/openmsi/Get a Group of Files and Atlas and Get Data.ipynb?flush_cache=true

In [ ]:
# helpful pandas hints for commands
# df
# print df.keys()
# df.loc[0,'name']
# df.filter(regex = 'name')
# df.iloc[0]
# for x in df.index:
#     print df.name[x]
#     if not metob.retrieve('Compounds',name=df.name[x]):
#         print df.name[x], "is not in database"
#     else:
#         print df.name[x], "Success"

#         
#     df = df.append(data)
#     print df.iloc[x,0]
#     print df.iloc[x]
#     print df.name[x]
# df.ix[(df['name']=='Adenine') == True]['mz']
# df.ix[(df['name']=='Adenine') == True]
# df.name.str.contains('Ad')
# df.name.str.contains('Ad').tolist()
# df

In [15]:
# files = metob.retrieve('lcmsrun',name='%Actino%')
import numpy as np
my_run = metob.retrieve('lcmsrun', hdf5_file='%20150510_C18_POS_MSMS_HE08-3%', username='*')
my_run
# for f in files:
#     print f.hdf5_file
with tables.open_file(my_run[0].hdf5_file) as fid:
    data = h5q.get_data(fid,2,1,min_rt = 2.1)#,max_rt = 17.9,min_precursor_MZ=633.12,max_precursor_MZ = 633.2)
print data['rt']
prt,pmz = get_unique_scan_data(data)
rt_cutoff = 0.23
mz_cutoff = 0.05
list_of_prt,list_of_pmz = get_non_redundant_precursor_list(prt,pmz,rt_cutoff,mz_cutoff)
#setup data format for searching
pactolus_input = {}
pactolus_input['spectra'] = []
pactolus_input['precursor_mz'] = []
for i,(prt,pmz) in enumerate(zip(list_of_prt,list_of_pmz)):
    idx = np.argwhere((data['precursor_MZ'] == pmz) & (data['rt'] == prt )).flatten()
    arr = np.array([data['mz'][idx], data['i'][idx]]).T
    pactolus_input['spectra'].append(arr)
    pactolus_input['precursor_mz'].append(pmz)


[  2.104074    2.104074    2.104074  ...,  11.5003891  11.5003891
  11.5003891]

In [20]:
import glob

# curr_ld_lib_path = ''
# os.environ['LD_LIBRARY_PATH'] = curr_ld_lib_path + ':/project/projectdirs/openmsi/jupyterhub_libs/boost_1_55_0/lib' + ':/project/projectdirs/openmsi/jupyterhub_libs/lib'
import sys
# sys.path.remove('/anaconda/lib/python2.7/site-packages')
sys.path.append('/global/project/projectdirs/openmsi/jupyterhub_libs/anaconda/lib/python2.7/site-packages')

# sys.path.insert(0,'/global/project/projectdirs/metatlas/anaconda/lib/python2.7/site-packages' )


sys.path.append('/project/projectdirs/openmsi/projects/meta-iq/pactolus/pactolus')

import score_frag_dag


pos_mode_neutralizations = [-1.00727646677, -(1.00727646677+1.00782504), +5.4857990946e-4,]
neg_mode_neutralizations = [-el for el in pos_mode_neutralizations]

# make lookup table
# path_to_trees = '/project/projectdirs/openmsi/projects/pactolus_trees/'
# all_my_h5_files = glob.glob('/project/projectdirs/openmsi/projects/pactolus_trees/*_hdf5_5_*.h5')

path_to_trees = '/project/projectdirs/openmsi/projects/ben_trees/'
all_my_h5_files = glob.glob('/project/projectdirs/openmsi/projects/ben_trees/*_hdf5_5_*.h5')

my_tree_filename = 'metacyc_max_depth_5'

if not os.path.isfile(os.path.join(path_to_trees, my_tree_filename + '.npy')):
    score_frag_dag.make_file_lookup_table_by_MS1_mass(all_my_h5_files, 
                                                      path=path_to_trees, 
                                                      save_result='metacyc_max_depth_5')

maxdepth_5_table = os.path.join(path_to_trees, my_tree_filename + '.npy')

params = {'file_lookup_table': maxdepth_5_table,
          'ms1_mass_tol': 0.05,
          'ms2_mass_tol': 0.05,
          'neutralizations': pos_mode_neutralizations,
          'max_depth': 5,
              }

In [21]:
print len(pactolus_input['spectra'])


580

In [39]:
import time

for i in range(10):
    start = time.time()
    foo = score_frag_dag.score_scan_list_against_trees([pactolus_input['spectra'][i]], [pactolus_input['precursor_mz'][i]], params)
    stop = time.time()
    print stop - start, np.sum(foo>0)
# np.argmax(foo)


0.00915908813477 0
0.225470066071 31
13.8581519127 24
0.199229955673 29
0.205362796783 13
0.293752908707 37
1.79723000526 133
0.200758218765 28
0.278684139252 48
0.00717997550964 0

In [27]:
metatlas_molecules = np.load(maxdepth_5_table)

In [33]:
metatlas_molecules.shape


Out[33]:
(13190,)

In [25]:
foo.shape


Out[25]:
(5, 13190)

In [ ]:
my_db = '/project/projectdirs/openmsi/projects/meta-iq/pactolus/data/' + 'MetaCyc.mdb'
pactolus_results = score_frag_dag.make_pactolus_hit_table(foo, maxdepth_5_table, original_db=my_db)

In [ ]:
for r in pactolus_results:
    if len(r)>0:
        print r[0]