Hi, I want to compare motifs between two sets of sequences by drawing their sequence logo, should I align them together or separately?
Hi, I want to compare motifs between two sets of sequences by drawing their sequence logo, should I align them together or separately?
We don't know whether you are talking about protein or DNA/RNA motifs, so my answer will be general.
If you are talking about finding motifs in a common sense use of that term, and especially if those two groups of sequences are from different proteins or promoters, you may not be able to align them at all using global alignments of both groups. The whole point of motifs is that they are short stretches of sequence in what can otherwise be long and unrelated sequences.
Assuming you have enough signal to detect motifs individually in both groups of sequences, and that you can find all the motifs that are present (there may be more than one), it should be obvious if both groups share the same motif even if you do the motif finding separately. Combining the two groups before motif finding will likely give you the same result, but only if proper motif finding is done. Without knowing exactly what you have and how (un)related the two sequence groups are, there is no guarantee that they can be globally aligned in such a way where a common motif will be obvious.
https://github.com/mgledi/DiffLogo and r package: https://bioconductor.org/packages/release/bioc/html/DiffLogo.html
Image from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4650857/: .
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Can you expand on your question more? It's unclear what data you have and what you want to do with it.
If you want to compare then you will need at least two things to do so. So finding motifs separately would be the first thing to do. Then you may want to follow-up by doing a single alignment (if the results indicate that the two groups may share a motif) to confirm.