-4

I am trying to find a way to download PDB files of proteins using BindingDB. I have a file with different BindingDB IDs, and I want to download PDB files for every ligand that binds to the protein for each ID.

I was using a script to download specific PDB files from RSCB: PDB. Now I have to do the same, but I have BindingDB IDs.

The previous script that I used looks like this:

#! usr/bin/perl -w

open (NDX, 'file.txt');
@ndx_ar = <NDX>;
close NDX;

$ndx_sz = scalar @ndx_ar;

for ( $c = 0; $c < $ndx_sz; ++$c ) {

    chomp $ndx_ar[$c];

    if ( $ndx_ar[$c] =~ /pdb/ ) {
        $ndx_ar[$c] =~ s/.pdb//;
        `wget 'http://www.pdb.org/pdb/download/downloadFile.do?fileFormat=pdb&compression=NO&structureId=$ndx_ar[$c]' -O $ndx_ar[$c].pdb`;
    }
    else {
        `wget 'http://www.pdb.org/pdb/download/downloadFile.do?fileFormat=pdb&compression=NO&structureId=$ndx_ar[$c]' -O $ndx_ar[$c].pdb`;
    }
}

exit;
Borodin
  • 126,100
  • 9
  • 70
  • 144
sergio
  • 31
  • 7
  • 2
    It's becoming unsurprisingly popular to "do programming" by copying some likely-looking existing code from somewhere and posting it on Stack Overflow asking for it to be edited to perform a new function. While you may get the attention of subscribers with little experience who want to add to their points, this is more than a little cheeky. The majority of people who answer questions here are industry professionals who have better things to do with their time than answer "please write my code for me" requests. They are giving their time for free and should be treated with respect. – Borodin Dec 03 '17 at 12:46
  • @Borodin: I really don't know what seems to be a problem. Previously, I had to download PDB files so I searched on the Internet how to do it. Luckily, there was already similar script for it. I have used it and modified it. Now I have to do similar task but I have BindingDB IDs. I was trying to find a way how to do it for few days and I've been also searching on the Internet if somebody did something similar, but couldn't find it . So, obviously I have a question that I don't know how to answer after few days searching and finding the way so I asked here. Did I do something wrong? – sergio Dec 03 '17 at 12:55
  • My plan is really not drawing attention that I am a good programmer or something like this. In fact, I am a biologist. In addition, I am not asking somebody to do this for me. I am just asking for some hint of more experienced programmers. – sergio Dec 03 '17 at 12:59
  • 1
    Suppose you had found a design on the internet that described how to build a bird table. You built it and it's fine. Now you want a conservatory as well. Would you show an international gathering of professional architects your plan for a bird table and ask them for hints on how to make it into a design for a conservatory? – Borodin Dec 03 '17 at 13:05
  • I think this is not good comparison at all. Than this website is full of things like this. I am not looking for someone to do it for me, I am trying to find a way how to do it and by hint I meant if somebody can give me a direction where to search for it. I think You are frustrated for some other reason man. Look at all the questions that are posted on this website and tell me how it differs from mine. I am not expecting anyone to put an effort to do this. there are maybe some people that had same problem and did it before., so maybe they can help me. – sergio Dec 03 '17 at 13:49
  • + nobody asked similar question before and probably someone else as can make a use of it in the future as well. – sergio Dec 03 '17 at 13:50
  • 2
    I think what bothers Borodin is that you are really not asking a programming question. Your program already downloads things from the internet. Your problem is that you don't know where exactly to download what you want. But we can't help you with that. Most of us are professional software developers, like Borodin said. While the task you want to perform is as trivial to us as it is for you to tell an animal from a plant, you cannot do that if you are given neither. What you need is to understand your data source. That website you are talking about. We can't do that for you. – simbabque Dec 03 '17 at 16:33
  • I suggest you take a look at [*How do I ask a good question?*](https://stackoverflow.com/help/how-to-ask) and consider how your question could be improved. – Borodin Dec 03 '17 at 16:39
  • 2
    *"I think this is not good comparison at all"* I think it's an excellent comparison. You got a program from somewhere and fiddled with it until it did something. You have posted it here for the attention of all of us, asking how to write a completely different program. The code you already have is of very little use, and you may as well have left it out. It seems that you want us to research the BindingDB API and tell you what you should write. If you can't at least try *something* then it seems unreasonable for us to work for you. – Borodin Dec 03 '17 at 16:45
  • @simbaque: I don't agree. I think my question is exactly programming question and that it is pretty clear what I am asking. I don't know where did You see that I ask "where" to download the data. I think what bothers Borodin is that he as a professional programmer cannot understand this question since he has no idea what BindingDB is. I think that's what gets him frustrated. Nevermind, thank You alot. I'll find solution on my own and than I'll post it here, because I am sure that some other people may make use of it, since many biologist are working with this database. – sergio Dec 04 '17 at 00:40
  • 3
    @sergio: It isn't a great sign that you've been given the advice of two Perl experts, both with far more experience on this site than yourself, and you're arrogant enough to think you know better than both of us. Finding out how to get the information you need from a web site is *not* a programming question. – Borodin Dec 04 '17 at 05:42
  • Ok. Thanks. Its good that you professionals stick together. Bye bye – sergio Dec 04 '17 at 07:05
  • @sergio: You have asked four questions in the fifteen days you have been a member. Not one of those questions has received a net positive number of votes. Do you really believe that we're all conspiring against you, or do you think that maybe the problem really lies with you? **simbabque** and I have done our very best to help and educate you, but you are simply refusing to learn or even accept that you may be at fault. I can't imagine what sort of assistance would be acceptable to you. – Borodin Dec 04 '17 at 13:28
  • That's totally wrong. First of all, of course I know that problem lies in me and that lack of my programming experience and knowledge is the issue. As I already told you, I am not expecting from somebody to solve this question for me, but just to give me an hint where to look how to download data from the "sublink" of BindingDB website. Only way I can do this is trough programming and that is why I consider this question as a programming question. That is all I asked. – sergio Dec 04 '17 at 14:08
  • Secondly, You appeared to be very frustrated for some reason. If you had given me the comment as @simbaque did at first, I will write this comment way before, but you kept to be arrogant for some reason so I followed your example. – sergio Dec 04 '17 at 14:08

1 Answers1

0

I assume you want to access the PDBBind database?

The welcome page says this

Accessibility. The basic information of each complex in PDBbind is completely open for access (see the [BROWSE] page). Users are required to register under a license agreement in order to utilize the searching functions provided on this web site or to download the contents of PDBbind in bulk. Registration is free of charge to all academic and industrial users. Please go to the [REGISTER] page and follow the instructions to complete registration.

I am no biochemist, but I suspect that you will need to register as the browse facilities are minimal. I can't help you to use the search facilities as I don't understand what it is that you need.

Borodin
  • 126,100
  • 9
  • 70
  • 144
  • No, this is not what I am looking for. This database only provides You with the binding affinity measures for different kind of molecules. The input for PDBBind are PDB IDs that I am actually looking for. I have only BindingDB IDs and Binding data base (DB) is focusing on the interaction between proteins and drug-like small molecules. When I enter Binding DB ID that I have it gives me different ligands that bind to this protein (each protein has 1 BinDB ID). Inside each ligand there is a PDB 'sublink' that opens me all PDB structures of this protein that have co-crystalized ligand. – sergio Dec 03 '17 at 13:22
  • These PDB structures for each ligand and for each BindingDB ID is what I am looking for. I can do it manually but I have nearly 500 IDs. – sergio Dec 03 '17 at 13:26