Closed Yu-jinKim closed 2 years ago
Hmm. For all other attributes, a comma indicates multiple values for that attribute. I don't think it makes sense to have multiple values for the primary key, so this should raise an exception with a clearer description of the problem.
https://github.com/daler/gffutils/pull/193 does this.
In your case you can make it work by providing an id spec that will convert your list of IDs to a string, like this:
def intron_id(f):
return ','.join(f['ID'])
db.update(introns, id_spec='intron': [intron_id]})
This test verifies it works with the GFF you provided.
Now addressed in v0.11.
Hi,
I have been trying to pull out exons of a GFF but i'm getting an error that i don't understand.
Here is a
head -14
of that GFF which is enough to get the error:Using this:
I get this
Looking at the introns, they look fine:
Doesn't the import support
{exon1_id},{exon2_id}
IDs? I have looked at the source code but i'm not sure why it fails.