develop: bugfix - GeneParser no longer raises NPE if xrefs.txt is not provided
@@ -390,6 +390,9 @@ public class GeneParser extends CellBaseParser {
private void addGtfXrefs(Transcript transcript, Gene gene) {
List<Xref> xrefList = transcript.getXrefs();
+ if (xrefList == null) {
+ xrefList = new ArrayList<>();
+ }
xrefList.add(new Xref(gene.getId(), ENSEMBL_GTF_DBNAME, ENSEMBL_GTF_DISPLAY));
xrefList.add(new Xref(gene.getName(), ENSEMBL_GTF_DBNAME, ENSEMBL_GTF_DISPLAY));
xrefList.add(new Xref(transcript.getId(), ENSEMBL_GTF_DBNAME, ENSEMBL_GTF_DISPLAY));
