Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - ansherina

Pages: [1]
1
General PHP Help / Re: help on self-updating database
« on: February 21, 2012, 07:23:10 AM »
PHP Code: [Select]

require("WebGet.php");
$taxon $_GET[0];
$agent = new WebGet();
$agent->useCache true;
$agent->cacheLocation '';
$agent->cookieFile 'cookie.txt';


$query "http://www.uniprot.org/uniprot/?query=organism:$taxon&format=fasta&include=yes";
$file $taxon '.fasta';

$agent->requestContent($query);

if(
$agent->responseStatusCode==200){
    
$results $agent->responseHeaders[strtoupper('X-Total-Results')];
    
$release $agent->responseHeaders[strtoupper('X-UniProt-Release')];
    
$date date("Y-m-d"strtotime($agent->responseHeaders[strtoupper('Last-Modified')]));
    print 
"Downloaded $results entries of UniProt release $release ($date) to file $file\n";
// 304 Not Modified
elseif($agent->responseStatusCode==304){
    print 
"Data for taxon $taxon is up-to-date.\n";
}else{
    die (
'Failed, got ' $agent->responseStatusLine .
    
" for uniprot/?query=organism:$taxon&format=fasta&include=yes\n");
}


i have this file which enables to download all UniProt sequences for a given organism in FASTA format once per release, but still doesn't work... and it has the following error :
Quote
Notice: Undefined offset: 0
Quote
Failed, got for uniprot/?query=organism:&format=fasta&include=yes

can you help me with this?

this the webget class ->   https://github.com/shiplu/dxtool/blob/master/WebGet.php


2
General PHP Help / Re: help on self-updating database
« on: February 19, 2012, 10:40:55 AM »
thank you so much

3
General PHP Help / Re: help on self-updating database
« on: February 19, 2012, 09:48:31 AM »
yes. that page of data i wanted to put in my database..
actually all of the entries on it, and I wanted that when you click an entry on that page which results to this link http://www.uniprot.org/uniprot/?query=annotation%3A%28type%3Asignal+confidence%3Aexperimental%29+reviewed%3Ayes&sort=score
will also be on my database, not exactly that format but a text format of the entry...

so, how do i start this one?

4
General PHP Help / Re: help on self-updating database
« on: February 19, 2012, 08:23:51 AM »
I don't get the the link on http://www.uniprot.org/help/mapping...

So, you mean that I should ask/contact them on how to retrieve their data in order to insert into my database?
 I have already have the entries of my interest and this is on this link http://www.uniprot.org/uniprot/?query=annotation%3A%28type%3Asignal+confidence%3Aexperimental%29+reviewed%3Ayes&sort=score



5
General PHP Help / Re: help on self-updating database
« on: February 18, 2012, 12:50:30 PM »
I did not create that database. it is a  freely accessible resource of protein sequence and functional information.
those entries (sequences) are my interest...

how could I go over or what will i do to pull the entries in uniprot and store it to my database with no longer uploading the entries?
... because if upload one by one and there are about thousands of entries, then it will be hard for me

6
General PHP Help / Re: help on self-updating database
« on: February 18, 2012, 12:32:42 PM »

Sorry for that, let me state it clearer...

I have a database and wanted to have access on the data in another online database (UniProt - http://www.uniprot.org/ ) in which whenever there is a new release of entries in that said database, it would automatically show and store into my database, meaning there will be no more file uploading. Also notification will be shown in my database that a new release of entries are present.

for example,
when there are about 100 entries released, it will automatically store into my database so that there is no need for me to upload one by one all the entries. in my database, it will auto-increment

does it have something to do with a task scheduler? windows is my operating system. do you have some simple samples on this or links so that I would be able to work on it? thanks

7
General PHP Help / help on self-updating database
« on: February 18, 2012, 06:21:24 AM »
what steps and functions should I used where I wanted to make a database and wanted to have access on the data in an online database (UniProt) in which whenever there is a new release of entries, it would automatically show and store into my database...  there is no more file uploading and a notification will be shown in my database that a new release of entries are present

8
General PHP Help / Re: self-updating database
« on: February 17, 2012, 06:03:28 AM »
can it support windows OS?

9
General PHP Help / self-updating database
« on: February 17, 2012, 03:51:39 AM »

I have a problem...

I am making a database and wanted to have an access to another online database, so if there is a new release of data in that database, it would automatically store to my database... what should i do?

pls. help. tnx much

Pages: [1]