Icon representing a recipe

Recipe: Segment Subscores for Spreadsheet

created by HerobrinesArmy

Profile


Name
Segment Subscores for Spreadsheet
ID
100755
Shared with
Public
Parent
None
Children
None
Created on
March 05, 2015 at 03:04 AM UTC
Updated on
March 05, 2015 at 03:04 AM UTC
Description

Provides a copy-pasteable report on segment subscores, ready to be pasted into a spreadsheet for sorting and whatnot.

Best for


Code


n = structure.GetCount() ssn = puzzle.GetPuzzleSubscoreNames() o = "Segment\tResidue\tAtoms" for i=1,#ssn do o = o.."\t"..ssn[i] end for i=1,n do o = o.."\n"..i.."\t"..structure.GetAminoAcid(i).."\t"..structure.GetAtomCount(i) for j=1,#ssn do o=o.."\t"..current.GetSegmentEnergySubscore(i,ssn[j]) end end d=dialog.CreateDialog("Segment Subscores") d.tip1=dialog.AddLabel("Click inside the box below.") d.tip2=dialog.AddLabel("Then press Ctrl+a (Command+a on Mac) followed by") d.tip3=dialog.AddLabel("Ctrl+c (Command+c on Mac). Paste into your") d.tip4=dialog.AddLabel("spreadsheet application of choice.") d.scores=dialog.AddTextbox("Subscores",o) d.OK = dialog.AddButton("Close",1) dialog.Show(d)

Comments


HerobrinesArmy Lv 1

I use this from time to time to figure out which segments are in need of what kind of attention. I find it a lot easier to use the subscores in a spreadsheet, where I can sort them and combine them in different ways, than to tab around to different segments one-by-one.

The columns included in the report are:
Segment number
Amino acid letter
Number of atoms
One column for each of the subscores for the current puzzle.

Copy the data from the text box in the dialog that pops up and it should paste properly into just about any spreadsheet application.