Custom digest site
From SPCTools
Revision as of 16:02, 21 January 2010; view current revision
←Older revision | Newer revision→
←Older revision | Newer revision→
These are the steps I took to add a new enzyme cleavage site to the TPP. I had to do this in order to run TPP on a data set that used an non-standard enzyme.
[edit]
Preface
I did this on the linux version of TPP. I have no idea if this will work on the Windows distribution. These instructions assume you know how to compile TPP on linux. They also assume you are comfortable editing C code. Both are a pre-requisites for these instructions.
[edit]
Warning
These instructions worked for me, I hope they work for you but don't blame me if they screw up your installation. BACK UP YOUR DATA FIRST!!
[edit]
Steps
- Download the latest version of TPP from SourceForge. As of this writing I used version 4.3.1.
- Unpack the zip archive.
- Move to the src directory and open the file src/Enzyme/ProteolyticEnzymeFactory/ProteolyticEnzymeFactory.cxx using your favourite file editor.
- Follow the syntax provided for the struct called const char *ProteolyticEnzymeFactory::CATALOG_ENZYMES[][4] and add your enzyme information there.
- For instance, the template for trypsin is:
{"trypsin","true",NULL,"KR|P|false"}
- Your custom enzyme might look like this:
{"dingdong", "true", NULL, "TYRK|H|false"}
- Next, edit the function called void ProteolyticEnzymeFactory::showEnzymesCatalog() following the syntax provided there too.
- For 'stricttrypsin' you see:
,"stricttrypsin"
- Insert the name of your custom enzyme after it:
,"dingdong"
- Now edit the function called ProteolyticEnzyme* ProteolyticEnzymeFactory::getProteolyticEnzyme(const char* input_name) following its syntax as a template.
- For 'stricttrypsin' you see:
else if(strcmp(name, "stricttrypsin") == 0) { enz = new ProteolyticEnzyme(name, fidelity, True, NULL); enz->enterSpecificity("KR", "", False, min_spacing_); enz->fixSpecificity(); }
- Copy this syntax exactly and replace where needed to match your enzyme
else if(strcmp(name, "dinddong") == 0) { enz = new ProteolyticEnzyme(name, fidelity, True, NULL); enz->enterSpecificity("TYRK", "H", False, min_spacing_); enz->fixSpecificity(); }
- Save this file and close it.
- Next, open src/Visualization/xinteract/xinteract.cxx for editing
- For the function called const char* getSampleEnzyme(char e) add an entry to represent your enzyme. Pick a single character (letter or number) not already allocated to some other enzyme.
- For 'trypsin' you see:
case 'T': return "trypsin";
- Add your enzyme right below it:
case 'Y': return "dingdong";
- In the int main function you'll find an if-conditional (if(argc < 2)). You need to add the enzyme digest "flag" for your custom enzyme to the the cout command for all the other enzymes.
- Look for this line:
cout << " -eS [specify sample enzyme = StrictTrypsin]" << endl;
- Again, copying it's syntax we add this line right below it:
cout << " -eY [specify sample enzyme = dingdong]" << endl;
- Save the file and close it.
- You need to edit the programs that parse RAW search engine results (i.e.: Tandem2XML, Mascot2XML, etc...) to recognize your enzyme pattern. These instructions only cover X!Tandem since that is the search engine I use.
- Open src/Parsers/Algorithm2XML/Tandem2XML/TandemParamsParser.cxx
- Edit the function called void TandemParamsParser::initEnzymes() and following the syntax of other enzymes, add yours.
- For 'chymotrypsin' you see:
addEnzyme("chymotrypsin", "[FMWY]|{P}");
- Add your enzyme right after it:
addEnzyme("dingdong", "[TYRK]|{H}");
- Save the file and close it
- Now move back to the src directory and compile TPP as you normally would.
These instructions worked for me. Hopefully I haven't left anything out. In case I did please feel free to update the site.