How to logo-plot sequences of uneven length ?
0
0
Entering edit mode
7 weeks ago
Gautier • 0

Hi,

I'm trying to plot sequences of uneven length using ggseqlogo in Rstudio. However, the data arguments specifies that all sequences must have same width :

Error in letterMatrix(seqs) : Sequences in alignment must have identical lengths

How can I use ggseqlogo and add a blank when there is no longer amino acid in the sequence ?

Here are some of my data :

CASSLRGQGVEKLFF

CASLSQGTEAFF

CASSVGPGQTEAFF

CATSLGQSTDTQYF

CASSQDRGNSPLHF

CASSLDLRVNTEAFF

CASSQDLRVATEAFF

CASSPDREQYF

CASFGGPRTTEAFF

CASSVFYDSGANVLTF

CSARIPGTSGAYGYTF

CASSLRGQGVEKLFF

Thank you for your help !

logo length sequence sequencing • 243 views
ADD COMMENT
1
Entering edit mode

What about introducing a gap character?

I never tried making logo from the alignment but still it's just a thought.

ADD REPLY
0
Entering edit mode

Like adding gaps character until the maximum length is reached ? I thought about that, but this annoys me for further analysis...

ADD REPLY
1
Entering edit mode

You could add a X (undetermined/any AA) at end to make these same length and then plot a logo. enter image description here

ADD REPLY
1
Entering edit mode

Hmmmmm, instead of adding continuous gaps until the maximum length why don't you perform alignment (let's say using Clustal Omega), so that you will have an optimal alignment and optimally introduced gap characters.

Just to cross-check I performed multiple sequence alignment using sequences provided in the question and I copied the MSA in R and used ggseqlogo for creating the logo and I guess it worked perfectly fine.

Input:

>seq1
CASSLRGQGVEKLFF
>seq2
CASLSQGTEAFF
>seq3
CASSVGPGQTEAFF
>seq4
CATSLGQSTDTQYF
>seq5
CASSQDRGNSPLHF
>seq6
CASSLDLRVNTEAFF
>seq7
CASSQDLRVATEAFF
>seq8
CASSPDREQYF
>seq9
CASFGGPRTTEAFF
>seq10
CASSVFYDSGANVLTF
>seq11
CSARIPGTSGAYGYTF
>seq12
CASSLRGQGVEKLFF

MSA:

CATSLGQS-TDTQYF-
CASSVGP--GQTEAFF
CASFGGP--RTTEAFF
CASSQDRG-NSPLHF-
CASSPDRE-QYF----
CASSLRGQ-GVEKLFF
CASSLRGQ-GVEKLFF
---CASLS-QGTEAFF
CASSLDLR-VNTEAFF
CASSQDLR-VATEAFF
CASSVFYDSGANVLTF
CSARIPGTSGAYGYTF

Logo:

enter image description here

ADD REPLY

Login before adding your answer.

Traffic: 2577 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6