Hi,
I was hoping I could help with 2 scripts to perform similiar functions.
I have a fasta file that is a combination of all the genome sequences from a specific phylum. I was hoping I could get a script that would replace every space with an underscore.
For example:
>Contig 1 Species name strain 1
>Contig 2 Species name strain 2
Will be replaces with
>Contig_1_species_name_strain_1
>Contig_2_species_name_strain_2
-------
Secondly, I was hoping for a script with the same function but will do this for filenames. I have each genome in a seperate fasta file and would like to change the file names to have underscores instead of spaces in the file name.
Thanks!
I was hoping I could help with 2 scripts to perform similiar functions.
I have a fasta file that is a combination of all the genome sequences from a specific phylum. I was hoping I could get a script that would replace every space with an underscore.
For example:
>Contig 1 Species name strain 1
>Contig 2 Species name strain 2
Will be replaces with
>Contig_1_species_name_strain_1
>Contig_2_species_name_strain_2
-------
Secondly, I was hoping for a script with the same function but will do this for filenames. I have each genome in a seperate fasta file and would like to change the file names to have underscores instead of spaces in the file name.
Thanks!
Comment