jdrudolph / photon

PHOsphoproteomic dissecTiOn using Networks
GNU General Public License v3.0
17 stars 5 forks source link

Change PPI network #8

Closed linkerst closed 7 years ago

linkerst commented 7 years ago

Hello Jan,

Did I understand it correctly that PHOTON is using the human PPI (see default.py)? If yes, is it possible for the user to change the files specified in default.py, preferably from a Windows machine?

Many Thanks, Stephanie

jdrudolph commented 7 years ago

Currently there is no way to change the network using the web browser based interface. I think with the following 4 steps it could work:

  1. open a powershell and start the container without starting PHOTON. Instead putting you in the bash command line. docker run -it -p 5000:5000 --entrypoint=bash jdrudolph/photon.
  2. open a second powershell to copy your custom network file to the container. Find out the name of the container using docker ps and copy the file by running docker cp awesomeNetwork.txt containerName:/photon/db/awesomeNetwork.txt.
  3. inside the container you can modify the PHOTON code to your liking, e.g. changing the network entry in default.py to point to 'ppi-network' : join(_DB_DIR, 'awesomeNetwork.txt'). Please review the code for loading the network in data/network.py.
  4. Run photon by executing ./run.sh from the /photon directory, and use through the browser as usual.
linkerst commented 7 years ago

Thanks,

It worked! I used the Docker Quickstart Terminal instead of powershell. However, I think it should be docker run -it -p 5000:5000 --entrypoint=bash jdrudolph/photon instead of docker start.

Best, Stephanie

jdrudolph commented 7 years ago

thanks for the correction! I'm never sure if copy+paste is a curse or a blessing...

Spacebio commented 7 years ago

Hello Stephanie (@linkerst),

I would like to know how you managed to upload your PPI network file to the docker container. I tried all I could investigate but I am sure I am missing a very simple little thing.

Thanks! C