Esempio n. 1
0
"""proc.py
"""

import sys
sys.path.append("/x/PyMS")

from pyms.GCMS.IO.JCAMP.Function import JCAMP_reader
from pyms.GCMS.Function import build_intensity_matrix
from pyms.Utils.IO import save_data

# read the raw data as a GCMS_data object
jcamp_file = "/x/PyMS/data/gc01_0812_066.jdx"
data = JCAMP_reader(jcamp_file)

# IntensityMatrix
# must build intensity matrix before accessing any intensity matrix methods.

# default, float masses with interval (bin interval) of one from min mass
print "default intensity matrix, bin interval = 1, boundary +/- 0.5"
im = build_intensity_matrix(data)

#
# Saving data
#

# save the intensity matrix values to a file
mat = im.get_matrix_list()
print "saving intensity matrix intensity values..."
save_data("output/im.dat", mat)

# Export the entire IntensityMatrix as CSV. This will create
Esempio n. 2
0
"""proc.py
"""

import sys
sys.path.append("/x/PyMS")

from pyms.GCMS.IO.JCAMP.Function import JCAMP_reader
from pyms.GCMS.Function import build_intensity_matrix
from pyms.Utils.IO import save_data

# read the raw data as a GCMS_data object
jcamp_file = "/x/PyMS/data/gc01_0812_066.jdx"
data = JCAMP_reader(jcamp_file)

# IntensityMatrix
# must build intensity matrix before accessing any intensity matrix methods.

# default, float masses with interval (bin interval) of one from min mass
print "default intensity matrix, bin interval = 1, boundary +/- 0.5"
im = build_intensity_matrix(data)

#
# MassSpectrum
#

ms = im.get_ms_at_index(0)

# attributes and properties
print len(ms)
print len(ms.mass_list)
print len(ms.mass_spec)
Esempio n. 3
0
"""proc.py
"""

import sys
sys.path.append("/x/PyMS")

from pyms.GCMS.IO.JCAMP.Function import JCAMP_reader

# read the raw data
jcamp_file = "/x/PyMS/data/gc01_0812_066.jdx"
data = JCAMP_reader(jcamp_file)

# raw data operations
print "minimum mass found in all data: ", data.get_min_mass()
print "maximum mass found in all data: ", data.get_max_mass()

# time
time = data.get_time_list()
print "number of retention times: ", len(time)
print "retention time of 1st scan: ", time[0], "sec"
print "index of 400sec in time_list: ", data.get_index_at_time(400.0)

# TIC
tic = data.get_tic()
print "number of scans in TIC: ", len(tic)
print "start time of TIC: ", tic.get_time_at_index(0), "sec"

# raw scans
scans = data.get_scan_list()

print "number of masses in 1st scan: ", len(scans[0])
Esempio n. 4
0
"""proc.py
"""

import sys
sys.path.append("/x/PyMS")

from pyms.GCMS.IO.JCAMP.Function import JCAMP_reader
from pyms.GCMS.Function import build_intensity_matrix
from pyms.Utils.IO import save_data

# read the raw data as a GCMS_data object
jcamp_file = "/x/PyMS/data/gc01_0812_066.jdx"
data = JCAMP_reader(jcamp_file)

# IntensityMatrix
# must build intensity matrix before accessing any intensity matrix methods.

# default, float masses with interval (bin interval) of one from min mass
print "default intensity matrix, bin interval = 1, boundary +/- 0.5"
im = build_intensity_matrix(data)

#
# MassSpectrum
#

ms = im.get_ms_at_index(0)

# attributes and properties
print len(ms)
print len(ms.mass_list)
print len(ms.mass_spec)