Bareword "_LABEL_SIZE_" not allowed while "strict subs" in use

428 views
Skip to first unread message

Martin

unread,
Nov 6, 2011, 9:03:16 AM11/6/11
to Circos
Hi,

I got the following error when trying to create differentially sized
glyps based on the value of "nr" specified in de the data file. I
already tried replacing nr= with label_size= in the data file and the
conf, but the error persists. Any thoughts?

Thanks!

Regards,
Martin

error:
Tried to evaluate [ 6+50*(_NR_/6) . "p"] from a parameter, but could
not. Error [Bareword "_LABEL_SIZE_" not allowed while "strict subs" in
use at (eval 88) line 1.] at /usr/local/circos-0.54/bin/../lib/Circos/
Configuration.pm line 140

Circos::Configuration::repopulateconfiguration('HASH(0x134b4f30)',
'plot') called at /usr/local/circos-0.54/bin/../lib/Circos/
Configuration.pm line 120

Circos::Configuration::repopulateconfiguration('HASH(0x134b4b50)',
'plots') called at /usr/local/circos-0.54/bin/../lib/Circos/
Configuration.pm line 113

Circos::Configuration::repopulateconfiguration('HASH(0x12f5b200)')
called at /usr/local/circos-0.54/bin/../lib/Circos/Configuration.pm
line 89
Circos::Configuration::populateconfiguration('configfile', './
circos.conf') called at /usr/local/circos-0.54/bin/../lib/Circos.pm
line 137
Circos::run('Circos', 'configfile', './circos.conf') called
at /usr/local/circos-0.54/bin/circos line 224

conf:
<plot>
type = text
label_font = glyph
color = black
file = ../data/histSTART_mRNA.TXT
r0 = 1.1r
r1 = 1.3r
show_links = no
label_size = eval( 6+50*(_NR_/6) . "p")
label_font = condensed
padding = 0p
rpadding = 0p
<rules>
<rule>
importance = 110
condition = 1
value = eval("\x6E")
</rule>
</rules>
</plot>

data:
hsX 133000000 133999999 nr=1.0000
hsX 146000000 146999999 nr=1.0000
hs12 56000000 56999999 nr=1.0000
hs11 32000000 32999999 nr=1.0000

Martin

unread,
Nov 7, 2011, 8:41:43 PM11/7/11
to Circos

There are a couple of problems here. I've expanded a tutorial to
include an example of how to format tiles, links and text dynamically
based on annotation parameters.

http://circos.ca/tutorials/lessons/recipes/data_id/images

First, your use of the 'nr' parameter is not allowed, unless you set

restrict_parameter_names=no

in housekeeping.conf. Unfortunately, there was a bug which prevent
these parameters from being parsed correctly. This is fixed for the
next version. The bug affects only parameters that are not in the
default list of accepted parameters. For now, use the 'id' parameter,
such as

hs10 10 20 id=1.000

Second, I think you want to change the label for individual text
items. To do so, you need a rule that changes the label_size - this is
the only way the parameter will be recalculated for each data point.
Here's an example from the tutorial linked to above

<rule>
importance = 100
condition = 1
label_size = eval(sprintf("%dp",remap_int(_ID_,1,100,12,48)))
</rule>

This will remap the value of the 'id' field (range 1..100) to an
integer range (12..48) and assign it to label_size. The "p" suffix for
the size is required - units of pixels.

I'm going to track down the problem you're seeing, though, which seems
to be caused by setting the label_size globally for the track.

Martin

Martin

unread,
Nov 8, 2011, 7:42:09 AM11/8/11
to Circos
Hi,

Thanks a lot. Unfortunately, I now get the error belpw. I am still
using version 0.54, does that change anything (do not want to bother
the admins to much with upgrades if not necessary...)

Thanks!
Martin

$VAR1 = [
{
'data' => {
'chr' => 'hsX',
'end' => 133999999,
'label' => 'id=1.0000',
'start' => 133000000
},
'param' => {}
}
];

You set up a rule [sprintf("%dp",remap_int(_ID_,1,100,12,48))] that
uses parsable field [_ID_] but the data you are testing does not have
the field [id]. at /usr/local/circos-0.54/bin/../lib/Circos.pm line
4277
Circos::eval_expression('HASH(0xc2724e0)', '_ID_',
'ARRAY(0xc283df0)') called at /usr/local/circos-0.54/bin/../lib/
Circos.pm line 1636
Circos::run('Circos', 'configfile', './circos.conf') called
at /usr/local/circos-0.54/bin/circos line 224

Martin

unread,
Nov 8, 2011, 3:16:02 PM11/8/11
to Circos
Small addition: for glyps the format is
hs1 10 10 a id=1
where a is the text label which is expected before any parameter like
id.

Also: remap_int is only avaliable for => 0.55 and I can currently only
use 0.54 dure to missing CPAN modules (which I hope my admin will fix
asap). My bad. Sorry to have bothered you!
Regards,Martin
Reply all
Reply to author
Forward
0 new messages