Skip to content

Session 17: Practice 6

Juan Gonzalez-Gomez edited this page Mar 24, 2020 · 23 revisions

Session 17: Practice 6

  • Time: 2h
  • Date: Wednesday, March-25th-2020
  • Goals:
    • Practicing with forms
    • Practicing with servers

Contents

Introduction

The goal of this practice is to develop the second version of the Seq server developed in practice 3, but using the HTTP python module instead of raw sockets and accessing to its services by means of forms

This table describe the names of the actions and their parameters

Service name Action Argument Response message Description
PING ping none See exercise 1 Ping service for testing if the server is alive of not
GET "GET n" n: 0-4 A sequence Get the sequence n. It could be any valid sequence of any length. There are only 5 sequences, numbered from 0 to 4
INFO "INFO seq" seq: A sequence See format below Get information about the given sequence: total length, number of bases and their percentages
COMP "COMP seq" seq: A sequene The complement sequence Calculate the complement of the given sequence
REV "REV seq" seq: A sequence The reverse sequence Calculate the reverse of the given sequence
GENE "GENE name" Gene name. See format below The sequence of the gene Get the complete sequence of the given GENE

The response message returned by the INFO service should be like this example:

Sequence: ATAGACCAAACATGAGAGGCT
Total length: 21
A: 9 (42.9%)
C: 4 (19.0%)
G: 5 (23.8%)
T: 3 (14.3%)

The names of the genes that are valid when calling the GENE service are: U5, ADA, FRAT1, FXN, RNU6_269P

The server will be programmed step by step, following the guides given in the exercises

Exercises

NOTE: This webserver is extremely easy if you already have finished the server from the Practice 4 and the exercises of the Session 14

For making it works, you only have to change small things and pay attention to the details

Exercise 1: A.html

Implement the server. Use the same HTML files from the practice 4, with small modifications for working ok on this server. The A,C, T and G HTML pages are store into the P5/info/ folder

  • Server Filename: P5/Bases2-webserver.py
  • HTML files:
    • P5/index.html
    • P5/Error.html
    • P5/info/A.html
    • P5/info/C.html
    • P5/info/T.html
    • P5/info/G.html

In this animation you can see it working:

END of the session

The session is finished. Make sure, during this week, that everything in this list is checked!

  • You have all the items of the session 14 checked!
  • Your working repo contains the P5 Folder with the following files:
    • info/A.html
    • info/C.html
    • info/G.html
    • info/T.html
    • Error.html
    • index.html
    • Bases2-webserver.py
  • All the previous files have been pushed to your remote Github repo

Author

Credits

  • Alvaro del Castillo. He designed and created the original content of this subject. Thanks a lot :-)

License

Links

Clone this wiki locally