In this practical you will write two scripts - one to perform screen scraping and one to use a REST API.
In the first part of the practical, we will imagine that we are accessing a simple web site for performing secondary structure prediction. The web site does not provide any programmatic way of making predictions so we will have to use the screen scraping approach.
Our aim is to have a program that puts a sequence in a variable, then calls the screen scraper subroutine to get the secondary structure prediction from a web site and then prints the sequence and the secondary structure prediction. Something like this:
seq = """KVFGRCELAAAMKRHGLDNYRGYSLGNWVCAAKFESNFNTQATNRNTDGSTDY GILQINSRWWCNDGRTPGSRNLCNIPCSALLSSDITASVNCAKKIVSDGNGMNAWVAWRNR CKGTDVQAWIRGCRL""" ss = PredictSS(seq) if(ss != ""): print (seq) print (ss)
In the second part of the practical, we will access a REST service for obtaining mappings between residues in PDB (protein structure) files and residues in the equivalent UniProt (protein sequence) file.