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

Error when running jbrowse text-index #2349

Closed
scottcain opened this issue Sep 22, 2021 · 4 comments
Closed

Error when running jbrowse text-index #2349

scottcain opened this issue Sep 22, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@scottcain
Copy link
Member

config.txt

When running jbrowse text-index I get this output:

 TypeError: Cannot read property 'type' of undefined

I tried adding a variety of flags, like --dryrun and --target . and --target ./config.json to no avail.

The mostly cause of this problem is my config.json, which does work correctly for JBrowse 2, but may not be quite what this tool is expecting, as it's a combination of hand editing and automatically being generated from the jb1tojb2 script I'm working on. I've attached that config at the top of this issue (with the extension changed to txt so I could upload it). If it helps, this JBrowse 2 is running on a machine at http://18.206.115.254/ however, that may go away at some point.

Another potential point of failure is that the data files are remote; if that's not supported, the documentation should state that explicitly.

Expected behavior

Successfully indexing the data.

Screenshots

Version:

JBrowse 2 version 1.4.4: @jbrowse/cli/1.4.4 linux-x64 node-v14.16.0

Additional context

@scottcain scottcain added the bug Something isn't working label Sep 22, 2021
@cmdcolin
Copy link
Collaborator

the issue is the unsupported tracks that lack an adapter. currently assumes all tracks have an adapter in the text-index code,

one line fix

diff --git a/products/jbrowse-cli/src/commands/text-index.ts b/products/jbr>
index cb4170a37..356ffe1c0 100644
--- a/products/jbrowse-cli/src/commands/text-index.ts
+++ b/products/jbrowse-cli/src/commands/text-index.ts
@@ -406,7 +406,7 @@ export default class TextIndex extends JBrowseCommand {
         }
         return currentTrack
       })
-      .filter(track => supported(track.adapter.type))
+      .filter(track => supported(track.adapter?.type))
       .filter(track =>
         assemblyName ? track.assemblyNames.in

@cmdcolin
Copy link
Collaborator

i'd suggest going through your config.json and removing the tracks that say "UNSUPPORTED" for now, but we will probably deploy a fix so at least it doesn't crash in the future

@cmdcolin
Copy link
Collaborator

sorry for the quick close, just pushed a fix with the commit message about the fix. let me know if there's anything else that we can help with

@scottcain
Copy link
Member Author

Apologizing for a quick close: funny :-)

I'll update the jb1tojb2 tools to place unsupported adapter tracks into a separate top level spot config json so it can travel along with the config but not cause problems. I'm thinking "unsupported":[]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants