szabolcs wrote:Is there a way to define subsets in the Cell Builder in a parametric way (e.g., include all sections which are less than 300 micrometers away from the soma)?
Not in the CellBuilder itself. With a bit of hoc one could create a SectionList and append to it all sections that satisfy the criterion. However, it would be difficulty to "package" such a SectionList into the CellBuilder in a robust way. An obvious problem is: what should happen to the contents of the SectionList if one were to change the length of any section, as one might easily do if geometry is specified in terms of L and diam?
If your aim is to specify that some biophysical parameter that is present in all sections should be changed in those compartments that satisfy some distance criterion, you could just define an iterator for the all subset, then on the Biophysics page instead of using one of the built-in functional forms for f(p) you enter a call to a hoc function (that you write yourself and define in your source code BEFORE the
load_file("cellbuilder.ses")
statement) that expects distance as its argument and returns the desired value.
For example, suppose all sections contain pas, where g_pas is 1e-5 for compartments that lie within 300 um of the soma, but 1e-4 for compartments that are more distant. On the Subsets page, select the "all" subset, then click on the "Parameterized Domain Page" button, and finally click on "Create a SubsetDomainIterator". The middle panel now displays
Specify that the metric is "path length from root" with no translation or normalization.
When you finally get to the Biophysics page, with "Specify Strategy" showing a checkmark and the "all" subset selected, you will click on the "pas" button. Then select all_x and click on g_pas. After setting up the rest of your strategy, click on "Specify Strategy" to clear that checkmark and reveal the field editors for entering the actual parameter values.
In the middle panel, right below all_x, click on g_pas. In the right panel, click on f(p) / New. You'll see a window that contains the message
"Step 1 of 2: Enter parameter names separated by spaces"
below which there is a text entry field that contains
Click in this field and replace its contents with
, then click Accept.
Now you see a new window with the message
"Step 2 of 2: Enter expression involving p and parameter names"
below which there is a text entry field that contains
. Replace the contents of this field with
Code: Select all
proxval*(p<dthresh) + distval*(p>=dthresh)
Finally, enter the values of proxval (1e-5), distval (1e-4), and dthresh (300) in the numeric fields next to the labeled buttons.
Assuming that you made no mistakes, and the CellBuilder has no bugs (you _have_ been saving this to a ses file after each significant change, right?), you should now be able to click on Continuous Create, then use Model View to examine the spatial distribution of g_pas and confirm that it is correct.