Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added NucContent plugin #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Added NucContent plugin #4

wants to merge 2 commits into from

Conversation

jjrozewicki
Copy link

I modified the the plugins.json to add my plugin (along with a screenshot) per the request from Robert Buels via e-mail.

@cmdcolin
Copy link
Contributor

cmdcolin commented Jul 6, 2021

Nice work! This is so cool. I will try to check this out soon and we can merge

@cmdcolin
Copy link
Contributor

I tried adding this plugin in a config and got an error

{
  "configuration": {},
  "plugins": [
    {
      "name": "NucContent",
      "url": "https://unpkg.com/browse/jbrowse2-plugin-nuccontent/dist/jbrowsepluginnuccontent.umd.production.min.js"
    },
    {
      "name": "Biothings",
      "url": "https://unpkg.com/jbrowse-plugin-biothings@^1/dist/jbrowse-plugin-biothings.umd.production.min.js"
    },
    {
      "name": "GDC",
      "url": "https://unpkg.com/jbrowse-plugin-gdc@^1/dist/jbrowse-plugin-gdc.umd.production.min.js"
    },
    {
      "name": "UCSC",
      "url": "https://unpkg.com/jbrowse-plugin-ucsc@^1/dist/jbrowse-plugin-ucsc.umd.production.min.js"
    }
  ],

Error: plugin NucContent failed to load, Window.JBrowsePluginNucContent is undefined

@garrettjstevens @jjrozewicki any idea why that might be? sorry for the slow review process here also. we should probably make a better process for contributions to get added

@garrettjstevens
Copy link

I think the URL might be wrong, that URL has /browse/ in it, which directs you to a page where you can browse the file contents in a UI. The direct link to the plugin is: https://unpkg.com/[email protected]/dist/jbrowsepluginnuccontent.umd.production.min.js

@cmdcolin
Copy link
Contributor

good point. we could probably make the URL to https://unpkg.com/jbrowse2-plugin-nuccontent/dist/jbrowsepluginnuccontent.umd.production.min.js

we could consider pinning the version at 1.0.9 but sometimes is nice to get the latest and that is what is used by other plugins...could also consider GMOD/jbrowse-components#2158

@jjrozewicki
Copy link
Author

I fixed the documentation to use the proper URL for the latest version, bumped the version number, and published a new npm pacakage. I apologize for the confusion.

@jjrozewicki
Copy link
Author

I've fixed the url in the plugins.json in my branch.

@cmdcolin
Copy link
Contributor

I apologize for the super long delay in getting to this. If still interested in merging let me know. I tried adding this to a sample browser with

{
      "name": "NucContent",

      "url": "https://unpkg.com/jbrowse2-plugin-nuccontent/dist/jbrowsepluginnuccontent.umd.production.min.js"
    }

hardcoded in a config.json but it says
Screenshot from 2022-01-14 12-12-03

@jjrozewicki
Copy link
Author

jjrozewicki commented Jan 17, 2022 via email

@cmdcolin
Copy link
Contributor

cmdcolin commented Jan 20, 2022

I was still seeing the same error with the latest update...not sure. I remember seeing this type of error at one point with our other code, do you happen to recall what this is related to @garrettjstevens ? it seems like maybe a babel compile level or something like that

@garrettjstevens
Copy link

That error usually means there was some error thrown when running the plugin code, but unfortunately doesn't give access to the real error that happened.

I looked at the plugin itself, and I'm not sure where the problem would be. It could be worth using jbrowse-plugin-template to update the plugin's build system to the latest recommended way.

@jjrozewicki
Copy link
Author

jjrozewicki commented Jan 21, 2022 via email

@garrettjstevens
Copy link

I wasn't able to get the production or development versions to work. I then realized, though, that I mistook this error for another one in my comment above (I was actually thinking about the error TypeError: P is not a constructor, which doesn't usually say anything helpful).

That led me to realize that it was indeed a babel error. @jjrozewicki, I've proposed a solution to you here: jjrozewicki/jbrowse2-plugin-nuccontent#1

@jjrozewicki
Copy link
Author

jjrozewicki commented Jan 28, 2022 via email

@garrettjstevens
Copy link

I was able to test this out now, and the adapter/display seem to be working great. I was wondering, what's the process for a user to add a NucContent track? We'd like users to be able to add these things from the UI. For example, they might not have control over their config file and need to add this as a session track. Maybe a top-level menu item or a Linear Genome View menu item to add a NucContent track for a certain assembly would be good.

@jjrozewicki
Copy link
Author

jjrozewicki commented Feb 10, 2022 via email

@garrettjstevens
Copy link

I think you likely need to add to our Core-guessAdapterForLocation extension point. You can see an internal plugin example in the Wiggle plugin here: https://github.com/GMOD/jbrowse-components/blob/main/plugins/wiggle/src/index.ts or the external GDC plugin here: https://github.com/GMOD/jbrowse-plugin-gdc/blob/master/src/index.ts.

@jjrozewicki
Copy link
Author

jjrozewicki commented Feb 15, 2022 via email

@garrettjstevens
Copy link

You can see an example of adding a menu item here: https://github.com/GMOD/jbrowse-plugin-gdc/blob/76e5874740140539ff5b65717027026490986985/src/index.ts#L429-L439

You can also read about the format of menu items here, and the various methods for adding and modifying menu items here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants