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

#gffTags handling in .bed files in igv.js arguably ought to comport with that of IGV desktop #1550

Open
malcook opened this issue Oct 6, 2022 · 10 comments

Comments

@malcook
Copy link

malcook commented Oct 6, 2022

In IGV desktop it is documented that "GFF3-style attributes (in) the Name field (column 4) of a BED file ... are displayed in the popup text. " and "The GFF Name property will become the display name of the feature" when using the #gffTags directive.

Consistent with the this, if there is no Name attribute, the display name of the feature is blank.

In my hands, in igv.js with or without a #gffTags, the popup text is taken from column 4.

This seems reasonable to me, except, there appears to be no control over the display name of the feature.

It would be good if IGV and igv.js agreed in their handling of gffTags, so that the same .bed files can be used to similar effect in both platforms.

I tried as a workaround loading the track with nameField: null and nameField: 'IGNORE' and nameField: 0 but none had the desired effect of suppressing a display name.

FWIW: I also find that the overall length of the GFF3 encoded attributes is limited in igv.js as compared to IGV desktop.

@duartemolha
Copy link

This issue seems to not have been actioned. I my hands the #gffTags seem to have no effect whatsoever in the igv.js

It is a case that it is simply not supported?

@jrobinso
Copy link
Contributor

@duartemolha yes that's correct. Unfortunately I'm not made of time, a PR for this would be welcome.

@duartemolha
Copy link

duartemolha commented Jan 20, 2025 via email

@jrobinso
Copy link
Contributor

@duartemolha Oh I didn't, just confirming its not done. Unfortunately there are lots of small issues in competition with larger ones, in this project as well as IGV desktop. This would be a good project for a PR.

@duartemolha
Copy link

Honestly I would not even know where to start. Just currious... is there a document explaning the organisation of the code that could help someone willing to help to try to help?

@jrobinso
Copy link
Contributor

jrobinso commented Jan 21, 2025

Sure, I'm willing to help. This would be done in js/feature/decode/ucsc.js, specifically the function "decodeBed". Surprisingly there is a variable in that function called "gffTags", but its not used. There's also some code that tries to detect the presence of gff style syntax and parse it as such if found, irrespective of a "gffTag" value. So some start has been made, perhaps it never worked or there has been some regression.

@jrobinso
Copy link
Contributor

@duartemolha Actually I think I mispoke, I don't recall implementing this but it seems to be at least partially working for the following

#gffTags
track name="chr1" description="chr1 Annotations" itemRgb="On"
chr1	1088	1128	Key1=INS230;Key2=Foo	0	+	1088	1088	65,105,225
chr1	133	2809	Key2=Bar;Key1=terminator	0	+	133	133	65,105,225
chr1	1301	1746	Key1=M13 origin;Key2=Baz	0	+	1301	1301	65,105,225
chr1	1301	1746	Key1=M13 origin;Key2=Baz	0	+	1301	1301	65,105,225

There is a bug in that the name string is displayed, but the attributes are parsed and appear in popup text

Image

Could you describe in more detail the issue you are encountering? Is it just that column 4 is displayed as the feature name, or is there more to it?

jrobinso added a commit that referenced this issue Jan 23, 2025
@duartemolha
Copy link

duartemolha commented Jan 25, 2025 via email

@jrobinso
Copy link
Contributor

OK, that will be fixed in the next release.

@duartemolha
Copy link

duartemolha commented Jan 28, 2025 via email

jrobinso added a commit that referenced this issue Jan 29, 2025
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

No branches or pull requests

3 participants