[BioCocoa-dev] Peptides...

Koen van der Drift kvddrift at earthlink.net
Sat Mar 19 15:41:56 EST 2005


On Mar 19, 2005, at 2:45 PM, Koen van der Drift wrote:

> 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.

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

float diff, searchdiff;

searchdiff = [diffinput floatValue];	// need to add a inputfield in the 
window
diff = mw-theweight				// distance from target mw

	if (fabs(diff) <= searchdiff )
	{
		[peptide setDiff: diff];
		[peptide setRange: aRange];
	
		// add it to the results array, release it to counterbalance the init 
as it is now retained by the array
		[results addObject: peptide];
		[peptide release];

		// yep, we have another one screened:
		counter++;
	}


- Koen.




More information about the Biococoa-dev mailing list