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

Chromosome switching behaviour for contigs with `:` in their name #1118

Closed
nathanhaigh opened this Issue Jul 13, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@nathanhaigh
Copy link
Contributor

nathanhaigh commented Jul 13, 2018

Commits 92f4be5 and 23bd665 added support for contigs with : as part of their name. This has arisen in the wild with the introduction of contig HLA-A*01:01:01:01 in the human genome assembly, hg38. In addition, sequence extracted from a longer sequence also contain : (e.g. samtools faidx ref.fasta ctgA:400-500 > subseq.fasta will result in a sequence called ctgA:400-500).

Normal JBrowser behaviour for switching to another sequence can be achieved by typing the full contig name into the location bar. However, if the target sequence contains a : in its name entering just the sequence name alone (e.g. HLA-A*01:01:01:01 or ctgA:400-500) is not sufficient to switch to that sequence. Instead, either a specific point location (e.g. HLA-A*01:01:01:01:350 or ctgA:400-500:40) or a range (e.g. HLA-A*01:01:01:01:350-600 or ctgA:400-500:40-60) must be used to switch to those sequences.

To overcome this issue, parseLocString would probably need to perform a lookup of seq names before deciding what the return value should be.

Some test data for this behaviour is in tests/data/obscure_contig_names/.

@rbuels rbuels added the bug label Jul 13, 2018

@rbuels

This comment has been minimized.

Copy link
Collaborator

rbuels commented Jul 13, 2018

seems to me rather than making parselocstring asynchronous, jbrowse should just always check first if a string that was typed into the box is actually a reference sequence, and then go on to try seeing if it's a locstring, or a name of something

@rbuels rbuels added this to the 1.15.1 milestone Jul 13, 2018

@rbuels

This comment has been minimized.

Copy link
Collaborator

rbuels commented Jul 13, 2018

setting high priority because we kind of need this for good support of human data

@nathanhaigh

This comment has been minimized.

Copy link
Contributor Author

nathanhaigh commented Jul 13, 2018

That would work @rbuels

@rbuels rbuels added the has pullreq label Jul 13, 2018

@rbuels rbuels modified the milestones: 1.15.1, 1.15.0 Jul 14, 2018

@rbuels rbuels closed this in #1119 Jul 14, 2018

rbuels added a commit that referenced this issue Jul 14, 2018

Merge pull request #1119 from CroBiAd/fix_obscure_ref_seq_nav_behaviour
Do ref seq lookup before loc string parsing. fixes #1118
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.