daler / gffutils

GFF and GTF file manipulation and interconversion
http://daler.github.io/gffutils
MIT License
287 stars 78 forks source link

Better handling of merged components #153

Closed innovate-invent closed 1 year ago

innovate-invent commented 4 years ago

PR #152 resolved an issue that came up while trying to handle calling merge_all() repeatedly.

I attempted to create a criteria that would exclude children of a record created by merge(). This is necessary otherwise the hierarchy of children to parents gets mangled on the second pass. I abandoned my attempt when I couldn't land on a consistent way to determine that a record was a component record.

The child attribute isn't unique to the merge() output, and setting the source to something like 'gffutils_merge' isn't reliable as applications will want to set it to their own name. The only solution I could come up with is setting a 'merged' flag in the component record attributes which just adds clutter in the data.

Can anyone suggest a better alternative to setting a custom attribute?

daler commented 2 years ago

Sorry for the painfully long time before replying. If this is still an issue, can you provide a concrete example I can use to investigate options?

daler commented 1 year ago

@innovate-invent, please reopen (and include a concrete example I could use to test) if this is still an issue.