Download the protein sequence from the uniprot website.
You can only need input a protein ID or prepare a file (ID.txt) related to ID. You can obtain a .txt (ProteinSequence.txt) file saving protein sequence you need.
Authors: Dongsheng Cao and Yizeng Liang. Date: 2012.9.3 Email: email@example.com
GetProteinSequence(ProteinID: str) → str¶
Get the protein sequence from the uniprot website by ID.
Parameters: ProteinID (str) – indicating ID such as “P48039” or “Q9NQ39”. Returns: protein_sequence Return type: str
>>> protein = GetProteinSequence(ProteinID="Q9NQ39")
GetProteinSequenceFromTxt(path: str, openfile: str, savefile: str)¶
Get the protein sequence from the uniprot website by the file containing ID.
- path (str) – a directory path containing the ID file such as “/home/orient/protein/”
- openfile (str) – the ID file such as “proteinID.txt”
- savefile (str) – the file saving the obtained protein sequences such as “protein.txt”