changing test set flag
Dear all, I used phenix.refine to generate the test set flag for my dataset which it did with a value of 1. I now use a program that expects the test set flag in the mtz file to be 0. Is there a simple way to change the flag from 1 to 0 keeping the flagged reflections identical? Thanks! Michael
On Fri, Dec 10, 2010 at 6:08 PM, Michael Hothorn
I used phenix.refine to generate the test set flag for my dataset which it did with a value of 1. I now use a program that expects the test set flag in the mtz file to be 0. Is there a simple way to change the flag from 1 to 0 keeping the flagged reflections identical?
In theory the reflection file editor in the GUI can do this, as follows: - add your file to the top list, and copy all arrays to the output list - click the button "R-free flags generation" - change the "User level" menu to "Advanced" - check the box labeled "Convert R-free flags to CCP4 convention" and it should output a file with the test set numbered 0 and everything else numbered randomly from 1 to 19 (assuming 5% free, otherwise the upper limit will be different, but this shouldn't matter). That said, if you're using REFMAC (which is usually where people start to run into Phenix compatibility issues), you could also just add this to the input: FREE 1 (although that won't help you in CCP4i.) -Nat
Thank you Nat. Refmac is not the problem (you can change the free R flag in the GUI as well) but some loop modeling server that apparently uses refmac but expects the flag to be 0. best Michael Nathaniel Echols wrote:
On Fri, Dec 10, 2010 at 6:08 PM, Michael Hothorn
wrote: I used phenix.refine to generate the test set flag for my dataset which it did with a value of 1. I now use a program that expects the test set flag in the mtz file to be 0. Is there a simple way to change the flag from 1 to 0 keeping the flagged reflections identical?
In theory the reflection file editor in the GUI can do this, as follows:
- add your file to the top list, and copy all arrays to the output list - click the button "R-free flags generation" - change the "User level" menu to "Advanced" - check the box labeled "Convert R-free flags to CCP4 convention"
and it should output a file with the test set numbered 0 and everything else numbered randomly from 1 to 19 (assuming 5% free, otherwise the upper limit will be different, but this shouldn't matter).
That said, if you're using REFMAC (which is usually where people start to run into Phenix compatibility issues), you could also just add this to the input:
FREE 1
(although that won't help you in CCP4i.)
-Nat _______________________________________________ phenixbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/phenixbb
Hi, What I personally do is to write out the data in CNS / XPLOR format. You get a series of ASCII records (lines) with (depending on the exact format which I do not keep in my head) TEST= 0 [could be TEST = 0 or TEST= 0 or whatever] TEST= 1 then 2 grep commands grep "TEST= 0" myfile.hkl > myfile1.hkl grep "TEST= 1" myfile.hkl > myfile2.hkl then 2 editor runs (I personally use vi, I think it is possible to do it with other editors as well) vi myfile1.hkl :%s/TEST= 0/TEST= 1/g :wq! (or shift zz) vi myfile2.hkl :%s/TEST= 1/TEST= 0/g :r myfile1.hkl :w myfile3.hkl :q! [there, you could also use :wq! instead of :w myfile3.hkl and :q!, the file containing the data you need would be in file myfile2.hkl - I think you get the idea] Then it's just a question of converting myfile3.hkl into whatever format is required by the program you wish to use. Can't remember if one has to use single or double quotes right now for the grep commands, it comes automatically to the tip of my fingers when I perform the operation. Of course, this requires that the CNS/XPLOR file contains one record (one line) per HKL. If it is more than one line per reflection, it becomes a bit more complicated to perform but still feasible. HTH, Fred. Michael Hothorn wrote:
Dear all,
I used phenix.refine to generate the test set flag for my dataset which it did with a value of 1. I now use a program that expects the test set flag in the mtz file to be 0. Is there a simple way to change the flag from 1 to 0 keeping the flagged reflections identical?
Thanks! Michael _______________________________________________ phenixbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/phenixbb
participants (3)
-
Michael Hothorn
-
Nathaniel Echols
-
Vellieux Frederic