Meme-chip: How do I make my input sequences all the same length?
1
0
Entering edit mode
6.0 years ago
kdc15 ▴ 40

I am trying to run meme-chip, however, my analysis returns with errors, "while loading shared libraries" and "get size exited with error code 127". Does this have to do with my sequences not being the same length? And if so, how do I prepare my sequences to be equal lengths using command line?

Many Thanks

meme-chip meme sequences • 2.3k views
ADD COMMENT
1
Entering edit mode

No, this seems to be a more basic problem with loading libraries required to run the tool itself. How did you install it? Try to get it via conda and see if this solves the problem.

ADD REPLY
0
Entering edit mode

Thanks, I installed it using conda. Could there be another issue to do with installation?

ADD REPLY
1
Entering edit mode
6.0 years ago

(Assuming single-line FASTA, as input.)

You could verify your sequences are of different length, as a way to troubleshoot:

$ awk '($0 !~ /^>/) { print length($0); }' in.fa | sort -n | uniq

If you get multiple values back, then you might investigate your input and cut them to the shortest length.

The following cuts the prefix of any input sequence string down to the shortest length:

$ SHORTEST_LENGTH=`awk '($0 !~ /^>/) { print length($0); }' in.fa | sort -n | uniq | head -1`
$ awk -vSL=${SHORTEST_LENGTH} '($0 !~ /^>/) { print($0, 1, SL); } ($0 ~ /^>/) { print $0 }' in.fa > out.fa

You could write different logic, if you wanted to trim flanking regions. It's a little more work to deal with an odd-numbered shortest length, however.

ADD COMMENT
0
Entering edit mode

Thanks a lot. So I checked, and did get multiple values back. However, i'm having some trouble with the second script, it's returning with "an invalid -v option".

ADD REPLY
1
Entering edit mode

If you're using OS X, install GNU awk via Homebrew or similar package managers.

ADD REPLY

Login before adding your answer.

Traffic: 2279 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