Starting from an example FASTA file with proteins from P. falciparum called P-falciparum-proteins.fasta
, the exercise consist in writing a script which has a function split_fasta
which has two arguments, the filename of the FASTA file as first and the path of directory as second argument.
The function should do the following:
P-falciparum-proteins.fasta
which is located in the current directory .
.record_id.fasta
(note: replace characters like |
in the record_id by _
) in the current directory.After the function is executed, generate a file listing of the current directory and print out all file paths on stdout.
Example of the file listing:
A0005w-pep.fasta
A0010c-pep.fasta
A0015c-pep.fasta
A0020w-pep.fasta