Skip to content

Commit

Permalink
Add empty tracks.conf to datasets endpoint for external JBrowse support
Browse files Browse the repository at this point in the history
  • Loading branch information
njbooher committed Aug 30, 2016
1 parent feb12b9 commit 104504b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tripal_jbrowse_api.module
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ function tripal_jbrowse_api_menu() {
'delivery callback' => 'tripal_jbrowse_api_json_output',
);

$items['api/jbrowse/tracks.conf'] = array(
'page arguments' => array('tripal_jbrowse_api_callback_null'),
) + $base;

$items['api/jbrowse/trackList.json'] = array(
'page arguments' => array('tripal_jbrowse_api_callback_datasets'),
) + $base;
Expand All @@ -44,7 +48,7 @@ function tripal_jbrowse_api_menu() {
) + $base;

$items['api/jbrowse/%tripal_jbrowse_api_organism/tracks.conf'] = array(
'page arguments' => array('tripal_jbrowse_api_callback_tracks', 2),
'page arguments' => array('tripal_jbrowse_api_callback_null'),
) + $base;

$items['api/jbrowse/%tripal_jbrowse_api_organism/trackList.json'] = array(
Expand Down Expand Up @@ -118,6 +122,10 @@ function tripal_jbrowse_api_organism_load($organism_common_name) {
return chado_query(TRIPAL_JBROWSE_API_QUERY_ORGANISM_BY_COMMON_NAME, array(':organism_common_name' => $organism_common_name))->fetchObject();
}

function tripal_jbrowse_api_callback_null() {
return NULL;
}

function tripal_jbrowse_api_callback_datasets() {

$results = chado_query(TRIPAL_JBROWSE_API_QUERY_ALL_ORGANISMS)->fetchAll(PDO::FETCH_ASSOC);
Expand Down Expand Up @@ -171,10 +179,6 @@ function tripal_jbrowse_api_callback_stats($organism) {
return array('featureDensity' => 0.01);
}

function tripal_jbrowse_api_callback_tracks($organism) {
return NULL;
}

function tripal_jbrowse_api_callback_tracklist($organism) {

$refseqs_tracks = array();
Expand Down

0 comments on commit 104504b

Please sign in to comment.