SEQanswers

SEQanswers (http://seqanswers.com/forums/index.php)
-   Bioinformatics (http://seqanswers.com/forums/forumdisplay.php?f=18)
-   -   cravat.us web services, unable to understand what to do (http://seqanswers.com/forums/showthread.php?t=42930)

dokadya 04-29-2014 11:41 PM

cravat.us web services, unable to understand what to do
 
I am following this website to get help regarding connection to cravat.us

with this website I have to connect so that I can submit job without opening my browser. in this website I am looking for web services section.

http://www.cravat.us/help.jsp?chapte..._cite&article=





See the Image to understand the instructions :

https://drive.google.com/file/d/0B6D...it?usp=sharing
https://drive.google.com/file/d/0B6D...it?usp=sharing


They said create JSON object and all, I have create JSON object:

{
"analysis": "CHASM",
"analysistype" : "driver",
"chasmclassifier" : "Head and Neck",
"email" : "dokadya@gmail.com"
"functionalannotation" : "on",
"hg18" : "off",
"inputfile" : "/media/storage1/SAMPLE_NAME_1.cravat",
"mupitinput" : "on",
"tsvreport" : "on"
}



How can i upload file ? Can I use just path to upload ?

What kind of script I have to write ? HTML form? PERL ?



See the link for my perl file:

https://drive.google.com/file/d/0B6D...it?usp=sharing



Like this I have created file but its not working. Please guide me.



Waiting for positive reply.

Thank You.

Chetan

dokadya 04-29-2014 11:42 PM

this is same question as explained in biostars.org
https://www.biostars.org/p/99365/

slcrick 05-01-2014 08:09 AM

Hi, this is Rick from In Silico Solutions, which maintains CRAVAT. Please see the following examples in Perl:

use LWP;
use URI;

my $browser = LWP::UserAgent->new();

#
# Job submission example, when the mutations are in a string
#
print "\n###### Submitting through GET #####\n";
my $urlSubmitGet = URI->new("http://www.cravat.us/rest/service/submit");
$urlSubmitGet->query_form(
'analyses' => 'CHASM',
'analysistype' => 'driver',
'chasmclassifier' => 'Ovary',
'email' => 'testUser@testemailservice.com',
'functionalannotation' => 'off',
'hg18' => 'off',
'mutations' => 'TR1 chr22 30421786 + A T',
'mupitinput' => 'off',
'tsvreport' => 'off');
my $responseSubmitGet = $browser->get($urlSubmitGet);
print $responseSubmitGet->content, "\n";

#
# Job submission example, when the mutations are in a file
#
print "\n###### Submitting through POST #####\n";
my $urlSubmitPost = "http://www.cravat.us/rest/service/submit";
my $responseSubmitPost = $browser->post($urlSubmitPost,
Content_Type => 'form-data',
Content => [
'analyses' => 'CHASM',
'analysistype' => 'driver',
'chasmclassifier' => 'Ovary',
'email' => 'testUser@testemailservice.com',
'functionalannotation' => 'off',
'hg18' => 'off',
'mupitinput' => 'off',
'tsvreport' => 'off',
'inputfile' => ['/home/testUser/mutations.txt']]);
print $responseSubmitPost->content, "\n";

#
# Job status checking example
#
print "##### Job Status Checking #####\n";
my $urlStatus = URI->new('http://www.cravat.us/rest/service/status');
$urlStatus->query_form('jobid' => 'testUser_20140430_110005');
my $responseStatus = $browser->get($urlStatus);
print $responseStatus->content, "\n";


Hope this helps and if you have any question, please let me know.


All times are GMT -8. The time now is 09:37 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.