Thanks. I'm having some trouble getting this to run.
- I've copied and pasted this script into a text file as extract.sh
- I've chmod u+x extract.sh
- I've replaced the 'pairs.txt' and 'file.fasta' with the appropriate file names
- I've run ./extract.sh within the folder containing the two files.
But I get this error:
Traceback (most recent call last): File "./parse.sh", line 11, in <module> for line in f: ValueError: I/O operation on closed file