Last active
April 15, 2022 18:54
-
-
Save variux/440976559e771c5a2d8319ec4ae4b652 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def extract_proteinid(description): | |
splitted = description.split(" ") | |
for feature in splitted: | |
if "protein_id" in feature: | |
print(feature.split("=")[1][:-1]) | |
for seq_nucleotides in SeqIO.parse("CDS_sequence.txt", "fasta"): | |
extract_proteinid(seq_nucleotides.description) | |
print(seq_nucleotides.seq) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment