00001 
#ifndef _PEPTIDE_TK_H_
00002 
#define _PEPTIDE_TK_H_
00003 
00004 
#include "massspec/mqaminoacid.h"
00005 
00006 
enum {NO_ALKYLATION = 1, IODOACETIC_ACID = 2, IODOACETAMIDE = 3};
00007 
00008 
enum {  MODIFICATION_NONE                                               = 0,
00009                 MODIFICATION_WATER_LOSS                                 = 1,
00010                 MODIFICATION_AMMONIA_LOSS                               = 2,
00011                 MODIFICATION_MET_OXIDATION                              = 3,
00012                 MODIFICATION_CARBAMYLATION                              = 4,
00013                 MODIFICATION_CYS_CARBAMIDOMETHYLATION   = 5,
00014                 MODIFICATION_CYS_CARBOXYMETHYLATION             = 6
00015 };
00016 
00017 
00018 
extern char MODIFICATION_AMMONIA_LOSS_CHAR;
00019 
extern char MODIFICATION_MET_OXIDATION_CHAR;
00020 
extern char MODIFICATION_CARBAMYLATION_CHAR;
00021 
extern char MODIFICATION_CYS_CARBOXYMETHYLATION_CHAR;
00022 
00023 
void ProteomisToolkit_init();
00024 
00025 
typedef struct 
00026 
{
00027         
char*           name;
00028         
int                     nSize;
00029         
int                     protease;
00030         
int                     protease_skipped_sites;
00031         
int                     nProteinsUsed;
00032 
00033         
struct  Peptide* peptides;
00034 } PeptideLibrary;
00035 
00036 
typedef struct Peptide
00037 {
00038         
unsigned scored :1;     
00039 
00040         
00041 
00042         
00043         
char*   protein;
00044 
00045         
int             start;
00046         
int             index;
00047         
int             length;
00048         
char*   seq;    
00049         
00050         
00051         
int             comp[NO_OF_AMINOACIDS];
00052         
float   mw; 
00053         
float   rt;
00054         
float   searchMass;
00055 } Peptide;
00056 
00057 
#define AASEQ(p) (p.seq)
00058 
00059 
typedef char* PeptideSequence;
00060 
00061 
00062 
00063 
00064 
00065 
char massToRes(
float mass); 
00066 
float resToMass(
char residue);
00067 
00068 
00069 
int ProteomicsToolkit_setAlkylationAgent(
int type);
00070 
int ProteomicsToolkit_getAlkylationAgent(
char* alkylation_agent);
00071 
void ProteomicsToolkit_unsetAlkylationAgent();
00072 
00073 
float   ProteomicsToolkit_calcMWFromMZ(
float mz, 
int charge);
00074 
float   ProteomicsToolkit_calcMZFromMW(
float mw, 
int charge);
00075 
void    ProteomicsToolkit_setSequenceModificationSigns();
00076 
void    ProteomicsToolkit_oxidizeMethionine();
00077 
00078 
00079 
00080 
float   ProteomicsToolkit_calcMW                                        (
char protein[], 
int start_aminoacid, 
int stop_aminoacid);
00081 
float   ProteomicsToolkit_calcHydrophobicity            (
char protein[], 
int start_aminoacid, 
int stop_aminoacid, 
int model);
00082 
int*    ProteomicsToolkit_calcAminoacidComposition      (
char protein[], 
int start_aminoacid, 
int stop_aminoacid);
00083 
int             ProteomicsToolkit_calcNumberOfCarbons           (
char protein[], 
int start_aminoacid, 
int stop_aminoacid);
00084 
00085 
int             ProteomicsToolkit_isPartial(
char protein[], 
int start_aminoacid, 
int stop_aminoacid);
00086 
00087 
void    ProteomicsToolkit_getNumberOfChargedResidues(
char protein[], 
int start_aminoacid, 
int stop_aminoacid,
00088                                                                                                           
int* nD, 
int* nE, 
int* nCAMC, 
00089                                                                                                           
int* nH, 
int* nR, 
int* nK);
00090 
00091 
void    ProteomicsToolkit_fprintSubSequence                      (FILE* fp, 
char protein[], 
int start, 
int stop);
00092 
void    ProteomicsToolkit_fprintSubSequenceUsingRange(FILE* fp, 
char protein[], Range2i* range);
00093 
void    ProteomicsToolkit_printAminoacidSequence         (
char protein[], 
int start_aminoacid, 
int stop_aminoacid);
00094 
void    ProteomicsToolkit_fprintAminoacidSequence        (FILE* fp, 
char protein[], 
int start_aminoacid, 
int stop_aminoacid);
00095 
char*   ProteomicsToolkit_getAminoacidSequence           (
char protein[], 
int start_aminoacid, 
int stop_aminoacid);
00096 
char*   ProteomicsToolkit_getAminoacidSequenceSequestFormat(
char protein[], 
int start_aminoacid, 
int stop_aminoacid);
00097 
00098 
00099 
00100 Peptide* PeptideArray_create(
int nsize);
00101 
00102 
float   Peptide_calcMW                                  (Peptide* peptide);
00103 
float   Peptide_calcHydrophobicity              (Peptide* peptide, 
int model);
00104 
void    Peptide_calcAminoacidComposition(Peptide* peptide);
00105 
int             Peptide_calcNumberOfCarbons             (Peptide* peptide);
00106 
00107 
void    Peptide_printlnAminoacidSequence         (Peptide* peptide); 
00108 
void    Peptide_printAminoacidComposition(Peptide* peptide);
00109 
00110 
void     Peptide_init(Peptide* peptide);
00111 Peptide* Peptide_new (
char* sequence);
00112 
void     Peptide_createFromString(Peptide* peptide, 
char* sequence);
00113 
void     Peptide_printInfo(Peptide* peptide);
00114 
00115 
void    printSeparator();
00116 
00117 
00118 
00119 
00120 
00121 
float   PeptideSequence_calcMW                                  (
char* sequence);
00122 
float   PeptideSequence_calcHydrophobicity              (
char* sequence, 
int model);
00123 
int             PeptideSequence_calcNumberOfCarbons             (
char* sequence);
00124 
int*    PeptideSequence_calcAminoacidComposition(
char* sequence);
00125 
int             PeptideSequence_isPartial                               (
char* sequence);
00126 
00127 Range   PeptideSequence_calcChargeRange                 (
char* sequence);
00128 
00129 
int             PeptideSequence_hasFullyTrypticEnds(
char* seq_peptide);
00130 
int             PeptideSequence_hasPartiallyTrypticEnds(
char* seq_peptide);
00131 
00132 
void    PeptideSequence_getNumberOfChargedResidues                              (
char* sequence, 
int* nD, 
int* nE, 
int *nCAMC, 
int* nH, 
int* nR, 
int* nK);
00133 
00134 
char*   PeptideSequence_convertFromSequestToSimple                              (
char* sequence);
00135 
char*   PeptideSequence_convertFromSequestToSimpleWithNoModSigns(
char* sequence);
00136 
float   PeptideSequence_calcMZ                                                                  (
char* sequence, 
int charge);
00137 
char*   PeptideSequence_removeModifications                                             (
char* sequence);
00138 
int             PeptideSequence_getComposition                                                  (
char* sequence, 
char aa);
00139 
int             PeptideSequence_getCompositionSequest(
char* seq, 
char aa);
00140 
char*   PeptideSequence_addModification                                                 (
char* sequence, 
char aa, 
char modif);
00141 
00142 
#endif
00143 
00144 
00145