/** * @param rangeAsString : the string containing the range * @return the range instance matching the range described with the String. The feature sequence will be null. * An IllegalRangeException can be thrown if the range is invalid and doesn't fit the protein sequence */ public static Range createRangeFromString(String rangeAsString) { return createRangeFromString(rangeAsString, null, false); }
/** * @param rangeAsString : the string containing the range * @return the range instance matching the range described with the String. The feature sequence will be null. * An IllegalRangeException can be thrown if the range is invalid and doesn't fit the protein sequence */ public static Range createRangeFromString(String rangeAsString) { return createRangeFromString(rangeAsString, null, false); }
/** * @param rangeAsString : the string containing the range * @param proteinSequence : the sequence of the protein. can be null * @return the range instance matching the range described with the String. The feature sequence will be null. * An IllegalRangeException can be thrown if the range is invalid and doesn't fit the protein sequence */ public static Range createRangeFromString(String rangeAsString, String proteinSequence) { return createRangeFromString(rangeAsString, proteinSequence, false); }
/** * @param rangeAsString : the string containing the range * @param proteinSequence : the sequence of the protein. can be null * @return the range instance matching the range described with the String. The feature sequence will be null. * An IllegalRangeException can be thrown if the range is invalid and doesn't fit the protein sequence */ public static Range createRangeFromString(String rangeAsString, String proteinSequence) { return createRangeFromString(rangeAsString, proteinSequence, false); }
/** * @param rangeAsString : the range to check * @param sequence : the sequence of the protein * @return true if the range is within the sequence, coherent with its fuzzy type and not overlapping */ public static String getBadRangeInfo(String rangeAsString, String sequence) { return getBadRangeInfo(createRangeFromString(rangeAsString, sequence, false), sequence); }
/** * @param rangeAsString : the range to check * @param sequence : the sequence of the protein * @return true if the range is within the sequence, coherent with its fuzzy type and not overlapping */ public static String getBadRangeInfo(String rangeAsString, String sequence) { return getBadRangeInfo(createRangeFromString(rangeAsString, sequence, false), sequence); }
public static boolean isABadRange(String range, String sequence) { try{ Range r = createRangeFromString(range, sequence, false); return (getBadRangeInfo(r, sequence) != null); } catch (IllegalArgumentException e){ return true; } }
public static boolean isABadRange(String range, String sequence) { try{ Range r = createRangeFromString(range, sequence, false); return (getBadRangeInfo(r, sequence) != null); } catch (IllegalArgumentException e){ return true; } }