helper.parseAttributes(attributeString, attributes);
String id = helper.getID(attributes, featureType);
String[] parentIds = helper.getParentIds(attributes, attributeString);
BasicFeature f = new BasicFeature(chromosome, start, end, strand);
// Set "thick start/end" => corresponds to coding start & end, for UTRs
if (SequenceOntology.utrTypes.contains(featureType)) {
boolean plus = (SequenceOntology.fivePrimeUTRTypes.contains(featureType) && strand == Strand.POSITIVE) ||
(SequenceOntology.threePrimeUTRTypes.contains(featureType) && strand == Strand.NEGATIVE);
if (plus) {
f.setThickStart(end);
} else {
f.setThickEnd(end);
}
}
String phaseString = tokens[7].trim();
if (!phaseString.equals(".")) {
int phaseNum = Integer.parseInt(phaseString);
f.setReadingFrame(phaseNum);
}
f.setName(helper.getName(attributes));
f.setType(featureType);
id = id != null ? id : "igv_" + UUID.randomUUID().toString();
f.setIdentifier(id);
f.setParentIds(parentIds);
f.setAttributes(attributes);
String[] colorNames = new String[]{"color", "Color", "colour", "Colour"};
for (String colorName : colorNames) {
if (attributes.containsKey(colorName)) {
f.setColor(ColorUtilities.stringToColor(attributes.get(colorName)));
break;
}
}
if (featuresToHide.contains(featureType)) {