0
$\begingroup$

I'm trying to programmatically replace a set of amino acid residues on an MSA with a "Z" from a list of unaligned positions. Any ideas on how I could do this?

Input: a list of unaligned positions for each sequence + an MSA
Output: an MSA with those unaligned positions on the aligned MSA replaced with a Z for each sequence.

$\endgroup$
4
  • 1
    $\begingroup$ Hi @DannyMorales and welcome. This is likely fairly easy to do, but the question is difficult to understand. Any clarity would be helpful. $\endgroup$
    – M__
    Oct 23 '20 at 21:26
  • $\begingroup$ Hey Michael! Thanks for the reply. I have a multiple sequence alignment i'm working with and a list of sites on that alignment that are glycosylated. I was trying to run a script that would take the input of the positions as a list of characters along with the MSA to replace the Nth character with a "Z" to easily visualize the sites. So essentially if I feed it the following sequence "M----KFLAFLCLLGFANAQ-------------D-GKCG----TLSNKSPS--------------------K" and positions "2, 5, 10, 11, 14" it should spit back "M----ZFLZFLCLZZFAZAQ-------------D-GKCG----TLSNKSPS--------------------K" $\endgroup$ Oct 23 '20 at 22:08
  • 2
    $\begingroup$ Understand, what you need to do is update your question with the information above and then provide the code you have so far. The obvious choice here is biopython AlignIO $\endgroup$
    – M__
    Oct 23 '20 at 22:28
  • 2
    $\begingroup$ Could you please show your code, so that is clear what you tried so far? $\endgroup$
    – Mr_Z
    Oct 24 '20 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.