00001
#ifndef _MS_MS_SPEC_H_
00002
#define _MS_MS_SPEC_H_
00003
00004
#include "proteome/peptide_tk.h"
00005
#include "ms_ms_spectrum_header.h"
00006
#include "ms_ms_spectrum_header_array_search.h"
00007
00008
struct MS_MS_Spectrum
00009 {
00010
struct MS_MS_SpectrumHeader header;
00011
00012
00013 Peptide* peptide;
00014
float threshold;
00015
00016
00017 LPeak2f* peaks;
00018
int head;
00019
int tail;
00020
00021 } ;
00022
00023
typedef struct MS_MS_Spectrum MS_MS_Spectrum;
00024
00025
00026
int saveMSMSSpectrum (
char* path_name, MS_MS_Spectrum* sp,
int pepNumber);
00027
00028
void normalizeMSMSSpectrum (MS_MS_Spectrum* sp);
00029
void MS_MS_Spectrum_multiplyByFactor(MS_MS_Spectrum* sp,
float factor);
00030
void MSMSSpectrum_init (MS_MS_Spectrum* sp);
00031
00032
void printMSMSSpectrum (MS_MS_Spectrum* sp);
00033
00034
void MS_MS_Spectrum_create (MS_MS_Spectrum* sp,
int size);
00035
int MS_MS_Spectrum_load (MS_MS_Spectrum* sp,
Experiment expmnt,
int scanNumber);
00036
void MS_MS_Spectrum_destroy (MS_MS_Spectrum* sp);
00037
void createMSMSSpectrumFromPeptide(MS_MS_Spectrum* sp, Peptide* peptide);
00038 MS_MS_Spectrum MS_MS_Spectrum_merge(
Experiment expmnt,
int *pScanArray,
int nScans);
00039
00040
void get_B_IONS(MS_MS_Spectrum* sp, Peptide* peptide);
00041
void get_A_IONS(MS_MS_Spectrum* sp, Peptide* peptide);
00042
void get_C_IONS(MS_MS_Spectrum* sp, Peptide* peptide);
00043
void get_B_MINUS_WATER_IONS(MS_MS_Spectrum* sp, Peptide* peptide);
00044
void get_Y_IONS(MS_MS_Spectrum* sp, Peptide* peptide);
00045
void get_Y_PLUS_TWO_IONS(MS_MS_Spectrum* sp, Peptide* peptide);
00046
void get_Y_MINUS_AMMONIA_IONS(MS_MS_Spectrum* sp, Peptide* peptide);
00047
void get_X_IONS(MS_MS_Spectrum* sp, Peptide* peptide);
00048
void get_Z_IONS(MS_MS_Spectrum* sp, Peptide* peptide);
00049
void get_PARENT_IONS(MS_MS_Spectrum* sp, Peptide* peptide);
00050
00051
void MSMSSpectrum_sortByMoz(MS_MS_Spectrum* sp);
00052
float calcSumOfSquaresOfAbundances(MS_MS_Spectrum* sp);
00053
00054
short insertPeakInMSMSSpectrumFromTail(MS_MS_Spectrum* sp, LPeak2f* p);
00055
short insertPeakInMSMSSpectrumFromHead(MS_MS_Spectrum* sp, LPeak2f* p);
00056 LPeak2f* popLPeak2fFromSpectrumFromHead(MS_MS_Spectrum* sp);
00057 LPeak2f* getLPeak2fOfMSMSSpectrumAtIndex(MS_MS_Spectrum* sp,
int index);
00058
00059
#endif
00060