I have a list given as:
d = {{{A1,A2,T3}, {A4,T1,A2}, {T5,A1,A3}}, {{T1,T2,T3}, {A5,A1,A2},{A1,A2,T3}}}
I'm trying to delete sublists of the type:
{A,A,A},{A,T,T},{T,T,T}
that way I'm left with sublists consisting of only:
{A,A,T},{T,A,A},{A,T,A}
I'm also trying to keep the numbers in list "d" so my desired outcome would look something like:
dd={{{A1,A2,T3},{A4,T1,A2}, {T5,A1,A3}},{{A1,A2,T3}}}
I have tried the following:
DeleteCases[d,{A,A,A}|{T,T,T}|{A,T,T},{2}]
but nothing seems to change. I think there's an issue with my patterns in DeleteCases where I need to include additional information to exclude the numbers in list "d" and just delete the sublists based upon the criteria of the arrangement of the A's and T's.
Edit: Originally this question was posted with list "d" as a list of symbol, when it should have in fact been a list of strings. I have since rectified that issue by keeping the original question and adding my intended question below, that way answers already provided could be insight for people looking for the same thing.
I have a list given as:
d = {{{"A1","A2","T3"}, {"A4","T1","A2"}, {"T5","A1","A3"}}, {{"T1","T2","T3"}, {"A5","A1","A2"},{"A1","A2","T3"}}}
I'm trying to delete sublists of the type:
{"A","A","A"},{"A","T","T"},{"T","T","T"}
that way I'm left with sublists consisting of only:
{"A","A","T"},{"T","A","A"},{"A","T","A"}
I'm also trying to keep the numbers in list "d" so my desired outcome would look something like:
dd={{{"A1","A2","T3"},{"A4","T1","A2"}, {"T5","A1","A3"}},{{"A1","A2","T3"}}}
I have tried the following:
DeleteCases[d,{A,A,A}|{T,T,T}|{A,T,T},{2}]
but nothing seems to change. I think there's an issue with my patterns in DeleteCases where I need to include additional information to exclude the numbers in list "d" and just delete the sublists based upon the criteria of the arrangement of the A's and T's.
{{{a[1], a[2], t[3]}, ...
. It would make the pattern matching much easier. See my answer below for a method to do this. $\endgroup$