<p>Hi all,</p>

<p>I&#39;m dealing with a fasta file with spaces at the end of line, which caused the problem. I didn&#39;t find a suitable way to remove them. Please kindly tell me the appropriate command for removing them?</p>

Is that you have an space or a lack of the end of line code?

If your data are tab separated, and you have an space only at the end of the lane, you can do the following

    cat file.fasta | tr -d " " > newfile.fasta

But notice that this will get rid of all spaces, including those at the middle of the lane.