Hello folks,
I am going down the Rosalind problem sets, and I am currently trying to obtain the protein amino acid sequences from Uniprot using the Uniprot IDs given.
My method was using the ID and concatenating it into the Uniprots website. The first two ids will not work, while the second two work perfectly. I tried running curl -I
to look for any hint of whats wrong , but it does not help. I am now working on making this work with the Python 3 API directly, hopefully that works.
ids2=['P01866','P81448', 'Q640N1', 'Q0TMT1']
with open('output.txt', 'w') as f:
for i in ids2:
p2=subprocess.run(['curl','-s',f'https://www.uniprot.org/uniprot/{i}.fasta'], stdout=f , text=True)
Thank you for the clarification, that makes sense!
If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one if they work.