<p>Checkout an MSA visualisation and analysis package that you can load the alignment into. It may not be the newest tool, but I've used Jalview (<a href="https://www.jalview.org/" rel="nofollow noreferrer">https://www.jalview.org/</a>) in the past</p>

CC BY-SA 4.0
2023-01-21T04:05:10.380Z
I have used jalview myself. But I want to do it in a R program
Lazy PhD
CC BY-SA 4.0
2023-01-20T22:38:53.223Z
2023-01-20T22:38:53.223Z
Chris_Rands
<p>I have the peptide sequences and fasta files separately. I first aligned the fasta files using <code>msa</code> package. After that I'm trying to highlight the peptide sequences in the multiple sequence alignment output. I couldn't find a way to do that. Any suggestions on how to do this would be very helpful.</p>
<p>My R script so far:</p>
<pre class="lang-r prettyprint-override"><code># load required packages
library(seqinr)
library(msa)
library(dplyr)

# read the file containing the list of peptide sequences
peptides &lt;- read.table(&quot;./peptides/AB_hydrolase-1_domain-containing_protein.txt&quot;, header=F, stringsAsFactors=F)

# read the file containing the list of fasta files
#hemoSeq &lt;- readAAStringSet(system.file(&quot;examples/HemoglobinAA.fasta&quot;,package=&quot;msa&quot;))
fasta_file &lt;- &quot;./fasta/AB_hydrolase-1_domain-containing_protein.txt&quot;
fasta_data &lt;- readAAStringSet(fasta_file)

# multiple sequence alignment with ClustalW algorithm
msa &lt;- msa(fasta_data, method = &quot;ClustalW&quot;)
<span class="math-container">```</span>
</code></pre>

CC BY-SA 4.0
2023-01-20T18:21:35.543Z
Hi and welcome. Could you please define what you "specific peptide sequences"? Perhaps also include the title of the question in the question.
M__
CC BY-SA 4.0
2023-01-20T18:26:20.417Z
@M__ I have some short peptide sequences belonging to these fasta sequences, i want to highlight these peptides positions to know their locations in the msa output
Lazy PhD
<r><bioconductor><multiple-sequence-alignment>
How to highlight the specific peptide sequences after performing multiple sequence alignment for the fasta file?
# How to highlight the specific peptide sequences after performing multiple sequence alignment for the fasta file?

(Asked by: username_0 on 2023-01-20)

I have the peptide sequences and fasta files separately. I first aligned the fasta files using msa package. After that I'm trying to highlight the peptide sequences in the multiple sequence alignment output. I couldn't find a way to do that. Any suggestions on how to do this would be very helpful.
My R script so far:
# load required packages
library(seqinr)
library(msa)
library(dplyr)

# read the file containing the list of peptide sequences
peptides <- read.table("./peptides/AB_hydrolase-1_domain-containing_protein.txt", header=F, stringsAsFactors=F)

# read the file containing the list of fasta files
#hemoSeq <- readAAStringSet(system.file("examples/HemoglobinAA.fasta",package="msa"))
fasta_file <- "./fasta/AB_hydrolase-1_domain-containing_protein.txt"
fasta_data <- readAAStringSet(fasta_file)

# multiple sequence alignment with ClustalW algorithm
msa <- msa(fasta_data, method = "ClustalW")
```

**Tags:** r, bioconductor, multiple-sequence-alignment
> **Comments:**
> **username_1**: Hi and welcome. Could you please define what you "specific peptide sequences"? Perhaps also include the title of the question in the question.  
> **username_0**: @M__ I have some short peptide sequences belonging to these fasta sequences, i want to highlight these peptides positions to know their locations in the msa output  

---

## 1 answers

### Answer by username_2 on 2023-01-20. Score: 1

Checkout an MSA visualisation and analysis package that you can load the alignment into. It may not be the newest tool, but I've used Jalview (<https://www.jalview.org/>) in the past

> **Comments:**
> **username_0**: I have used jalview myself. But I want to do it in a R program  

---

