You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/02/15 14:38:42 UTC
[08/12] airavata-php-gateway git commit: Merge HEAD route
Merge HEAD route
Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/2c64ac00
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/2c64ac00
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/2c64ac00
Branch: refs/heads/dreg-gateway
Commit: 2c64ac007a96233abaa3b6ef1a30fba968a966e2
Parents: 206e8d1 0038011
Author: root <ro...@osboxes>
Authored: Fri Feb 10 04:54:19 2017 +0000
Committer: root <ro...@osboxes>
Committed: Fri Feb 10 04:54:19 2017 +0000
----------------------------------------------------------------------
app/libraries/PartialDownload.php | 174 +++++++++++++++++++++++++++++++++
app/routes.php | 63 ++++++------
2 files changed, 206 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2c64ac00/app/routes.php
----------------------------------------------------------------------
diff --cc app/routes.php
index 4189d13,28f69d1..a9f40be
--- a/app/routes.php
+++ b/app/routes.php
@@@ -176,70 -174,75 +176,72 @@@ include("base32.php")
for($i=1; $i<3; $i++){
$content = $content . ' {
type:"bigwig",
- url:"'.$protocol.'://'. $_SERVER['HTTP_HOST'] .'/gbfile/'.base64_encode($filelist[$i*2]). '",
+ url:"'.$protocol.'://'. $_SERVER['HTTP_HOST'] .'/gbfile/'.base32::encode($filelist[$i*2]). '",
name: "'. $filelist[$i*2-1] .'",
fixedscale:{min:0,max:20},
- colorpositive:"rgb(197,0,11)",
- height:50,
+ colorpositive:"#B30086",
+ colornegative:"#0000e5",
+ height:100,
mode: "show",
},'. "\n" ;
}
- $content = $content . '{
- type:"bedgraph",
- url:"'.$protocol.'://'. $_SERVER['HTTP_HOST'] .'/gbfile/'.base64_encode($folder_path . '/out.dREG.pred.gz').'",
+ $content = $content . '{
+ type:"bedgraph",
+ url:"'.$protocol.'://'. $_SERVER['HTTP_HOST'] .'/gbfile/'.base32::encode($folder_path . '/out.dREG.pred.gz').'",
name: "dREG informative pos.:",
mode: "show",
- colorpositive:"#0000e5/#B30086",
+ colorpositive:"#B30086",
+ colornegative:"#0000e5",
backgroundcolor:"#ffffe5",
height:30,
- fixedscale:{min:0, max:1},
+ #fixedscale:{min:0, max:1},
},'. "\n";
$content = $content . '{
type:"bedgraph",
- url:"'.$protocol.'://'. $_SERVER['HTTP_HOST'] .'/gbfile/'.base64_encode( $folder_path . '/out.dREG.peak.gz').'",
+ url:"'.$protocol.'://'. $_SERVER['HTTP_HOST'] .'/gbfile/'.base32::encode( $folder_path . '/out.dREG.peak.gz').'",
name: "dREG Peak Calling:",
mode: "show",
- colorpositive:"#0000e5/#B30086",
+ colorpositive:"#B30086",
+ colornegative:"#0000e5",
backgroundcolor:"#ffffe5",
height:30,
- fixedscale:{min:0, max:1},
+ #fixedscale:{min:0, max:1},
},'. "\n";
$content = $content . '{
type:"bigwig",
- url:"'.$protocol.'://'. $_SERVER['HTTP_HOST'] .'/gbfile/'.base64_encode( $folder_path . '/out.dREG.HD.imputedDnase.bw').'",
+ url:"'.$protocol.'://'. $_SERVER['HTTP_HOST'] .'/gbfile/'.base32::encode( $folder_path . '/out.dREG.HD.imputedDnase.bw').'",
name: "imputed DNase-I signal:",
- fixedscale:{min:0,max:20},
- colorpositive:"rgb(197,0,11)",
- height:50,
+ #fixedscale:{min:0,max:20},
+ colorpositive:"#00B306",
+ height:100,
mode: "show",
},'. "\n";
- // $content = $content . '{
- // type:"bedgraph",
- // url:"'.$protocol.'://'. $_SERVER['HTTP_HOST'] .'/gbfile/'.base32::encode( $folder_path . '/out.dREG.HD.relaxed.bed').'",
- // name: "dREG.HD relaxed peaks:",
- // mode: "show",
- // colorpositive:"#0000e5/#B30086",
- // backgroundcolor:"#ffffe5",
- // height:30,
- // fixedscale:{min:0, max:1},
- // },'. "\n";
-
- // $content = $content . '{
- // type:"bedgraph",
- // url:"'.$protocol.'://'. $_SERVER['HTTP_HOST'] .'/gbfile/'.base32::encode( $folder_path . '/out.dREG.HD.stringent.bed').'",
- // name: "dREG.HD stringent peaks:",
- // mode: "show",
- // colorpositive:"#0000e5/#B30086",
- // backgroundcolor:"#ffffe5",
- // height:30,
- // fixedscale:{min:0, max:1},
- // },'. "\n";
+ $content = $content . '{
+ type:"bedgraph",
- url:"'.$protocol.'://'. $_SERVER['HTTP_HOST'] .'/gbfile/'.base64_encode( $folder_path . '/out.dREG.HD.relaxed.bed').'",
++ url:"'.$protocol.'://'. $_SERVER['HTTP_HOST'] .'/gbfile/'.base32::encode( $folder_path . '/out.dREG.HD.relaxed.bed').'",
+ name: "dREG.HD relaxed peaks:",
+ mode: "show",
- colorpositive:"#B30086",
- colornegative:"#0000e5",
++ colorpositive:"#0000e5/#B30086",
+ backgroundcolor:"#ffffe5",
+ height:30,
+ fixedscale:{min:0, max:1},
+ },'. "\n";
+ $content = $content . '{
- type:"bedgraph",
- url:"'.$protocol.'://'. $_SERVER['HTTP_HOST'] .'/gbfile/'.base64_encode( $folder_path . '/out.dREG.HD.stringent.bed').'",
++ type:"bedgraph",
++ url:"'.$protocol.'://'. $_SERVER['HTTP_HOST'] .'/gbfile/'.base32::encode( $folder_path . '/out.dREG.HD.stringent.bed').'",
+ name: "dREG.HD stringent peaks:",
+ mode: "show",
- colorpositive:"#B30086",
- colornegative:"#0000e5",
++ colorpositive:"#0000e5/#B30086",
+ backgroundcolor:"#ffffe5",
+ height:30,
+ fixedscale:{min:0, max:1},
+ },'. "\n";
-
$content = $content . ']';
return Response::make($content, 200)
@@@ -262,22 -263,14 +264,21 @@@ include("base32.php")
$downloadLink = Config::get('pga_config.airavata')['experiment-data-absolute-path'] . '/' . $file;
if ( !file_exists($downloadLink) )
- return Response::make('', 404);
+ return Response::make('', 204);
else
{
- include 'libraries/PartialDownload.php';
- return byteserve( $downloadLink);
+ if ($_SERVER["REQUEST_METHOD"]=="GET")
+ {
+ include 'libraries/PartialDownload.php';
+ return byteserve( $downloadLink);
+ }
+ else
+ return Response::make("", 200)
+ ->header('Content-Length', filesize($downloadLink));
}
-
});
+
// dREG
/*