Project

General

Profile

List per-particle CTF on v2.2 branch

Added by Michael Cianfrocco about 11 years ago

Hello,

I'd like to list per-particle CTF information, but, unfortunately, we are only have Centos 5 and therefore cannot update to trunk. Is there a way to list per-particle CTF on v2.2 branch? Alternatively, would it be easier to download a non-redux trunk version that contains the list per particle CTF information?

I know this isn't ideal, but it would make life much easier for us.

Thank you!
Mike


Replies (7)

RE: List per-particle CTF on v2.2 branch - Added by Anchi Cheng about 11 years ago

Hi, Michael,

I attach here the two files you need to add this feature to 2.2 branch.
listCTFValues.php go to myamiweb/processing
summarytables.inc replaces the one with the same name in myamiweb/processing/inc

Here is how I know what to get. If you want to locally add stand alone features, you can follow it as an example.

  1. I find out what the feature redmine issue number would be. Each new feature should have a redmine issue associated with it. Therefore, I go to http://emg.nysbc.org/projects/appion/issues and type in the Search box "ctf particle list" It gave me issue #2313
  2. Find the svn revision: If the person who committed the change has done it right, there should be links to the repository for the svn revision from the issue page. In this case, r17488
  3. The revision has what files were added/changed.
  4. Go to http://emg.nysbc.org/projects/appion/repository/show/trunk and follow down to the file to check if there are bug fixes after the original feature commit. Use "View differences" function to see if the changes are relevant. In this case, listCTFValues.php has some new addition and bug fixes. Therefore, I want the current version not the original commit.
  5. Copy what is added for the feature and bug fixes into your local version. If the feature does not involve a fundamental changes that affects other functions, this should work.

As we prefer not to add new feature to the repository of the stable branches, these are not committed.

RE: List per-particle CTF on v2.2 branch - Added by Michael Cianfrocco about 11 years ago

Hi Anchi,

Thank you so much for your help and for walking me through the process to find & add new features to my Appion installation.

I placed both listCTFvalues.php and summarytables.inc into their appropriate locations, and while I'm able to see a box for 'list ctf per particle', the stack information bar is doubled for each stack (see attached image) and when I click on the link I get an error message (see attached).

I'm not a php expert, but could it be a problem with php versions? Any help would be appreciated!

mike

RE: List per-particle CTF on v2.2 branch - Added by Anchi Cheng about 11 years ago

Looks like another dependency

myamiweb/processing/inc/particledata.py

RE: List per-particle CTF on v2.2 branch - Added by Michael Cianfrocco about 11 years ago

Great! It worked!

As a side comment, do you know how to get rid of the stack information bar showing up twice in a row? I know it's only an aesthetic thing, but it would look nicer with only one.

RE: List per-particle CTF on v2.2 branch - Added by Michael Cianfrocco about 11 years ago

Sorry to keep troubling you with this Anchi, but I just realized that when these new files are included in our myamiweb/ folder, we can no longer see outputs from CTF estimation and particle picking within the image viewer interface. It simply says 'empty' both both the CTF and particle picks.

Do you know of any way to get around this? Perhaps I change the link location for the image viewer to view the 'updated' version of Appion that allows users to list per particle CTF, while using the stable branch version of image viewer so that we can continue to view CTF and particle picks.

Thank you for your help!
mike

RE: List per-particle CTF on v2.2 branch - Added by Anchi Cheng about 11 years ago

Michael,

This means your 2.2 revision is not up to date since I sent you replacement files according to our current svn revision head.

You should just do editting yourself on the previously working version of the files in myamiweb/processing/inc instead of copying the whole file I sent.
This way, you have all the old stuff as it was. Here I give you the differences. You only need to add the lines follows the "+" mark, just don't include the "+" mark itself.

@@ shows the line numbers. The line numbers it shows may be different from yours. php is not sensitive to indentation.

--- summarytables.inc    (revision 17903)
+++ summarytables.inc    (working copy)
@@ -156,6 +156,9 @@
     $downloadLink .= "   download particles data\n";
     $downloadLink .= "</a></font>)\n";
     $j.= $downloadLink;    
+    ## link to list ctf values
+    if ($particle->hasCtfData($expId))
+        $j.= "<input class='edit' type='button' onClick='window.open(\"listCTFvalues.php?expId=$expId&sId=$stackid\")' value = 'list per-particle CTF info'>\n";
     $stacktable.= apdivtitle($j);

     if ($tiny)
 --- particledata.inc    (revision 17903)
+++ particledata.inc    (working copy)
@@ -2553,6 +2553,19 @@
         return $r;
     }

+    function getParticlePicksFromStack($stackId) {
+        $q="SELECT s.particleNumber as particle, " 
+            ."p.`REF|leginondata|AcquisitionImageData|image` as imgid, " 
+            ."p.xcoord, p.ycoord, p.helixnum, p.angle " 
+            ."FROM `ApStackParticleData` AS s " 
+            ."LEFT JOIN `ApParticleData` AS p " 
+            ."ON s.`REF|ApParticleData|particle` = p.`DEF_id` " 
+            ."WHERE s.`REF|ApStackData|stack` = '$stackId' " 
+            ."ORDER BY s.particleNumber";
+        $r = $this->mysql->getSQLResult($q);
+        return $r;
+    }
+
     function getNumStackParticles ($stackId) {
         $q= "SELECT count(DEF_id) as num " 
             ."FROM `ApStackParticleData` " 
a

RE: List per-particle CTF on v2.2 branch - Added by Michael Cianfrocco about 11 years ago

I see, I would not have guessed that was the problem. Thank you for pointing it out and fixing it! Everything works now, again.

Thanks,
Mike

    (1-7/7)