import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
+import java.util.Objects;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
if (!isPDBRefsFound && !isUniProtRefsFound)
{
String seqName = seq.getName();
+ seqName = sanitizeSeqName(seqName);
String[] names = seqName.toLowerCase().split("\\|");
for (String name : names)
{
}
/**
+ * Remove the following special characters from input string +, -, &, |, !, (,
+ * ), {, }, [, ], ^, ", ~, *, ?, :, \
+ *
+ * @param seqName
+ * @return
+ */
+ private static String sanitizeSeqName(String seqName)
+ {
+ Objects.requireNonNull(seqName);
+ return seqName.replaceAll("\\[\\d*\\]", "")
+ .replaceAll("[^\\dA-Za-z ]", "").replaceAll("\\s+", "+");
+ }
+
+
+ /**
* Ensures sequence ref names are not less than 3 characters and does not
* contain a database name
*