Code Monkey home page Code Monkey logo

Comments (7)

snystrom avatar snystrom commented on August 16, 2024

This might be related to #6.

from universalmotif.

snystrom avatar snystrom commented on August 16, 2024

Also, in case this is relevant to a fix, the custom alphabet spec is defined here.

from universalmotif.

manoloff avatar manoloff commented on August 16, 2024

Okay. So there is no intend on running run_meme with a custom alphabet?

I tried writing the sequences to a fasta file and running the whole thing through a system command with the intention of using read_meme to then read the results, however meme-chip (version 5.4.1) doesn't produce an "END ALPHABET" line in the meme output, so I end up having to add it myself in order to read it. So in short - I can neither run meme with a custom alphaber, nor read one after it's ran if I don't myself edit the meme file. Is this desired?

(a snippet from the meme output file)

********************************************************************************
ALPHABET "MethDNA" DNA-LIKE
********************************************************************************
A "Adenine" 660000 ~ T "Thymine" 000066
C "Cytosine" 666600 ~ G "Guanine" 006600
M "mC:Guanine" 006666 ~ m "Methylcytosine" 660066
N = ACGMTm
********************************************************************************

********************************************************************************
TRAINING SET
********************************************************************************
PRIMARY SEQUENCES= output/seqs-centered
CONTROL SEQUENCES= --none--
Sequence name            Weight Length  Sequence name            Weight Length  
-------------            ------ ------  -------------            ------ ------  
1                        1.0000     11  2                        1.0000     11  
3                        1.0000     11  4                        1.0000     11  
5                        1.0000     11  6                        1.0000     11  
7                        1.0000     11  8                        1.0000     11  
9                        1.0000     11  
********************************************************************************

Still using the custom alphabet from the example I mentioned

from universalmotif.

snystrom avatar snystrom commented on August 16, 2024

So there is no intend on running run_meme with a custom alphabet?

The intent is to support custom alphabets. Not fully supporting them was a stopgap in that PR to at least broaden the support to DNA/etc.-like alphabets while waiting on a full custom alphabet support, which Ben later implemented. Clearly there's still some kinks to work out.

The END ALPHABET chunk does exist in some types of MEME suite output file (see: dreme.txt for an example), but the fact that it is not always included is frustrating. I'm working on a quick fix that could solve this.

I appreciate that this is frustrating, thanks for your patience.

from universalmotif.

manoloff avatar manoloff commented on August 16, 2024

Thank you! I will continue with the above mentioned fix until there is an official fix :)

from universalmotif.

snystrom avatar snystrom commented on August 16, 2024

Fix is filed for PR, I also added a better error message to indicate it's failing at parsing the custom alphabet in case this happens with other output types in the future with a hint to file an issue here. How each MEME tool writes the meme.txt file varies with different parameters or just is different between tools, so it's hard to write a perfect parser in one go. Think we'll just have to keep catching these edge cases unless there's a documented spec somewhere.

@bjmt seems worth throwing into release as well since this is a bug? Up to you.

from universalmotif.

bjmt avatar bjmt commented on August 16, 2024

Sorry for taking forever to get around to this. I had no idea the MEME alphabet definition could change like that. Though admittedly I've never used custom alphabets for my own work, so I never really tested read_meme() for such cases too thoroughly.

@snystrom Thanks for the fix, I'm testing it now and will merge into release today/tomorrow. You're right that it's a bit hacky but it doesn't change previous behaviour so I'm happy to merge it in until the next bug report/time I become inclined to fix it properly/etc.

Assuming I get this into the release branch today or tomorrow, it should show up in the Bioconductor release (3.15) sometime in the middle of the week. Thanks for reporting this!

from universalmotif.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.