Entering edit mode
4.9 years ago
sharmatina189059
▴
110
<script type="text/javascript">
function getseq(t){
document.getElementById('SEQUENCE').value = "";
var myVal;
myVal = document.getElementById('SEQUENCE').value;
myVal += ''+ t;
document.getElementById('SEQUENCE').value = myVal;
}
function paste_examplep()
{
document.myForm.seq.value = "cgdvdghcvdhbcvdghcvdshbcvhdcv";
}
function validateform()
{
var y=document.forms["myForm"]["seq"].value;
if(y==null||y=="")
{
alert("Sequence must be filled out");
return false;
}
}
</script>
Can anybody let me know to to output the blast result on a webpage ? I have written a php code like
<?php $seq = $_POST["seq"];?>
<?php $uploadedfile = $_POST["uploadedfile"];?>
<!--?php $blstyp = $_POST["blstyp"];?>
<?php $expect = $_POST["expect"];?>
<?php $matrix = $_POST["word"];?>
<?php $agnst = $_POST["seg"];?>
<?php $agnst = $_POST["biasness"];?>
<?php
////////////BOF--file upload script//////////////
$seq1= $_POST["uploadedfile"];
$target_path = "Path/to/database";
$myFile = "$target_path";
$fh = fopen($myFile, 'r');
$theData = fread($fh, 99999999);
fclose($fh);
$seq_browze = $theData;
#echo $seq_browze; ?>
<?php
#*********************Parsing of input sequenc*************
exec("mkdir $dir");
exec("chmod 777 $dir");
#print"$dir";
if($seq != "")
{
$seqfi=$seq;
}
else
{
$seqfi=$seq_browze;
}
#$FP1=fopen("$dir/input_user","w");
$FP1=fopen("protein_file","w");
fwrite($FP1,">seq\n");
fwrite($FP1,$seqfi);
#print "RAN:$ran";
fclose($FP1);
if ($jobtitle == "") {
$jobtitle="RESULT-YEAR PREDICTION FROM SFEPRED SERVER JOB-$ran";}
#shell_exec("/usr1/webserver/cgibin/ccdb/blast/blastall -p blastp -M $matrix -T -d /usr1/webserver/cgidocs/raghava/cppsite/cpp_db/cppsite2 -e $expect -i $dir/input_user -F F -o $dir/outputfile.html");
shell_exec(".path/ncbi-blast-2.10.0+/bin -p blastp $matrix -T -db ./path/ncbi-blast-2.10.0+/bin/protein_file -e $expect -query .path/ncbi-blast-2.10.0+/bin/query -out outputfile.html");
?>
<?php include("$dir/outputfile.html"); ?>
But it gives Undefined index: uploadedfile
Why not use sequenceserver, which is open source, free, and works well?
I need to align with customised dataset that's why writing my own code.
That's not a good reason, you can add any number of custom blast databases in sequenceserver (our local instance has about 100 custom databases).
Ok..M trying.. thank you so much for replying!!