/** * @param range : 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 boolean isABadRange(Range range, String sequence) { return (getBadRangeInfo(range, sequence) != null); }
/** * @param range : 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 boolean isABadRange(Range range, String sequence) { return (getBadRangeInfo(range, sequence) != null); }
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; } }
/** * @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); }
throw new IllegalRangeException("Problem extracting sequence using range. "+FeatureUtils.getBadRangeInfo(this, sequence) +": "+this+" / Start status: "+fromCvFuzzyType+" / End status: "+toCvFuzzyType+" / Seq.Length: "+(sequence != null? sequence.length() : 0));
throw new IllegalRangeException("Problem extracting sequence using range. "+FeatureUtils.getBadRangeInfo(this, sequence) +": "+this+" / Start status: "+fromCvFuzzyType+" / End status: "+toCvFuzzyType+" / Seq.Length: "+(sequence != null? sequence.length() : 0));
throw new PersisterException( "Cannot convert the range " + r.toString() + ". " + FeatureUtils.getBadRangeInfo(r, seq) );