[BioCocoa-dev] Peptides...

Alexander Griekspoor mek at mekentosj.com
Sat Mar 19 17:48:30 EST 2005

Hi Koen,

> Thanks, now it works!  I like it a lot, also the icon :)
Great! Unfortunately we can't use the icon as I ripped it somewhere 
from the internet ;-)
> Maybe we can add a margin window, where we set the search range. In 
> mass spec you usually only search for peptides within a small window 
> of the mass you type in.
That's a good idea...
> The default value is maybe 1 Da (or in ppm).
What do you mean exactly? Round the values to 1Da?
> Also for peptides, monoisotopic mass should be the default.
That's easy to change.
I basically did my thing and forwarded the project to the guy I helped. 
What shall we do? Are you interested in further modifying it? Do you 
want to add it to the project (the easiest way to further update it a 
bit)? It's pretty similar to the translation demo however (which on 
itself is not too finished though)...

> Even better would be to leave the sign in the value for the setDiff 
> method. Only use abs to look for the difference with the value in the 
> window
That's a good suggestion as well, we only need the absolute function in 
the example you gave and in the compare: method actually...

> I found a bug in the display of the peptides, it is an error between 
> 0-based and 1-based calculations. If I select a peptide in the right 
> pane, in the left pane the peptide shown is one position off (too 
> high). First I tried changing that in the search code, but tht is not 
> right because all calculations are 0-based. So it has to be changed in 
> the display code:
Yep, I'll change that...

> As you already mentioned in the comments, the code can be sped up by 
> using a search window of the average MW of an amino acid (= 110 Da), 
> +/- 10% (or maybe 15%).
It would definitely make things go faster with larger protein sequences

> Some comments on the mass calculation. In mass spectrometry a molecule 
> can only be detected if it has a charge. With most modern MS equipment 
> the charge of peptides and proteins is obtained by addition of one or 
> more protons from the solvent. Usually this is denoted as [M+H]+ or 
> [M+2H]2+. Especially for peptides, the charge in general is 2+; a 
> peptide of MW 2000, will therefore be observed as [2000 + 2* 
> protonmass]/2 = 1001. This if referred to as the mass-over-charge 
> ratio (m/z). So when a mass spectrum shows a peptide of 1001, the 
> peptide can actually have an uncharged mass of 1000 or 2000. Looking 
> at the spectrum will reveal if a species is 'singly-charged' or 
> 'doubly-charged'. So for our search program, we need to take into 
> account what the charge of the peptide is that we are looking at. The 
> mass of a proton is defined in BCFoundationDefines.h: H_mono and 
> H_ave. This code probably needs to be added to BCMassCalculator tool - 
> I will look into that and will start with just protons, but we need to 
> keep in mind that there are more possibilities, eg sodium.
I already hoped you could give me some more insight, thanks! Again, you 
have the knowledge to further improve the app a lot, feel free to do so 
if you're interested... A simple popupbutton of expected modifications, 
or at least a matrix for singly or double charged would be easy to add 
and compensated for...

> As discussed a while ago, for our BCSequenceView, it might eventually 
> be better to roll our own view, including a NSLayoutManager, etc. The 
> code that is currently used is sufficient for displaying a simple 
> sequence in an NSTextView.
Absolutely true, I think there are two possibilities here however. 
First we can further improve the current BCSequenceView quite a bit 
with a few relatively simple additions to take the spacing into 
account. The second is indeed a far more difficult one, to create a 
"native" BCSequence view. Ideally one that can be further extended to 
display alignments as well.

Finally, here are the initial comments from the Tassos, the guy who 
challenged me to create the project. It's interesting to see that he 
indeed managed to get the thing working at 50x the speed our framework 
manages to get (at least he claims to ;-). Shark tells me that most 
time (65%) is already lost to object messaging in the symbol counter, 
so perhaps that could deserve some optimization ;-) The kudos for the 
added water molecule go to you! And the comment about the framework to 
us all!

nice ... very nice ;-)

  did not look at the code yet, but for the same sequence size I can do
  it at less than 1 second instead of 30 secs, really curious to see what
  you screw up in the coding ;-)
  my speed test was looking for the same lengths as you did, which - due
  to bad advice from me-
  was excessive by far. checking +/-15 is far enough.

  (do I sound like Victor ?)

  but, very nice, you added 18 to all fragments ;-) obvious error to make
  in first implementation avoided ...! Only one little bug, you display
  the wrong aa range (one aa to the left) but you highlight the correct
  one ;-)

  scientifically now, its clear that the ms accuracy you need can not be
  achieved ....
  so, i can have fun coding a feature to input 1-3 aa from N-term
  sequencing, while
  I try and speed up the code ... and maybe fix the bugs ;-)

  really thanx, its a really nice framework to play with !


                       ** Alexander Griekspoor **
                 The Netherlands Cancer Institute
                 Department of Tumorbiology (H4)
           Plesmanlaan 121, 1066 CX, Amsterdam
                     Tel:  + 31 20 - 512 2023
                     Fax:  + 31 20 - 512 2029
                    AIM: mekentosj at mac.com
                     E-mail: a.griekspoor at nki.nl
                 Web: http://www.mekentosj.com

           LabAssistant - Get your life organized!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 6172 bytes
Desc: not available
URL: <http://www.bioinformatics.org/pipermail/biococoa-dev/attachments/20050319/e6517302/attachment.bin>

More information about the Biococoa-dev mailing list