Skip to content

Latest commit

 

History

History
52 lines (25 loc) · 1.39 KB

File metadata and controls

52 lines (25 loc) · 1.39 KB

scientific_name_to_common-name_converter / rename fasta file header's scientific name to common name

Convert scientific names to common names and vice versa

Required file: https://www.uniprot.org/docs/speclist.txt

Python: 2.7

to run (change the path as yours)

[1] import convert_scientific_name_to_common_names

Function to get a general scientific name to common name dictionary

[2] n2c, c2n = convert_scientific_name_to_common_names.convert(path = 'C:/Users/rahul/',specfile="speclist.txt",outfile="Sci2Com.csv")

output:

A csv file "Sci2Com.csv" in your folder and a python dictionary

[3] n2c['Homo sapiens']

[4] 'Human'

[5] n2c['Pan paniscus']

[6] 'Bonobo'

[7] c2n['Human']

'Homo sapiens'

[8] c2n['Cat']

'Felis catus'

image

Function to make a fasta file with concise header and common names - useful before phylogeny analysis

Rename fasta file header's scientific name to common name before phylogeny analysis

Download 'Description Table (csv) after selecting 'Common Name' from the NCBI BLAST output page

image

Change the path and file names as yours and run:

image