Question: Meme-chip: How do I make my input sequences all the same length?
0
gravatar for kdc15
2.0 years ago by
kdc1540
kdc1540 wrote:

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

sequences meme meme-chip • 962 views
ADD COMMENTlink modified 2.0 years ago by Alex Reynolds31k • written 2.0 years ago by kdc1540
1

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 REPLYlink written 2.0 years ago by ATpoint42k

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

ADD REPLYlink written 2.0 years ago by kdc1540
1
gravatar for Alex Reynolds
2.0 years ago by
Alex Reynolds31k
Seattle, WA USA
Alex Reynolds31k wrote:

(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 COMMENTlink written 2.0 years ago by Alex Reynolds31k

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 REPLYlink written 2.0 years ago by kdc1540
1

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

ADD REPLYlink written 2.0 years ago by Alex Reynolds31k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2207 users visited in the last hour