Hello, Yoko.
This is an interesting situation. With your current linkout, the “$$” pulls the “name” field from your bigBed which corresponds to the experiment ID, and the organism ID is simply hard-coded as “1” for human and “2” for mouse.
With your proposed change, you now require two variables in the linkout – the experiment ID and the organism ID. The way you have proposed to change it is by using the “urls” option instead of “url”. This allows you to specify a field other than “name” with “$$”, but the problem here is that you still require the “name” field, too. When you assign “$$” to another variable, you lose the ability to refer to the “name” field with “$$”. You can still only refer to one variable, not two. The $D option merely refers to the current assembly, not any field in the bigBed file, so if you were viewing the hg19 version of the track, $D would always just return “hg19” and not “1” or “2” like you need it to.
There is a solution that requires a little alteration to your “name” field. Currently, the “name” field is something like “316” which refers to the experiment ID. You can change this to something like “316:1” which would indicate experiment 316 in the human database or “316:2” which would indicate experiment 316 in the mouse database. You could then make your linkout URL:
url http://enhancer.lbl.gov/cgi-bin/imagedb3.pl?form=presentation&show=1&experiment_id=$P&organism_id=$p
The $P option specifies that only the portion to the left of the “:” in the “name” field be used. Conversely, the $p option specifies that only the portion to the right of the “:” in the “name” field be used. This works nicely, but unfortunately, it also displays “316:1” or “316:2” as the item name in hgTracks and hgc. Unfortunately, there is currently no way to specify the “name” field plus some other field in a linkout. This workaround is the best way to accomplish what you are trying to do.
Please contact us again at gen...@soe.ucsc.edu if you have any further questions. All messages sent to that address are archived on a publicly-accessible Google Groups forum. If your question includes sensitive data, you may send it instead to genom...@soe.ucsc.edu.
---
Steve Heitner
UCSC Genome Bioinformatics Group
--