GREP: Genome for REPositioning drugs
Entering edit mode
4 months ago
ryme ▴ 20


I am new to python and I am trying to run the code of the GREP library to find the drugs that target my genes. The input file is a list of gene (txt file). I tried to run it many times but no luck. Could anyone help me with it please? I am having trouble reading the input file. If you can provide me with an example on how to use it in colab or terminal, I mean what do I have to change in order to make it take my txt file as an input file. Sorry for that but I just started learning python and I need this library for one of my projects. It is really urgent.

I would really appreciate your help. I am really in need to use this library. Thank you!

Drug GREP Python • 331 views
Entering edit mode
4 months ago
Wayne ★ 1.1k

Click here to launch an active demonstration notebook in your browser served via Everything will already be installed and ready to run once the session spins up. After the session spins up, you can read along with the content and step through running the code cells with Shift-Enter. Alternatively, you can use Cell > Run All from the toolbar menu.

The demonstration shows using a provided example gene list and then making a couple custom gene lists to run the script.

I should caution these are temporary sessions. If you make anything useful, download it to your local machine. You can click the Jupyter logo in the upper right to get to an interface where you can see the files listed, and use right-click to download them from the list.

You can see a static version of the demonstration notebook already run here.

I added some of this advice in the demonstration notebook; however, I'll reiterate it here so that it may benefit others with similar issues.
Some of this is speculation because you don't provide examples of specifically what you see when you try to read your input files. "I am having trouble reading the input file," is overly general and not informative. Sharing specific details would be advisable in the future because different errors will rule out certain things. For example, a path error issue looks much different than the program not handling well the content of your input file.

Thankfully the documentation of the software is pretty clear about what is needed. The input file needed is a list of human genes with one gene name on each line. If you are actually pointing at the right file with what you think is the right contents and having problems, I would wonder if your text file is actually not what you suspect? For example, a lot of novices don't realize you cannot use Microsoft Word or even Microsoft Wordpad to make such input files (or write Python). You need an actual devoted text editor to make these. You need something like Sublime Text, Atom, Notepad or VScode (Visual Studio Code). That last one is the only Microsoft product you should use for bioinformatics-style efforts or coding, if you insist on using Microsoft-produced items. (Advising novices in this aspect of things used to be easier because you could just say avoid Microsoft products; however, VScode (Visual Studio Code) has dramatically changed the landscape in just the last couple of years with that particular Microsoft product now being a top-tier choice.) You should be able to upload your input file to the demonstration after clicking the Jupyter logo in the upper left and then dragging in your file from your local system into the file navigation panel on the left. You can then click on the uploaded file and open it in the session to make sure it looks as expected or use the methods I show in the notebook. (Use !cat in place of head to show all of the file and not just first 10 lines).

The other issue that could be in play may be that the HUGO gene names in the database may not match the current HUGO gene names. I know in 2020 that at least 27 gene names changed, see here The software you referenced hasn't been updated in several years. This phenomena is common as pointed out here:

"And even if you get a useful database or web application up and running (and published), there is little incentive to update or improve it, and it is usually left to bitrot, while the authors go off in search of the next publication."

That type of stagnation can often cause a part of the approach to get out of sync with current conventions and inadvertently break things in a way that is more subtle, and thus harder to troubleshoot.

Entering edit mode

Thousands Thanks!!! I do really appreciate this! Thank you Wayne!!


Login before adding your answer.

Traffic: 1473 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6