tom-and-the-toothfairies / pathways Goto Github PK
View Code? Open in Web Editor NEW:older_woman: :hospital: :pill: :pill:
Home Page: https://tomandthetoothfairies.info/
:older_woman: :hospital: :pill: :pill:
Home Page: https://tomandthetoothfairies.info/
Sending me off to the docker site to install it is risky. For example, should I do the procedure that edits /etc/apt/sources.list to add the word testing after main on the "appropriate line" of the file? What is the appropriate line? Should I have both stable and unstable repos? Should I treat the project as a "production system"?
Docker hello-world worked ok.
I setup the docker group as pointed out by your other link. You should all read the comment by Chris Foster, April 22nd 2015. Now, how do I undo this?
I run docker with 0.1 - it can't find it locally, even though I have already checked out 0.1.
Some tests run. But where is my app?
README needs to be organised by feature name. All test instructions should give an indication of what to expect if tests succeed.
At the moment we're using the browser pipeline for API requests - which means that phoenix is doing a bunch of unnecessary work on each request. It also means that post requests need CSRF tokens.
A minimal custom pipeline would probably be better - one that just accepts json and does some basic Phoenix.Token
access control.
refactor the chain of requests in app.js
. - introduced by #107
test/controllers/pml_controller_test.exs:9 the :name option in form_for/inputs_for is deprecated, please use :as instead (phoenix_html) lib/phoenix_html/form_data.ex:53: Phoenix.HTML.FormData.Plug.Conn.to_form/2 (phoenix_html) lib/phoenix_html/form.ex:238: Phoenix.HTML.Form.form_for/4 (panacea) web/templates/page/index.html.eex:1: Panacea.PageView."index.html"/1 (panacea) web/templates/layout/app.html.eex:29: Panacea.LayoutView."app.html"/1
#107 - now that we have a chain of requests we can make some changes to the UI.
Opening this so we can discuss what these changes should entail.
Per #92 (comment), we need to hardcode docker install instructions from https://store.docker.com/editions/community/docker-ce-server-ubuntu?tab=description into depedencies.sh
๐ต
Currently the page only updates when a new file is submitted which contains drugs or invalid pml. If an empty file is submitted then no update of the page occurs.
When a new file is selected, the page should reset back to a clean slate and wipe all previously displayed analysis. This should happen when the file is selected not just when it is submitted.
See #102.
the parser will have to change
Just some possibly useful links https://github.com/bitwalker/combine (distillery author) https://github.com/alexrp/ex_parsec https://github.com/h4cc/awesome-elixir#lexical-analysis https://github.com/marcelog/ex_abnf (might be able to take Andrew's BNFC and convert it to ABNF?)
how should we do this?
some phantomjs type thing in a container perhaps?
request to identify DDI's should not be processed until Asclepius.HealthChecker
reports that Asclepius is up.
update the readme to include what features we have implemented - section per feature - and how to test the features - ci/run tests locally/check in browser
PMLController probably should't be doing anything related to DDIs.
This should be two requests in my opinion.
The file should be parsed and the drugs returned to the front-end. Depending on the number of drugs found (and perhaps user input), the front-end should then send a request for DDIs to a different endpoint ("POST /api/ddis" drugs=[...]").
@houli didn't properly review the README commit, the badge does not link to the CI page, this should be remedied with a link to the CI dashboard
The pml controller breaks when given a valid pml file with no drugs( such as the no_drugs.pml
file in the fixtures directory ) as it sends an empty list to asclepius and matches on the response being {:ok, _} but asclepius will return an error if there aren't at least two drugs present.
This controller logic is probably also broken for files with only one identifiable drug, but I haven't tested that.
When passing any non text file the controller complains about encoding and spits out a 500
[info] POST /api/pml
[debug] Processing by Panacea.PmlController.upload/2
Parameters: %{"_csrf_token" => "RxdHWDk+R0gDUQ4pAHYKPANdbwAIEAAA1M44ngr8FiOaz4kSje8MGw==", "_utf8" => "โ", "file" => %Plug.Upload{content_type: "image/png", filename: "panacea_vial.png", path: "/var/folders/5p/95qqd109569dftcb4yd0dwbc0000gn/T//plug-1487/multipart-698596-812190-3"}}
Pipelines: [:browser]
[info] Sent 500 in 114ms
[error] #PID<0.315.0> running Panacea.Endpoint terminated
Server: localhost:4000 (http)
Request: POST /api/pml
** (exit) an exception was raised:
** (UnicodeConversionError) invalid encoding starting at <<137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 10, 214, 0, 0, 10, 213, 8, 6, 0, 0, 0, 109, 168, 9, 74, 0, 0, 0, 9, 112, 72, 89, 115, 0, 0, 11, 19, 0, 0, 11, 19, 1, ...>>
(elixir) lib/string.ex:1801: String.to_charlist/1
(panacea) lib/panacea/pml/parser.ex:9: Panacea.Pml.Parser.parse/1
(panacea) web/controllers/pml_controller.ex:7: Panacea.PmlController.upload/2
(panacea) web/controllers/pml_controller.ex:1: Panacea.PmlController.action/2
(panacea) web/controllers/pml_controller.ex:1: Panacea.PmlController.phoenix_controller_pipeline/2
(panacea) lib/panacea/endpoint.ex:1: Panacea.Endpoint.instrument/4
(panacea) lib/phoenix/router.ex:261: Panacea.Router.dispatch/2
(panacea) web/router.ex:1: Panacea.Router.do_call/2
(panacea) lib/panacea/endpoint.ex:1: Panacea.Endpoint.phoenix_pipeline/1
(panacea) lib/plug/debugger.ex:123: Panacea.Endpoint."call (overridable 3)"/2
(panacea) lib/panacea/endpoint.ex:1: Panacea.Endpoint.call/2
(plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4
(cowboy) /Users/peter/Desktop/pathways/panacea/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4
{
"label": "abacavir/ganciclovir DDI",
"uri": "http://purl.obolibrary.org/obo/DINTO_05759",
"drug_a": "dinto_db123123",
"drug_b": "chebi_1234124112"
}
or something like that so that the frontend can explain the cause of such a DDI
something something concurrent requests
Atm errors in parsing/validating a pml file result in a 200 with status: :errror
. This should probably be changed to just return some 4XX error. Should make things a bit easier on the Javascript side too - we can remove status
from the responses and just handle 200's and non-200's separately
Your average bids per feature are in the attached CSV file (with a .txt extension).
Revise as you see fit and use this issue tracker for clarification regarding the features
Opening5.txt
The current timeout time is 5 seconds, however when going several layers deep down the VM hole, this was not long enough. Increased the timeout time to 15 seconds.
Might be easier to use the fetch
api here https://github.com/tom-and-the-toothfairies/pathways/blob/iteration-2/panacea/web/static/js/app.js#L24 rather than XHR, also formatting and semicolons and the like maybe even some async/await
Group 5 - Iteration 3 - Feedback
The README is almost un-readable using a text editor.
Please put all install/update instructions inline,
and stop referring off to other websites
All I want to know is how to install your stuff - not have to wade through general instructions about a wide range of install options.
Even when I look at the README on github (hoping it is 0.3's readme)
it is not clear what to do.
What is this "Happy Path" stuff?
Here is a transcript of what happens when I try to follow these instructions
part 1 -----
butrfeld@CS4098:~/CS4098/pathways$ docker-compose up -d
The program 'docker-compose' is currently not installed. You can install it by typing:
sudo apt install docker-compose
end of part 1----------
I ignore that advice and do what you suggested earlier
part 2 -------
butrfeld@CS4098: tilde /CS4098/pathways$ sudo curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/releases/download/1.11.2/docker-compose-`uname -s-
uname -m`
[sudo] password for butrfeld:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 600 0 600 0 0 597 0 --:--:-- 0:00:01 --:--:-- 597
100 8066k 100 8066k 0 0 1338k 0 0:00:06 0:00:06 --:--:-- 1696k
butrfeld@CS4098:~/CS4098/pathways$ sudo chmod +x /usr/local/bin/docker-compose
end of part 2--------
So far, so good!
I then try:
part 3 ------
butrfeld@CS4098:~/CS4098/pathways$ docker-compose up -d
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
butrfeld@CS4098:~/CS4098/pathways$
end of part 3------
now I'm puzzled
If I follow the "Docker Hub" link I get a page with lists using Greek names - all very classical, but which one of these, if any, is 0.3 ??????
Looking at one suggests I need all three!!!
Then I see "Tags" ! This is getting very complicated.
The README should state clearly exactly what needs to be loaded from here.
How about some command-line stuff or a script that collects precisely the right stuff?
Your instructions regarding checking out 0.3 don't work - same problem as above.
Building manually.
OK - you need to provide scripts to do the DNS fixup/revert
It fails for me:
butrfeld@CS4098:/CS4098/pathways$ echo "{"dns": ["134.226.251.200", "134.226.251.100"]}" | sudo tee -a /etc/docker/daemon.json/CS4098/pathways$ sudo service docker restart
[sudo] password for butrfeld:
{"dns": ["134.226.251.200", "134.226.251.100"]}
butrfeld@CS4098:
butrfeld@CS4098:~/CS4098/pathways$ docker build -t tomtoothfairies/asclepius asclepius
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.26/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=tomtoothfairies%2Fasclepius&ulimits=null: dial unix /var/run/docker.sock: connect: permission denied
I am unable to get this going in any kind of reasonable time - the README needs a complete rewrite to have a clear approach to installing the software..
when you press submit, it takes a second or two for the response to come back.
It'd be nice if the submit button was disabled during this time, and perhaps if a spinner or something similar was displayed where the result panels show up.
create a phoenix web app
At the moment we show the raw JSON for DDIs to the user. We should come up with a nice way to display these:
we identified an interaction between drug_a and drug_b "link_to_interaction_thing"
Is the kind of thing I had in mind
until asclepius has started up, panacea should render a nice waiting page that refreshes automatically
RDFLib is really really slow. Redland's librdf is supposedly faster, according to this guy on stackoverflow
We should try using librdf in the Dinto module and see if it's worth anything.
At the moment if a clinician wants to represent a drug in their PML file they must use dinto:db123
or chebi:124
which, as raised in the meeting, is not very friendly. There'll be two changes required to accommodate this
After some investigation, every Drug URI in DINTO has a corresponding english label, as seen when calling Asclepius' /all_drugs
endpoint:
[
{
"label": "6-propyl-2-thiouracil",
"uri": "http://purl.obolibrary.org/obo/CHEBI_8502"
},
{
"label": "drospirenone",
"uri": "http://purl.obolibrary.org/obo/CHEBI_50838"
},
{
"label": "mefenamic acid",
"uri": "http://purl.obolibrary.org/obo/DINTO_DB00784"
},
{
"label": "dicloxacillin",
"uri": "http://purl.obolibrary.org/obo/CHEBI_4511"
},
{
"label": "amprenavir",
"uri": "http://purl.obolibrary.org/obo/CHEBI_40050"
},
{
"label": "norethisterone",
"uri": "http://purl.obolibrary.org/obo/CHEBI_7627"
},
{
"label": "avanafil",
"uri": "http://purl.obolibrary.org/obo/CHEBI_66876"
}
]
A simple way to allow these representations would be to add a drugs
block to the requires block in a PML, at the moment we have:
process foo {
task bar {
action baz {
tool { "pills" }
script { "eat the pills" }
agent { "patient" }
requires { quux, "chebi:66876", "dinto:DB00784" }
provides { "a cured patient" }
}
}
}
Which would be replaced by:
process foo {
task bar {
action baz {
tool { "pills" }
script { "eat the pills" }
agent { "patient" }
requires { quux, drugs {"avanafil", "mefenamic acid"} }
provides { "a cured patient" }
}
}
}
Other suggestions are:
"drug:mefenamic acid"
,d"mefenamic acid"
<<mefenamic acid>>
As far as DINTO queries go, the simplest solution that comes to mind is:
/all_drugs
and and builds a label -> uri
hash.dinto:db123/chebi:123
identifiers to send to AsclepiusThe DDIs come back with drug URIs and a DDI label. This creeps into the other issue of how to display the DDIs in the file, and is outside the scope of this issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.