GMOD / Apollo

Genome annotation editor with a Java Server backend and a Javascript client that runs in a web browser as a JBrowse plugin.
http://genomearchitect.readthedocs.io/
Other
128 stars 85 forks source link

404 errors on CSV metadata #1448

Closed nathandunn closed 7 years ago

nathandunn commented 7 years ago

====

Getting a 404 on this:

http://XXX:8080/apollo/17243046418848101441634387168/jbrowse/data/Pmar_v11/includes/pmar_metadata.csv 404 (Not Found)

From metadata loaded this way:

http://gmod.org/wiki/JBrowse_Configuration_Guide#Loading_Track_Metadata_from_Files

Are you seeing any 404 (or other errors) in your network console (or in the tomcat logs)? I’m wondering if its just misrouting the CSV data (I hope). If so, it should be a pretty easy fix.

On Jan 20, 2017, at 12:46 PM, Sofia Robb sofia@sofiarobb.com wrote:

Hello!

I currently have JBrowse and Apollo running separately. From within my Apollo dir I point to my JBrowse data dir. I am using a csv file for my metadata for JBrowse, and It works great with JBrowse, but my metadata does not show up in my JBrowse like track selector within Apollo.

How can I make this work with apollo?

nathandunn commented 7 years ago

Should just be a matter of adding .csv to the other file-types for pass-through and caching.

Shouldn't be too hard to fix or cache.

nathandunn commented 7 years ago

So, the problem here is that we want to use an identical csv include for both JBrowse and Apollo.

The include URL looks like this:

          { "type": "csv", "url":  "data/Nvec_v10/includes/metadata.csv" }

I can usually get one or the other to work, but we really want a single trackList.json for all of them.

nathandunn commented 7 years ago

It seems to work, but getting the JBrowse and the Apollo URL to sync is a bit difficult.

nathandunn commented 7 years ago

Getting:

INFO: GroovyPagesServlet:  "/WEB-INF/grails-app/views/jbrowse/data.gsp" not found

Organism directory:

/var/other_data/jbrowse/data/Nvec_v10/

JBrowse link is:

https://XXX/jbrowse/?data=data/Nvec_v10

The 404 in Apollo:

GET http://XXX:8080/apollo/17243046418848101441634387168/jbrowse/data/Pmar_v11/includes/pmar_metadata.csv 404 (Not Found)

and the trackList.json is (which works for JBrowse and should work for Apollo):

{ "type": "csv", "url":  "data/Nvec_v10/includes/metadata.csv" }

FYI @srobb1

nathandunn commented 7 years ago

So I defined a similar case to reproduce. Created the root directory:

/opt/apollo/ 

Yeast is:

/opt/apollo/yeast

and the include is:

/opt/apollo/yeast/include/myTrackData.csv

In JBrowse I do a symlink:

ln -s /opt/apollo/ data

This works for JBrowse (http://localhost/jbrowse/?data=data%2Fyeast) localhost and fails for Apollo:

{ "type": "csv", "url":  "data/yeast/include/myTrackData.csv" }

This works for Apollo and fails for JBrowse:

{ "type": "csv", "url":  "data/include/myTrackData.csv" }

The problem is that this include should be exploded to be data/yeast instead of data if the initial is not found as data is a keyword in JBrowse / Apollo.

nathandunn commented 7 years ago

It fails because it replaces "data" with the proper absolute path. In this case we're provided with the proper path, which includes data.

params.path: yeast/include/myTrackMetaData.csv directory /opt/apollo/yeast/

File not found: /opt/apollo/yeast//yeast/include/myTrackMetaData.csv

Should be:

 /opt/apollo/yeast/include/myTrackMetadata.csv

Fix should be if not found and start and end are the same, just remove the prefix of the second one.

nathandunn commented 7 years ago

This should be working (on branch) using an include:

   { "type": "csv", "url":  "data/yeast/include/myTrackMetaData.csv" }

If the file is not found and it detects an overlap, it automatically merges it.