Incorrect representation of plot using Logolas R package for Enrichment Depletion Logo

Hi!

I´m using Logolas package to represent the enrichment depletion logo of biological data (amino acid sequence).
In this post, I don´t share the complete specifications of Logolas, because the purpose of this post is figure out the meaning of the warning message

This is the package: https://github.com/kkdey/Logolas
This is an alternative version of Weblogo to represent the sequence in bioinformatics.
Here is my input data:

 NSTE NFSW NFSW NFSW NFSW NFSW NFSW NSTE NFSW NFSW NFSW NFSW 

When I try to represent my data using this, the plot is created, however, the logo doesn´t look like I expect.
This plot gives me this warning message:

using a background with equal probability for all symbols
Analyzing the positional frequency matrix
color_type not provided, so switching to per_row option for
            color_type
using a background with equal probability for all symbols
frame width not provided, taken to be 1
frame width not provided, taken to be 1
Error in grid::unit(letters$x, "native") : 
  'x' and 'units' must have length > 0
Also: Warning messages: 
In if (class (table) == "data.frame") {:
   the condition has length> 1 and only the first element will be used
2: In if (class (table)! = "Matrix") {:
   the condition has length> 1 and only the first element will be used
3: In if (class (table) == "data.frame") {:
   the condition has length> 1 and only the first element will be used
4: In if (class (table)! = "Matrix") {:
   the condition has length> 1 and only the first element will be used 

I don´t understand completely this message. If there is a problem with my data or I need to provide more specifications to the code line to generate the plot.
I try to figure out the exact meaning of this message to apply in my data, however, I did not succeed.

Any suggestion?

Thank!

Not possible to say without knowing what function was applied to the data.

# BiocManager::install("Logolas")
library(Logolas)
x <- c("NSTE","NFSW","NFSW","NFSW","NFSW","NFSW","NFSW","NSTE","NFSW","NFSW","NFSW","NFSW")

logomaker(x, type = "Logo")
#> color_type not provided, so switching to per_row option for
#>                   color_type
#> frame width not provided, taken to be 1
#> Warning in if (class(table) == "data.frame") {: the condition has length > 1 and
#> only the first element will be used
#> Warning in if (class(table) != "matrix") {: the condition has length > 1 and
#> only the first element will be used
#> using a background with equal probability for all symbols

1 Like

Thank for the answer.
Here is the function that was applied to the data:

sequence <-c("NSTE","NFSW","NFSW","NFSW","NFSW","NFSW","NFSW","NSTE","NFSW","NFSW","NFSW","NFSW")
# plot with traditional weblogos (plot 1): 
logomaker(sequence,type = "Logo")

# plot with EDlogo for use R package Logolas (plot 2):
logomaker(sequence, type = "EDLogo")

Here plot 1:
1
Plot 2:
2

I hope that the second plot represents "enrichment depletion".
This is an example that what I expect (this is other example to represent my idea):
3
This figure represents the enrichment depletion of some letters (for example P).
Any suggestion to understand the warning message?
Thank!

Take a look at the vignette.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.