Do you have all $k^n$ strings of length $n$ using your $k$ symbol alphabet or a selection such as all consecutive 30 letter strings found in the DNA of some individual. The former is a Hamming graph but the latter is "subgraph of a Hamming graph" and I'm not sure how easy it is to say if a given graph can be realized in this way. Although there are restrictions. Define a "line" to be any maximal clque (set of adjacent points) then 2 points are on at most one line. Then lines have size $k$ or less. Planes are less clear to me. As commented elsewhere, quasi-Hamming is defined to have the additional condition that distances are the same as in a full Hamming graph so if you have AAAAA and AAABC then you must have one or both of AAABA and AAAAC. There can be triangles and (AAA,BAA,BAX,BCX,BCY,ACY,ACA) would make a cord free $7$-gon. However there can not be a cord free $5$-gon.