[chimerax-users] [EXT] Re: Markers from CMM

Scott, Brandon L. Brandon.Scott at sdsmt.edu
Fri Oct 16 07:05:43 PDT 2020


Hi Tom,

Yes! Those vseries commands are exactly what I am looking to do and would be extremely helpful.



Brandon Scott, PhD CZI Imaging Scientist, Research Assistant Professor

Nanoscience & Nanoengineering

South Dakota Mines

501 E. Saint Joseph St., Rapid City, SD 57701

724.510.1253 | Brandon.Scott at sdsmt.edu<mailto:Brandon.Scott at sdsmt.edu>

[South Dakota Mines]<https://www.sdsmt.edu/>

[South Dakota Mines on Facebook]<https://www.facebook.com/SouthDakotaMines/>[South Dakota Mines on Instagram]<https://www.instagram.com/southdakotamines/>[South Dakota Mines on Twitter]<https://twitter.com/sdsmt>[South Dakota Mines on Snapchat]<https://www.snapchat.com/add/sdsmt>

________________________________
From: Tom Goddard <goddard at sonic.net>
Sent: Thursday, October 15, 2020 5:19 PM
To: Scott, Brandon L. <Brandon.Scott at sdsmt.edu>
Cc: chimerax-users at cgl.ucsf.edu <chimerax-users at cgl.ucsf.edu>
Subject: Re: [chimerax-users] [EXT] Re: Markers from CMM


    *** This email is from an EXTERNAL sender. Use CAUTION before opening attachments or clicking links.***

Hi Brandon,

  Those "vseries play" marker options I described in the previous message actually are broken.  I saw them in the code and assumed they work but a test just now shows they do not.  But I could make them work if they will be useful to you.

Tom


On Oct 15, 2020, at 3:41 PM, Tom Goddard <goddard at sonic.net<mailto:goddard at sonic.net>> wrote:

Hi Brandon,

  Ok, if I understand you first create markers on every blob, one marker set for each time point.  Then you feed those into trackpy (is that a script you wrote?) and it tries to track the motion of each blob producing a series of markers, one per time that represents one blob, and you make a new marker set that is a track.  So the input had one marker set per time point with markers for each blob, and the trackpy output has one marker set per blob with markers for each position at each time.

  You say "The id_string is the desired id for the new markers" and your id_string looks like  id_string="1.36.5".  First a marker id is a single integer and each marker in one marker set must have a different id.  Usually the marker ids are 1,2,3,....  Markers are implemented as atoms and marker sets as molecules.  The marker id is the residue number.  The atom name for a marker is M.  So marker 5 in marker set #3 would be specified in a command as "show #3:5".  The colon indicates residue number which in this case is the integer marker id.  Each marker set is a ChimeraX model and a model has an id.  Models can form a hierarchy and a model id might be #1.4.  Here #1 is a top level model and #1.4 is a child model.

  It sounds like your main goal is you'd like to be able to show the markers together with the microscopy data, but only show the markers for the time that matches the time of the microscopy image.  There is an option of the "vseries play" command to do that.  Unfortunately I didn't tell our documentation writer Elaine about it so it is not in the online docs:

https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/vseries.html

So here is an explanation.

vseries play #1 markers #2

This will play through the microscopy time points #1.1, 1.2, 1.3 and also show the markers from the single marker set #2 which have matching time.  The time for a marker is indicated by its "note".  By time I mean frame number, 0,1,2.... This comes from our older Chimera program.  The note is a text label that can be shown for the marker.  So a marker in the .cmm file would have a note value

<marker x="693.63" y="288.67" z="191.78" r="1" g="1" b="0" radius="0.5" id="157" note="2"/>

The vseries play command can also show markers for a few preceding frames and following frame of the current microscopy frame.

vseries play #1 markers #2 precedingMarkerFrames 2 followingMarkerFrames 2

Would be nice if the "vseries slider" command had these marker options but currently it does not.

  For visualizing tracks I think it is sensible to create a link between consecutive markers in a track.  As shown in the marker docs a link in a .cmm file looks like

<link id1="2" id2="1" r="1" g="1" b="0" radius="0.17609"/>

   Tom


On Oct 15, 2020, at 2:40 PM, Scott, Brandon L. <Brandon.Scott at sdsmt.edu<mailto:Brandon.Scott at sdsmt.edu>> wrote:

Hi Tom,

This is really a continuation of the markblobs conversation. The output of that creates markers with a new parent id, and all therefore all displayed at once, but if I renamed the output to be a child of the frame it was initially marked on it showed the marker on the proper frame as I played through in time (and only at that time point). This probably isn't the proper way, but it worked very quickly:
perframe "markblobs #1.$1; rename #2 centroid id #1.$1.2;" ranges 1,50
<output_renameCrop.png>
The id_string is the desired id for the new markers. I added them when the first output cmm file is made to track in trackpy, and wrote the resulting tracks into a new cmm file, which I am trying to load into chimera as a child of the surface as you stated below.

I'm guessing that each of the marker sets in your file is tracking a single object in 3D light microscopy and the third digit (e.g 2 in 1.4.2) is an id number of that object.


Brandon Scott, PhD CZI Imaging Scientist, Research Assistant Professor
Nanoscience & Nanoengineering
South Dakota Mines
501 E. Saint Joseph St., Rapid City, SD 57701
724.510.1253 | Brandon.Scott at sdsmt.edu<mailto:Brandon.Scott at sdsmt.edu>

[South Dakota Mines]<https://www.sdsmt.edu/>

[South Dakota Mines on Facebook]<https://www.facebook.com/SouthDakotaMines/>[South Dakota Mines on Instagram]<https://www.instagram.com/southdakotamines/>[South Dakota Mines on Twitter]<https://twitter.com/sdsmt>[South Dakota Mines on Snapchat]<https://www.snapchat.com/add/sdsmt>

________________________________
From: Tom Goddard <goddard at sonic.net<mailto:goddard at sonic.net>>
Sent: Thursday, October 15, 2020 11:59 AM
To: Scott, Brandon L. <Brandon.Scott at sdsmt.edu<mailto:Brandon.Scott at sdsmt.edu>>
Cc: chimerax-users at cgl.ucsf.edu<mailto:chimerax-users at cgl.ucsf.edu> <chimerax-users at cgl.ucsf.edu<mailto:chimerax-users at cgl.ucsf.edu>>
Subject: [EXT] Re: [chimerax-users] Markers from CMM

    *** This email is from an EXTERNAL sender. Use CAUTION before opening attachments or clicking links.***
Hi Brandon,

  I don't understand your question in enough detail.  Your attached cmm file has lines like:

<marker_set name="track_1">
<marker id_string="1.4.2" id="1" frame="4" x="334.43" y="460.59" z="132" r="1" g="1" b="0" radius="0.5"/>
<marker id_string="1.5.2" id="1" frame="5" x="335.47" y="461.79" z="123.72" r="1" g="1" b="0" radius="0.5"/>
<marker id_string="1.6.2" id="1" frame="6" x="337.07" y="464.2" z="122.84" r="1" g="1" b="0" radius="0.5"/>
...
<marker_set name="track_2">
<marker id_string="1.5.3" id="2" frame="5" x="45.584" y="338.65" z="94.399" r="1" g="1" b="0" radius="0.5"/>
<marker id_string="1.6.3" id="2" frame="6" x="47.014" y="330.92" z="92.311" r="1" g="1" b="0" radius="0.5"/>
<marker id_string="1.7.3" id="2" frame="7" x="41.197" y="318.39" z="93.004" r="1" g="1" b="0" radius="0.5"/>
...

Every marker has a different id_string.  What do you intend the id_string to mean?  Do you really mean that id_string is the model id? That would put each single marker in its own model.  I see that the second digit (e.g. 4 in 1.4.2) corresponds to your frame number.  I'm guessing that each of the marker sets in your file is tracking a single object in 3D light microscopy and the third digit (e.g 2 in 1.4.2) is an id number of that object.

You also have id="1" for all markers in the first marker set named track_1.  Every marker must have a different id, this id is the residue number and atom name for the marker.  I guess you wrote this file using a script since ChimeraX would not write a file where two markers have the same id.

Your two perframe commands seem to be changing the model id numbers for 259 marker sets, maybe you are putting each as a submodel of the light microscopy time series images?

Tom



On Oct 14, 2020, at 7:51 PM, Scott, Brandon L. <Brandon.Scott at sdsmt.edu<mailto:Brandon.Scott at sdsmt.edu>> wrote:

Hello all,

When loading markers from a cmm file (example attached), is there a way to specify which submodel the marker goes to rather than it creating a new id? I've added the id_string to the cmm file when I created a new one which is the desired model.

I hacked the following, which works, but there are hundreds of tracks so I would like to come up with an automated (and proper) way to do this.
perframe "rename #2.$1 track_1 id #1.$2.2;" ranges 1,113 ranges 4,116
perframe "rename #2.$1 track_2 id #1.$2.3;" ranges 114,259 ranges 5,150

Brandon Scott, PhD CZI Imaging Scientist, Research Assistant Professor
Nanoscience & Nanoengineering
South Dakota Mines
501 E. Saint Joseph St., Rapid City, SD 57701
724.510.1253 | Brandon.Scott at sdsmt.edu<mailto:Brandon.Scott at sdsmt.edu>

[South Dakota Mines]<https://www.sdsmt.edu/>

[South Dakota Mines on Facebook]<https://www.facebook.com/SouthDakotaMines/>[South Dakota Mines on Instagram]<https://www.instagram.com/southdakotamines/>[South Dakota Mines on Twitter]<https://twitter.com/sdsmt>[South Dakota Mines on Snapchat]<https://www.snapchat.com/add/sdsmt>

<Cells_trackedV2.cmm>_______________________________________________
ChimeraX-users mailing list
ChimeraX-users at cgl.ucsf.edu<mailto:ChimeraX-users at cgl.ucsf.edu>
Manage subscription:
https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users

_______________________________________________
ChimeraX-users mailing list
ChimeraX-users at cgl.ucsf.edu<mailto:ChimeraX-users at cgl.ucsf.edu>
Manage subscription:
https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users

_______________________________________________
ChimeraX-users mailing list
ChimeraX-users at cgl.ucsf.edu<mailto:ChimeraX-users at cgl.ucsf.edu>
Manage subscription:
https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20201016/d31adc1d/attachment-0001.html>


More information about the ChimeraX-users mailing list