@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; SignalPMatch that = (SignalPMatch) o; if (orgType != that.orgType) return false; return true; }
/** * Adds and returns filtered match to sequence * * @param match Match to add * @return Match to sequence * @throws IllegalArgumentException if match is null */ public <T extends Match> T addMatch(T match) throws IllegalArgumentException { if (match == null) { throw new IllegalArgumentException("'Match' must not be null"); } if (match.getProtein() != null) { match.getProtein().removeMatch(match); } match.setProtein(this); matches.add(match); return match; }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (orgType != null ? orgType.hashCode() : 0); return result; } }
protected Match(Signature signature, Set<T> locations) { setLocations(locations); setSignature(signature); }
final Signature signature = match.getSignature(); final String signatureAc = signature.getAccession(); final SignatureLibrary signatureLibrary = signature.getSignatureLibraryRelease().getLibrary(); final String description = signature.getDescription(); Set<Location> locations = match.getLocations(); if (locations != null) { locationCount += locations.size();
final Signature signature = match.getSignature(); final String signatureAc = signature.getAccession(); final String signatureModels = match.getSignatureModels(); final SignatureLibrary signatureLibrary = signature.getSignatureLibraryRelease().getLibrary(); final String analysis = signatureLibrary.getName(); Set<Location> locations = match.getLocations(); if (locations != null) { locationCount += locations.size();
/** * Remove sites from any protein match locations (make sites NULL so they don't appear at all in the XML output) * @param proteins The proteins * @param all Remove all site data (not just empty sites)? */ private void removeSites(List<Protein> proteins, boolean all) { for (Protein protein : proteins) { Set<Match> matches = protein.getMatches(); if (matches != null && matches.size() > 0) { for (Match match : matches) { Set<Location> locations = match.getLocations(); if (locations != null && locations.size() > 0) { for (Location location : locations) { if (location instanceof LocationWithSites) { LocationWithSites l = (LocationWithSites) location; Set<Site> sites = l.getSites(); if (sites != null) { if (all || sites.size() < 1) { l.setSites(null); } } } } } } } } } }
/** * Returns sequence alignment. * * @return Sequence alignment. */ @XmlElement(required = true) public String getAlignment() { if (cigarAlignment == null) { return null; } AlignmentEncoder encoder = new CigarAlignmentEncoder(); return encoder.decode(getMatch().getProtein().getSequence(), cigarAlignment, getStart(), getEnd()); }
/** * Removes filtered match from sequence * * @param match Match to remove */ public <T extends Match> void removeMatch(T match) { matches.remove(match); match.setProtein(null); }
for (String proteinAc: proteinAcs) { for (Match match : matches) { final Signature signature = match.getSignature(); final String signatureAc = signature.getAccession(); final SignatureLibrary signatureLibrary = signature.getSignatureLibraryRelease().getLibrary(); Set<Location> locations = match.getLocations(); if (locations != null) { locationCount += locations.size();
/** * Returns sequence alignment. * * @return Sequence alignment. */ @XmlElement(required = true) public String getAlignment() { if (cigarAlignment == null) { return null; } AlignmentEncoder encoder = new CigarAlignmentEncoder(); return encoder.decode(getMatch().getProtein().getSequence(), cigarAlignment, getStart(), getEnd()); }
final Signature signature = match.getSignature(); final String signatureAc = signature.getAccession(); final SignatureLibrary signatureLibrary = signature.getSignatureLibraryRelease().getLibrary(); Set<LocationWithSites> locations = match.getLocations(); if (locations != null) { locationCount += locations.size();
@Override public int hashCode() { return new HashCodeBuilder(29, 53) .appendSuper(super.hashCode()) .append(evalue) .toHashCode(); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof RPSBlastMatch)) return false; return new EqualsBuilder() .appendSuper(super.equals(o)) .isEquals(); }
for (String proteinAc: proteinAcs) { for (Match match : matches) { final Signature signature = match.getSignature(); final String signatureAc = signature.getAccession(); final SignatureLibrary signatureLibrary = signature.getSignatureLibraryRelease().getLibrary(); final String description = signature.getDescription(); Set<Location> locations = match.getLocations(); if (locations != null) { locationCount += locations.size();
@Override public int hashCode() { return new HashCodeBuilder(19, 71) .appendSuper(super.hashCode()) .toHashCode(); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof PhobiusMatch)) return false; return new EqualsBuilder() .appendSuper(super.equals(o)) .isEquals(); }
for (String proteinAc: proteinAcs) { for (Match match : matches) { final Signature signature = match.getSignature(); final String signatureAc = signature.getAccession(); final SignatureLibrary signatureLibrary = signature.getSignatureLibraryRelease().getLibrary(); Set<Location> locations = match.getLocations(); if (locations != null) { locationCount += locations.size();
@Override public int hashCode() { return new HashCodeBuilder(19, 49) .appendSuper(super.hashCode()) .append(evalue) .append(score) .toHashCode(); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof CoilsMatch)) return false; return new EqualsBuilder() .appendSuper(super.equals(o)) .isEquals(); }