I am trying to query a large FASTA file in which I start with a list of genes, search for the gene in the FASTA, and then I want to print out the header line (>gene) and the protein sequence from the subsequent line.
Due to the large size of the FASTA file, I am using a while loop. I can print the line that contains the string I am searching for, but I cannot figure out how to print the next line that contains the protein sequence.
Can someone please tell me the easiest way to do that?
Thanks.
See the answers to this question. Do you realise that the next line after the header may not contain the entire sequence?
Hi Keith, I think your comment is appropriate as an answer as well. You might want to consider adding it.
Duly added, with a pointer to another relevant answer too.