Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with background probabilites as matrix #20

Open
gcambray opened this issue Mar 16, 2021 · 0 comments
Open

Problem with background probabilites as matrix #20

gcambray opened this issue Mar 16, 2021 · 0 comments

Comments

@gcambray
Copy link

Hi there,
thanks for this excellent package
I'm trying to provide a dataframe as input for the bg argument with the following call:
logomaker(selected, type = "EDLogo", bg = bg_freq)

but the std messages tells me:

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

So it looks like it is not recognizing the matrix as a correct input
Tried reducing the matrix to a vector with eg
logomaker(selected, type = "EDLogo", bg = apply(bg_freq, 1, median)
and this works fine

The bg_freq matrix I'm using looks like this:

> bg_freq
             X1         X2         X3         X4
A    0.05279903 0.04980073 0.05216351 0.05247792
R    0.07329378 0.07228652 0.07226239 0.07359076
N    0.03852414 0.04015821 0.03832839 0.03770225
D    0.03353948 0.03509813 0.03223993 0.03155547
C    0.03961352 0.04219518 0.04243954 0.04012201
E    0.02266077 0.02258770 0.02070860 0.02267954
Q    0.02168435 0.02120837 0.01836090 0.02008950
G    0.06898353 0.06675281 0.07242395 0.07669331
H    0.03605946 0.03450182 0.03327166 0.03264350
I    0.04746946 0.04550153 0.05004575 0.04720432
L    0.09994603 0.09670940 0.09729298 0.09461981
K    0.02239764 0.02331004 0.02001609 0.02170547
M    0.02649304 0.02574321 0.02573282 0.02503830
F    0.05888548 0.06087385 0.06871872 0.06445573
P    0.04518813 0.04547472 0.04307440 0.04472590
S    0.09771599 0.09989207 0.09634974 0.09773208
T    0.04927112 0.05092396 0.05147100 0.04962240
W    0.02641661 0.02564366 0.02608376 0.02669080
Y    0.04525383 0.04639751 0.04625036 0.04635929
V    0.07226708 0.07094374 0.07230865 0.07268440
STOP 0.02153753 0.02399685 0.02045687 0.02160725

The selected input looks like this:

> selected
        X1     X2    X3    X4
A     4391    312 18522 36137
R     1892    448 19556   754
N    15031     69 14746  9056
D    79066      8 20538 28701
C     6862    100  5082  5329
E    20854      1 11766 30431
Q     6055      3 15775 18050
G     2804    181 11035  3275
H    25443   2350  7719 14401
I     7118   6464 17796  4061
L    20541  49420 33519 30211
K     1706     57 12112   749
M     5246   8809 10347  8940
F    27814  94952  6160  6547
P       13    231  7385  8387
S    28827    252 36469 49113
T    13302   5898 24544 24978
W     8027   8266  2746  1192
Y    30918 138029  7065 12714
V    11667   1750 34702 24573
STOP    48     25    41    26

Is there something wrong with my input or is that a bug?

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant