propy.GetProteinFromUniprot

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.

propy.GetProteinFromUniprot.GetProteinSequence(ProteinID: str) → str[source]

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

Examples

>>> protein = GetProteinSequence(ProteinID="Q9NQ39")
propy.GetProteinFromUniprot.GetProteinSequenceFromTxt(path: str, openfile: str, savefile: str)[source]

Get the protein sequence from the uniprot website by the file containing ID.

Parameters:
  • 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”