This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Looking for a simple tool to match 6-mers (such as TGATCA) to motifs

Dear community,

I'm reaching out to find a simple tool that can do something like this: If I input TGATCA, it tells me it's the AP1 motif.

Can't believe I haven't found such a tool!

Best, Changxu

motif.

If I input TGATCA, it tells me it's the AP1 motif.

And where does this information come from i.e. TGATCA represents AP1 motif?

Can't believe I haven't found such a tool!

Is the said tool supposed to look this information up?

1 answer

If I input TGATCA, it tells me it's the AP1 motif.

the following awk script works as described above.

awk '($0=="TGATCA"){print "AP1"}' input.txt

or

grep -E '^TGATCA$' input.txt > /dev/null && echo "AP1"

Log in to answer this question.