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".
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
1 answer
(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.
If you're using OS X, install GNU awk via Homebrew or similar package managers.
Log in to answer this question.
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.
Thanks, I installed it using conda. Could there be another issue to do with installation?