Rob,
use the filter:
1) Modify your table so that each line starts with line number as the
first item;
2) Copy the original table variable (say it is called myTable) to
tableCopy. Filter modifies contents of variable, so make sure it won't
touch the original data;
3) use the filter like this:
filter tableCopy with *2267.10*
4) now all lines that contain anything between 2267.1000 and 2267.1099
are stored in tableCopy
5) as these lines contain line numbers too (that's what step 1 was used
for), now you can cycle through the 1st item of each line in the result
and find line numbers of the original data that matched the criteria:
set the itemdelimiter to tab
repeat for each line myFilteredLine in tableCopy
put item 1 of myFilteredLine into lineNo
put line lineNo of myTable into varModifiedLine
#modify varModifiedLine contents here
put varModifiedLine into line lineNo of myTable
end repeat
6) you can put multiple obsMass values and corresponding modifications
into a variable (e.g. varObsMass) as tab delimited list:
*2267.10* modified_string_1
*2267.11* modified_string_2
...
*2271.16* modified_string_n
and then cycle through each pair of pepMass value and a corresponding
modification string:
set the itemdelimiter to tab
repeat for each line myConstraintsLine in varObsMass
put item 1 of myConstraintsLine into varConstraint
put item 2 of myConstraintsLine into varModifiedLine
put myTable into tableCopy
filter newVar with varConstraint
repeat for each line myFilteredLine in tableCopy
put item 1 of myFilteredLine into lineNo
put varModifiedLine into line lineNo of myTable
end repeat
end repeat
Best wishes!
Viktoras
Beynon, Rob wrote:
Some questions - is there advantage in sorting the list by mass first?
Would I gain speed by using integer arithmetic (is that even possible?) or by
matching the numbers as strings?
And most importantly..
Is there an elegant rev way of handling this that I don't even know about?!
Thanks
Rob
________________________________
Prof R J Beynon[h]
Proteomics and Functional Genomics Group
Faculty of Veterinary Science
University of Liverpool
Crown Street, Liverpool L69 7ZJ
________________________________
Phone: +44 151 794 4312
Fax: +44 151 794 4243
Email: [EMAIL PROTECTED]
http://www.liv.ac.uk/pfg
________________________________
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution