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

importMatrix of MEME file without w= and nsites= values in letter-probability string crashes #18

Open
Julie-Cardin opened this issue May 3, 2024 · 2 comments

Comments

@Julie-Cardin
Copy link

Hello,

the MEME version we use doesn't genertare the w= and nsites= so

mportMatrix(..., format="meme") Error in (mat.fr + 1):(mat.fr + as.numeric(w)) : NA/NaN argument In addition: Warning message: In FUN(X[[i]], ...) : NAs introduced by coercion

does not work. Per the MEME standard, the length could be can be derived from the matrix if they are not specified, provided there is an empty line following the letter probability matrix [https://meme-suite.org/meme/meme_5.5.4/doc/meme-format.html]
and the nsites default to 20 if not specified....

Is this voluntary that your implementation needs w= and nsites= to work ?

What we have as data:


ALPHABET= ACGU

strands: +

MOTIF group0 group0

letter-probability matrix: alength= 4
0.2423856687440365	0.2423856687440365	0.27284299376789045	0.2423856687440365
0.22685969217988056	0.22685969217988056	0.3194209234603583	0.22685969217988056
0.21926418154603855	0.34220745536188435	0.21926418154603855	0.21926418154603855
0.2116735308861708	0.2116735308861708	0.36497940734148765	0.2116735308861708
0.20400140355966154	0.3879957893210154	0.20400140355966154	0.20400140355966154
0.19624139432687643	0.41127581701937077	0.19624139432687643	0.19624139432687643
0.1884194109033729	0.1884194109033729	0.1884194109033729	0.43474176728988123
0.17289070590064243	0.17289070590064243	0.48132788229807266	0.17289070590064243
0.1651631759627908	0.1651631759627908	0.1651631759627908	0.5045104721116277
0.5046694234925583	0.16511019216914724	0.16511019216914724	0.16511019216914724
0.17231399749328336	0.14126798752631473	0.5451500274540871	0.14126798752631473
0.11638505693861528	0.14527656898549268	0.11638505693861528	0.6219533171372769
0.0847707907081765	0.7456876278754705	0.0847707907081765	0.0847707907081765
0.05277970708083049	0.8109948507705643	0.08344573506777464	0.05277970708083049
0.022012491592590694	0.8741967112188684	0.022012491592590694	0.08177830559595012
0.8744016653645654	0.08170998754738446	0.02194417354402503	0.02194417354402503
0.01448287640318191	0.01448287640318191	0.8967855567870948	0.07424869040654133
0.0	1.0	0.0	0.0
0.001445661444688523	0.001445661444688523	0.001445661444688523	0.9956630156659344
0.794535180236837	0.16826237019703663	0.01860122478306317	0.01860122478306317
0.02622808218529049	0.9213157534441285	0.02622808218529049	0.02622808218529049
0.04948716677801554	0.04948716677801554	0.04948716677801554	0.8515384996659534
0.11133056406688091	0.6973952980662635	0.08117797469100574	0.11009616317584983
0.12750647131948215	0.09735388194360697	0.6777857647933039	0.09735388194360697
0.15026844489399413	0.12011585551811896	0.609499844069768	0.12011585551811896
0.15032502939641434	0.15032502939641434	0.5490249118107569	0.15032502939641434
0.45926561782286185	0.18024479405904603	0.18024479405904603	0.18024479405904603
0.2034975511030523	0.2034975511030523	0.3895073466908431	0.2034975511030523
0.22683171378041145	0.22683171378041145	0.3195048586587657	0.22683171378041145
0.242316306685997	0.27305107994200906	0.242316306685997	0.242316306685997```

Thanks.
@jianhong
Copy link
Owner

jianhong commented May 6, 2024

Hi,

Thank you for reporting this. This should be fixed in the development version. Let me know if it does not work for you.
To indstall the development version:
BiocManager::install('jianhong/motifStack')

Jianhong.

@Julie-Cardin
Copy link
Author

Hi,
Your fix in dev version work perfectly well for me!
MANY THANKS for this very fast and efficient answer!
:)

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

2 participants