X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2Fgff%2FGff3Helper.java;h=28bcf4422d3258886dd72452644ca09492968ebe;hb=2ea1fb1e8751ac7272c421820000449525664f02;hp=28941f57bc1c311c5861ed37098a5857786e7bb2;hpb=136c0793b90b72b928c4d77dc109dd5c644e00d3;p=jalview.git diff --git a/src/jalview/io/gff/Gff3Helper.java b/src/jalview/io/gff/Gff3Helper.java index 28941f5..28bcf44 100644 --- a/src/jalview/io/gff/Gff3Helper.java +++ b/src/jalview/io/gff/Gff3Helper.java @@ -39,6 +39,8 @@ import java.util.Map; */ public class Gff3Helper extends GffHelperBase { + public static final String ALLELES = "alleles"; + protected static final String TARGET = "Target"; protected static final String ID = "ID"; @@ -89,7 +91,7 @@ public class Gff3Helper extends GffHelperBase String atts = gff[ATTRIBUTES_COL]; Map> attributes = parseNameValuePairs(atts); - SequenceOntologyI so = SequenceOntologyFactory.getInstance(); + SequenceOntologyI so = SequenceOntologyFactory.getSequenceOntology(); if (so.isA(soTerm, SequenceOntologyI.PROTEIN_MATCH)) { sf = processProteinMatch(attributes, seq, gff, align, newseqs, @@ -152,8 +154,8 @@ public class Gff3Helper extends GffHelperBase */ if ("-".equals(strand)) { - System.err - .println("Skipping mapping from reverse complement as not yet supported"); + System.err.println( + "Skipping mapping from reverse complement as not yet supported"); return null; } @@ -244,7 +246,8 @@ public class Gff3Helper extends GffHelperBase * @return */ @SuppressWarnings("unused") - protected String findTargetId(String target, Map> set) + protected String findTargetId(String target, + Map> set) { return target; } @@ -275,8 +278,8 @@ public class Gff3Helper extends GffHelperBase * @throws IOException */ protected SequenceFeature processProteinMatch( - Map> set, SequenceI seq, - String[] gffColumns, AlignmentI align, List newseqs, + Map> set, SequenceI seq, String[] gffColumns, + AlignmentI align, List newseqs, boolean relaxedIdMatching) { // This is currently tailored to InterProScan GFF output: @@ -320,8 +323,8 @@ public class Gff3Helper extends GffHelperBase * renamed with its qualified accession id; renaming has to wait until * all sequence reference resolution is complete */ - String accessionId = StringUtils.listToDelimitedString( - set.get(NAME), ","); + String accessionId = StringUtils + .listToDelimitedString(set.get(NAME), ","); if (accessionId.length() > 0) { String database = sf.getType(); // TODO InterProScan only?? @@ -391,14 +394,14 @@ public class Gff3Helper extends GffHelperBase desc = target.split(" ")[0]; } - SequenceOntologyI so = SequenceOntologyFactory.getInstance(); + SequenceOntologyI so = SequenceOntologyFactory.getSequenceOntology(); String type = sf.getType(); if (so.isA(type, SequenceOntologyI.SEQUENCE_VARIANT)) { /* * Ensembl returns dna variants as 'alleles' */ - desc = StringUtils.listToDelimitedString(attributes.get("alleles"), + desc = StringUtils.listToDelimitedString(attributes.get(ALLELES), ","); }