Open famiji opened 8 months ago
Oh, I never noticed that. In rush
, the {}
is replaced with the input as it is. So you need to wrap the input with quotes.
$ echo -ne ">s\nactg\n" | rush 'echo "{}"'
>s
actg
parallel
seems to detect the symbol >
and add quotes for the input.
So I need to be careful when using rush
to handle the content of FASTA file
I don't recommend directly processing fasta content with rush, please use tools like seqkit.
Hello, I am new to bioinformatics and recently discovered that Rush offers support for custom-defined variables and advanced embedded replacement strings. I have realized the convenience of using single-line commands to process sequences in a shell environment. However, while learning through examples, I encountered an issue when trying to execute the following command:
echo -ne ">seq1\nactg\n>seq2\nAAAA\n>seq3\nCCCC"|rush
It get the right result,but when i try: echo -ne ">seq1\nactg\n>seq2\nAAAA\n>seq3\nCCCC"|rush echo {} As shown in the picture, this command only prints out the sequence lines, but the description line is not output, instead generating an empty file with the description line as the file name. So I tried the following command again and the result was the same: It appears that the issue I encountered is related to the interpretation of the redirect command (>) by the echo command. Logically, enclosing the redirect command in quotation marks should prevent this problem. Additionally, I tried using the parallel command and obtained the correct result. Is the situation described above a result of my incorrect usage of Rush?