Updated DNA gramplet ready for review

You have to uncomment the lines for the values to be accepted. (Delete the 2 semi-colons at the beginning of the line.)

Gramps also needs to NOT be running when you commit manually-edited changes to the .ini file. Otherwise, the file will be overwritten when Gramps is shut down.

This is the first time I have coded config, so maybe I got something wrong.

If the line is commented and changed, it will revert
If the line is removed, it will revert
If the line is uncommented and changed, it will stay

I re-init all the settings in lines 57-65. This is where the defaults are stored.
These are never changed inside the gramplet - but I do save them (line 227) to be sure that the .ini file gets created.

I can put a border on the single chromosome view if that makes things look better. The single chromosome view is scaled to the full length of that specific chromosome, so all are basically full width. THe tick marks are every 50M for a reference.

1 Like

Maybe it can scale the graph width to 95% of the gramplet’s width? That would ensure there is always padding to clearly define the extent of the bars.

By the way, 5px in the offset configuration for the shared graph works very nicely to align Swatches with text baselines on my PC. (Thank you!) But the new offset for the single Chromosome graph seems to move the entire legend … which is actually helpful too. (The Legend generally needs to be lower to avoid being overrun by the 100% width horizontal bars.) But the swatches need a separate alignment offset.

I found it helpful to detach/undock the Gramplet. That Single & Shared switching refresh of the floating Gramplet can still be forced by activating a different gramplet in the sidebar.

It is relatively difficult to manage which set of Persons whose Matches should show in the Shared Graph.

Currently, I reorder DNA Associations in the Edit Person Associations tab to change the ordering in the Legend. That works well enough.

But if I want to disable certain matches, I have to Change their Association description from ‘DNA’ to something else. (The Associations rollover tooltip uses ‘description’ rather than “Custom Type”.) Changing a large number of descriptions is extremely tedious.

How about letting us create a dummy Association description that can be a “End of List” marker. (Associations have to have a Person as well as a description. So I used a self reference. And made it “Private”) When that designated Association description is found in the list of Associations, the reset of the list would be ignored. The Associations tab allows drag’n’drop re-ordering as well as “up”/“down” re-ordering by a row at a time. So manually reshaping a shared list would not be too onerous.

Hi Gary

Congratulations for your work it s really impressive.
As i just discover the “beauty” of branches in git I jump in one shot from the original dna gramplet to your today version.
It s really impressive.
I will play with it and begin to enter data in GRAMPS in order to give you some feedback.

How about a new config which is the max people in the legend? Would you want that one config for both views? I am loathe to add fake data to resolve this. It also violates the principal of least astonishment when the user cannot understand why the list is shorter than expected (if they added fake data and forgot).

1 Like

Good catches. I am fixing both issues for the next release.

1 Like

How about recognizing a “DNA firebreak” (or a better term) description?

So when the list of Association reaches that description, it stops looking for any more DNA association notes.

This eliminates dummy entry and only requires 1 edit. Also, it allows configuring each Person’s graph separately. As you know from your SynchAssociations add-on, the Association tab data is independent of any reciprocal Association… although the Note is ‘shared’.

I fear that another Config option for this particular capability would open a can of worms. It would be a config that needed constant tweaking, leading to a complex selection GUI… and so on.

The redraw is now working properly. Added a margin for the single chromosome view. I think this is ready for gramps PR. Please provide feedback and I will update if there are no issues.

I agree. Thanks again for making this.

FYI, I created a fake person with whom I could create a DNA association so that I could plot the areas that were excluded from testing (such as the first 19,000,000 base pairs of chromosomes 13, 14 and 15. These serve as visual reminders that I shouldn’t ever expect to see any matches there, and that if I do, I probably have typos in my data.

Similarly, one could create fake persons for various values that are reported in whatever chromosome painting admixture analysis one might have, and plot those areas as well, sorting them in the association note so that they appear in the background behind all actual matches. Those results can be questionable, but some users might find it helpful to plot the locations of any unexpected values in order to more easily see which matches (and common ancestors) fall in those areas.

The left & right margins look much better. Thanks!

The Single Chromosome has the borders for the bars that were originally in the Compound view. Like the Compound View, it seems like the bars would be less busy without borders.

But without borders, the male and female colors need to be a bit darker to enhance contrast to the background. I dropped all the R, G & B values by 0.05 :

maternal-background=(0.926, 0.825, 0.92)
paternal-background=(0.833, 0.845, 0.92)

And if the Legend on the Single was shifted to the left side of the diagram (with a gutter no less than 1/2"), the problem with the longer names hitting the right edge of the graph would go away

Removed the borders on the Single View
Updated background colors as you suggested
Moved the Single View Legend offset to 10% width (instead of 75%)

Anything else from anyone?

1 Like

Just touching the version number in the .gpr.py

This qualifies as a MAJOR version… so vers 1.1.4 to vers 2.0.0 ?

A question about the plugin folder name… it has the name of the original submission: “DNA” Can other future Gramplets be dropped in this folder too without causing install/uninstall conflicts? Like the ability to uninstall one add-on in that folder without deleting the folder and losing the other accidentally?

If not, maybe the folder name should be changed to match the name of the addon… After all, the folder names are not ‘registered’ and that conflict might arise coincidentally.

When you decide to release, lets close/lock this thread and start another ‘continued from’ thread. (Via the ‘link’ icon’s “+ New Topic” button.) This thread is now so long that the estimated read time is prohibitive. 113 posts at an average silent read speed (234 words per minute) is a big investment.

Agree that this should be v 2.0 as it is a major rewrite.

Unfortunately, if we change the folder name, then users who update will get a new one with the new folder name and still have the DNA folder with its version. This would be very bad (two versions with the same name can wreak havoc).

You can add additional gramplets to this folder. That is not an issue at all.

Or wait for 5.2 release and rename the folder then (when users dont have an existing DNA folder).

I will be creating PR today, so we can close this thread. I am starting to work on the updated documentation today also. Will probably put it in the Discussion page until PR is merged. That will give people an opportunity to review now.

You might want to inquire of @Nick-Hall where the .ini should live. Currently, it pops up one level to the ‘plugins’ folder.

Only a few addons locate it in this folder. Most seem to go up 2 levels. Some put it in the addon folder itself.

(That gramps51 folder is a mass of multiple .ini files mixed with folder names and other files. Hopefully in 5.2, Nick will designate a sister folder – like ‘configs’ in the the ‘gramps52’ folder with ‘plugins’. Then we could temporarily bypass all the view & add-on customization by renaming a single folder. Then restore them just as easily. Without accidentally removing the custom_filters.xml or new_addons.txt files.)

You need a folder that the user has write permission. For the Forms addons I use the addon folder itself.

1 Like

Documentation updated in the Discussion page of the wiki since PR has not been merged. This will allow for review.

Finally tried the Dark Mode theme with the Gramplet and there were 2 problems:

  • The legend’s Title & Person IDs stay black. (The rest of the text swaps between black & white with the mode switch.)
  • The colors of the bars are too strident.

Since you were using RGBA values with a 100% opacity, I changed the opacity to 25% and pushed up the Red and Blue values. Then the settings worked in Dark Mode and Light Mode equally well. (And if the bars overlay the legend in Single Chromosome view, you can still barely make out the text.)

Maybe you could add the alpha channel to the R, G, & B values being passed through the .ini configuration?

;; Gramps key file
;; Automatically created at 2022/11/05 19:17:42

[map]
;;chromosome-build=37
;;legend-single-chromosome-y-offset=25
;;legend-swatch-offset-y=5
maternal-background=(0.99, 0.5, 0.5, 0.25)
paternal-background=(0.5, 0.5, 0.99, 0.25)
;;show_associate_id=1

Thanks for the documentation. Can you please add any suggestions you might have for how users could or should indicate the source of a particular set of data (FamilyTreeDNA, GEDmatch, etc.) and kit number (if available)?

Updated PR with fix for Dark Mode - both adding alpha and legend text color.

1 Like