In a typical FASTA file, how can the header be used as its filename (i.e., replace the current file name with header ID) ?
I have multiple such FASTA files. I have been scouring the internet to find a simple script that I can use in LINUX to obtain the output, but to no avail. I am not well-versed with programming language or any computational language for that matter, which is why this task is proving to be quite an obstacle for me! Please help!
What does
cat *.fasta | grep -e '>' | head -n 10
give you? It would be helpful to see the structure of the sequence headers, in order to provide a proper solution.> AAA64362/A/Japan/305+/1957
> AAA64363/A/RI/5-/1957
> AAA64364/A/Japan/305-/1957
...and so on
Ok, so how do you want the files named according to these headers?
The full header name as the filename with underscore as separator will be ideal.
There are no underscores in the header, do you want the slash (/) to be replaced with the underscores?
I agree, using forward slash in filenames is not the best idea