I have data set like this:
ID col1 col2 col3 col5 col6
1 AA TC GC CC TA
2 AG TC CC CC TT
3 AG TC GG CC AA
4 GG TC GC CC AT
5 AA CC CC CC AA
6 AG TT GC CC TT
7 GG TC CC CC TA
I want to make a new column based on conditions like :
If col1 == A|col2==T|col3==G|col4==C|col5==T assign 001
If col1 == G|col2==C|col3==C|col4==C|col5==A assign 002
if other assign other.
but the position of the letters is not important, i mean if the col5 have T or A first, the order is not important.
So the data should look like this:
ID col1 col2 col3 col5 col6 new_column
1 AA TC GC CC TA 001+002 # because both of the conditions are found here
2 AG TC CC CC TT other+other
3 AG TC GG CC AA other+other
4 GG TC GC CC AT 002+other
5 AA CC CC CC AA other+other
6 AG TT GC CC TT 001+other
7 GG TC CC CC TA 002+other
Can you please help me?