JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for CCP4BB Archives


CCP4BB Archives

CCP4BB Archives


CCP4BB@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

CCP4BB Home

CCP4BB Home

CCP4BB  February 2014

CCP4BB February 2014

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: : I on sig I

From:

"Edward A. Berry" <[log in to unmask]>

Reply-To:

Edward A. Berry

Date:

Fri, 21 Feb 2014 11:40:35 -0500

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (151 lines)

Mark A. White wrote:
> ***  For details on how to be removed from this list visit the  ***
> ***          CCP4 home page http://www.ccp4.ac.uk         ***
> 
> I have a couple of simple awk commands that will calculate both I/sI and Redundancy, by 
> parsing the the scalepack output log.
> ### I/sigma by Shell
> awk '{ if ($11 > 1. && ($1>$2 || $2=="hkl")) printf"Sig: %7.2f%5.2f %8.1f 
> \n",$1,$2,(0.5*($4-$3)+($5-$4)+2.5*($6-$5)+4.5*($7-$6)+7.5*($8-$7)+15*($9-$8)+25*$10)/($11+0.01) 
> }' scalepack.log | tail -16
> #### Redundancy by Shell
> awk '{ if ($13 > $3 && ($1>$2 || $2=="hkl")) printf"Red: %7.2f%5.2f %8.1f 
> \n",$1,$2,($4+2*$5+3*$6+4*$7+5.3*$8+7.3*$9+10*$10+14*$11+1337*$12)/($13+0.01) }' 
> scalepack.log | tail -16
> 
> PS. You will probably need to reassemble the above commands.  Each one is a single command 
> line, which can be placed at the end of your scalepack.com script. Note that I usually use 
> 15 resolution shells, so that the output of each command is truncated to 16 lines, 
> otherwise you get a lot of junk, particularly from the latest versions of scalepack. 
> Change the "tail" command to limit your output to the number of resolution shells plus 1.
> 
> 
> [log in to unmask] wrote:
> 
>>
>> I've written an awk/nawk script that will post-process a Scalepack log file to produce 
>> pseudo <I/SIGI> values as a function of resolution, as well as the (pseudo) overall 
>> value. It does this by massaging the "I/Sigma in resolution shells" table, calculating a 
>> pseudo <I/SIGI> weighted by the number of reflections in each individual 
>> I/SIGI//resolution bin. (Some counting of number of reflections is also corrected.) This 
>> process is obviously an inaccurate, stopgap measure, but some would argue that it is 
>> better than nothing. Perhaps the next update of Scalepack will report more complete 
>> statistics, along the lines of Scala?
>> ~~~~~~~~~~~~~~~~~~~~~~~~
>> David Borhani, Ph.D.
>> Group Leader, Biochemistry
>> Vox:        508-849-2944
>> Fax:        508-755-8361
>> Email:        [log in to unmask]
>> Smail:         Abbott Bioresearch Center, Inc.
>>        100 Research Drive
>>        Worcester, MA 01605 U.S.A.
>> http://abbott.com/abbottbioresearch/
>> ~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> # awk/nawk file
>> # DWB 1Oct2003
>> #
>> # Extract <I/SigI> statistics as a function of resolution from a scalepack log file.
>> #
>> # Usage:
>> #
>> # awk -f scalepack_Isig.nawk scalepack.log > scalepack.log.I_over_sigma
>> #
>> # Typical input data from a Scalepack log file:
>> #
>> #    Shell            I/Sigma in resolution shells:
>> #  Lower Upper      No. of reflections with I / Sigma less than
>> #  limit limit     0     1     2     3     5    10    20   >20  total
>> #  50.00  3.21    26    51    73   101   163   335   707  8474   9181
>> #   3.21  2.55   110   214   315   410   609  1131  2521  6690   9211
>> #   2.55  2.23   206   383   608   815  1253  2197  4277  4879   9156
>> #   2.23  2.02   195   466   761  1051  1700  3119  5758  3388   9146
>> #   2.02  1.88   448   941  1464  1959  2863  4859  7434  1757   9191
>> #   1.88  1.77   664  1511  2344  3100  4420  6558  8520   575   9095
>> #   1.77  1.68   846  2131  3370  4420  5934  7891  9022   155   9177
>> #   1.68  1.61  1088  2852  4441  5629  7030  8529  9050    48   9098
>> #   1.61  1.54  1281  3455  5197  6204  7313  8206  8435    11   8446
>> #   1.54  1.49   685  1986  3076  3847  4671  5115  5162     2   5164
>> # All hkl       5549 13990 21649 27536 35956 47940 60886 25979  86865
>> #
>> #-----------------------------------------------------------
>> #
>> BEGIN {
>> # skip to correct start of table...
>>  x = 0
>>  y = 0
>>  nrbins = 0
>> #
>>  while (x != 1)
>>  {
>>   getline
>>   if ($1 == "Shell" && $2 == "I/Sigma" && $4 == "resolution") {x = 1}
>>  }
>> # Skip to "  limit limit     0     1     2..." line, and load up I/Sigma bin values...
>>  getline ; getline
>>  nibins = NF-3
>>  for (i = 3; i <= NF-1; ++i)
>>  {
>> # Force ">20" to be interpreted as "30.0"
>>   if (substr($i,1,1) == ">") $i = substr($i,2,length($i)) * 1.5
>> # Force real value rather than text for all ibin values
>>   ibin[i-2] = $i + 0.
>>  }
>> }
>> #
>> # Process table data...
>> #
>> {
>>  while (y != 1)
>>  {
>> # Process regular lines of the table
>>   if ($1 != "All")
>>   {
>> # Increment resolution bin counter, store resolution limits for this line...
>>    ++nrbins
>>    rbin[1,nrbins] = $1
>>    rbin[2,nrbins] = $2
>> # Store number of reflections in each I/SigI for this line...
>>    for (i = 3; i <= nibins + 2; ++i) bin[i - 2,nrbins] = $i
>>    getline
>>   }
>>   else
>>   {
>>   y = 1
>>   }
>>  }
>> }
>> #
>> END {
>>  printf "Pseudo <I/sigI> Statistics from scalepack log file: %s\n\n", FILENAME
>>  printf "    bin   dmax   dmin     Nhkl  <I/sigI>\n"
>>  printf "----------------------------------------\n"
>>  ntot = 0
>>  isigtot = 0
>> # Loop over resolution bins...
>>  for (j = 1; j <= nrbins; ++j)
>>  {
>>   n[j] = 0
>>   isig[j] = 0
>> # Loop over I/SigI bins at given resolution...
>>   for (i = 1; i <= nibins; ++i)
>>   {
>> # Total number of reflections, calculate pseudo I/SigI...
>>    n[j] = n[j] + bin[i,j]
>>    isig[j] = isig[j] + bin[i,j] * ibin[i]
>>    isigtot = isigtot + bin[i,j] * ibin[i]
>>   }
>> # Overall statistics...
>>   isig[j] = isig[j] / n[j]
>>   ntot = ntot + n[j]
>>   printf "    %3i %6.2f %6.2f %8i %8.2f\n", j, rbin[1,j], rbin[2,j], n[j], isig[j]
>>  }
>>  isigtot = isigtot / ntot
>>  printf "----------------------------------------\n"
>>  printf "OVERALL %6.2f %6.2f %8i %8.2f\n", rbin[1,1], rbin[2,nrbins], ntot, isigtot
>> }
>> # END of awk/nawk file 
> 
> 

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager