I have a text file containing all the sequences which I wanted to extract from the fasta file. I tried as an example with some raw sequences using grep function and it works perfectly
But I am facing some problem with the original file. I am getting the blanck output file. I tried different way and found that there is a problem with the IDs which is in the text file.
Problem which I could understand untill now "ids in the text file have the space character at the end" due to this space I am getting the blanck output file.
I took some of the sequences from the ID file and remove the space at the end and run again the grep script. It gives me result.
I would like to know
1 is space at the end of the id in the text file matter?
2 how can I remove the space from the id file with some command?
3 Is ther some way that I can tell grep that do not consider the space at the end?
my code is
|grep -A1 -wFf ID.txt input.fasta > result.fa|