Open antanij opened 1 year ago
Is this a coding question or a question about using a gdtools
command?
If you are printing from the C++ code and want it to output the contents of the entry versus the address of the pointer, use this syntax:
cout << document.mutations[0].as_string() << endl;
In a terminal, you can output the contents of a GD file as a table using a gdtools ANNOTATE
command like this:
gdtools ANNOTATE -f CSV -r reference.gb -o output.csv input.csv
Let me know if this doesn't address your goal!
EDIT: Whoops, I see this is about the Python version of things... I'm not familiar with that interface.
Your response is a MUCH more effective way to achieve my end goal: programmatically extracting mutations in a particular gene locus. I am working with tens of WGS directories consisting breseq outputs- hence the need to do this programmatically. Your response resolved my problem.
Thank you so much for noticing and addressing this Issue!
The code seems to be reading in the file fine:
metadata
andmutations[0].parent_ids
output correctly. However, the output fordocument.mutations[0]
is<genomediff.records.Record at 0x1fe87dfa550>
Am I missing something trivial?
Slightly related: can I get the Records data as a table?