Add read depth attributes to graphml output

This commit is contained in:
eugenefischer
2022-09-28 03:01:52 -05:00
parent 3a47efd361
commit b7c86f20b3

View File

@@ -56,6 +56,9 @@ public class GraphMLFileWriter {
}
String wellPopulationsString = populationsStringBuilder.toString();
ga.put("well populations", DefaultAttribute.createAttribute(wellPopulationsString));
ga.put("read depth", DefaultAttribute.createAttribute(data.getReadDepth().toString()));
ga.put("read error rate", DefaultAttribute.createAttribute(data.getReadErrorRate().toString()));
ga.put("error collision rate", DefaultAttribute.createAttribute(data.getErrorCollisionRate().toString()));
return ga;
}
@@ -75,6 +78,7 @@ public class GraphMLFileWriter {
attributes.put("type", DefaultAttribute.createAttribute(v.getType().name()));
attributes.put("sequence", DefaultAttribute.createAttribute(v.getSequence()));
attributes.put("occupancy", DefaultAttribute.createAttribute(v.getOccupancy()));
attributes.put("read count", DefaultAttribute.createAttribute(v.getReadCount()));
return attributes;
});
//register the attributes
@@ -84,6 +88,7 @@ public class GraphMLFileWriter {
exporter.registerAttribute("type", AttributeCategory.NODE, AttributeType.STRING);
exporter.registerAttribute("sequence", AttributeCategory.NODE, AttributeType.STRING);
exporter.registerAttribute("occupancy", AttributeCategory.NODE, AttributeType.STRING);
exporter.registerAttribute("read count", AttributeCategory.NODE, AttributeType.STRING);
//export the graph
exporter.exportGraph(graph, writer);
} catch(IOException ex){