openmolecules.org

 
Home » DataWarrior » Cheminformatics » cumlativeSumInCategory
Re: cumlativeSumInCategory [message #1296 is a reply to message #1294] Fri, 21 May 2021 00:40 Go to previous messageGo to previous message
nbehrnd is currently offline  nbehrnd
Messages: 211
Registered: June 2019
Senior Member
Dear Greg,

the computation fails because the instruction contains an error in the syntax. In your example, plateID and penalties are not variables, but label-like column headers. For this reason both are to be enclosed in quotes. To enable a computation, the formula thus shall be written as
cumulativeSumInCategory("plateID", "penalties")
Note, `cumulativeSumInCategory` adds line by line the penalties for the plateIDs, and accounts for all lines already scrutinized. This pattern is used in column «freq3» in the example attached below.

Your description of the anticipated results differs from this, though. It is better described by the formula
categorySum("plateID", "penalties")
This pattern is used in column «freq4»:

/forum/index.php?t=getfile&id=323&private=0

Norwid
  • Attachment: summation.png
    (Size: 48.13KB, Downloaded 378 times)
  • Attachment: probe.dwar
    (Size: 1.86KB, Downloaded 198 times)
 
Read Message
Read Message
Read Message
Previous Topic: Count # scaffolds by plate ID
Next Topic: mean from 'n' in pKaInWater.dwar
Goto Forum:
  


Current Time: Sun Apr 28 10:48:25 CEST 2024

Total time taken to generate the page: 0.03481 seconds