uchicago-bio / 2015-Autumn-Forum

0 stars 0 forks source link

Stupid Google Stupid App Stupid Engine #30

Closed jvmakin closed 9 years ago

jvmakin commented 9 years ago

So I have a page on google app engine that can take information and I can print that out on the page. And I have a python program that can align sequences. I cannot, however, make them work together. Does anybody know where in the google app engine code you can stick methods that modify the information collected? Slash show them on the final page?

bjmc commented 9 years ago

Are you following the examples in the Google docs? What does your app engine code look like so far? Are you getting any kind of error?

I think it should be possible to just import your sequence alignment code, and then call it from your app engine code, so, something like...

from my_sequence_aligner import align_sequences
...
    def post(self):
        submitted = cgi.escape(self.request.get('content')))
        sequence1, sequence2 = submitted.split_or_process_or_something()
        result = allign_sequences(sequence1, sequence2)
        self.response.write(result)
tabinks commented 9 years ago

@jvmakin Based on what we were working on in office hours you should do something like this:

You may want to adopt some simple formatting to pass your matrix around. Something like

1,2,3,4:5,6,7,8:9,10,11,12 

for

1 2 3
4 5 6
7 8 9

You can just split and parse that up to format as an HTML table to pass along as a template variable.

Everyone else: This is just one approach based on what we worked on in office hours. You may be doing it differently, but that does not mean it is incorrect.

jvmakin commented 9 years ago

Thank you! I will try new things. :)