# In order of appearance “in” or “on” the chain

I want to say

array that stores positions of nucleotides in order of appearance in (or is it
on?) the S chain.

I know it sounds too specific as a genetics kind of question, but is just for a comment, let’s say it was a chain of letters.
I don’t know if I’m saying it right, but I’m trying to say that a given array (something to do with programming, -unimportant, but is similar to a shopping cart list, if you like-) will store the position of a nucleotide when it first appears in the chain S.
For example, let’s say we’ve got the chain, where every A, C, G & T is a nucleotide, then

S = "CAGCCTA"

will store in my list [1,6,0,3,4,2,5], because at position 1 in S (first nucleotide -C- is at position 0) we’ve found an A, and I’m storing nucleotides in order of appearance as explained above, first the As (the second A’s at position 6, hence the 6 after the 1), then the Cs, etc…
I googled first and found a few references about lists, for instance on the list as correct in many contexts (like, your name is on the list, and in the list as correct when talking about lists in programming, but I’m talking about a chain here, a chain of nucleotides in this case, which is sort of a normal list of nucleotides, maybe.

This is discipline-specific for how you refer to something like this, so consult other texts to understand exactly how it is used in the field.

Generally, if the chain is composed of the objects you are talking about, you’d say they are “in” the chain.

The metal links in the chain…

If the object you’re talking about exists in addition to the chain, you could say “on” the chain.

The chrome on the chain…

In either case, I think an educated reader will understand what you’re trying to convey.