X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fviewmodel%2FAlignmentViewport.java;h=f12e55e2ad3a6360fd46eb74debd1279e11c6e6b;hb=8d2c4f1719e83f64cabdc294b3e051b7417a77e1;hp=1a9684f88575c4d9da2d95665ea9658822158847;hpb=9e65b8a51f59f411444233fb807729b8cf25fea0;p=jalview.git diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index 1a9684f..f12e55e 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -108,33 +108,11 @@ public abstract class AlignmentViewport * alignment */ - private Map hiddenRepSequences; - - protected ColumnSelection colSel = new ColumnSelection(); - - public boolean autoCalculateConsensus = true; - - protected boolean autoCalculateStrucConsensus = true; - - protected boolean ignoreGapsInConsensusCalculation = false; - protected boolean ignoreBelowBackGroundFrequencyCalculation = false; protected boolean infoLetterHeight = false; - protected ResidueShaderI residueShading = new ResidueShader(); - - protected AlignmentAnnotation consensus; - - protected AlignmentAnnotation complementConsensus; - protected AlignmentAnnotation occupancy; - - protected AlignmentAnnotation strucConsensus; - - protected AlignmentAnnotation conservation; - - protected AlignmentAnnotation quality; /** * results of alignment consensus analysis for visible portion of view @@ -146,19 +124,6 @@ public abstract class AlignmentViewport */ protected ProfilesI hmmProfiles; - /** - * results of cDNA complement consensus visible portion of view - */ - protected Hashtable[] hcomplementConsensus; - - /** - * results of secondary structure base pair consensus for visible portion of - * view - */ - protected Hashtable[] hStrucConsensus; - - protected Conservation hconservation; - public AlignmentViewport(AlignmentI al) { setAlignment(al); @@ -3217,4 +3182,46 @@ public abstract class AlignmentViewport codingComplement.setUpdateStructures(needToUpdateStructureViews); } } + + /** + * Filters out sequences with an eValue higher than the specified value. The + * filtered sequences are hidden or deleted. Sequences with no eValues are also + * filtered out. + * + * @param eValue + * @param delete + */ + public void filterByEvalue(double eValue) + { + for (SequenceI seq : alignment.getSequencesArray()) + { + if ((seq.getAnnotation("Search Scores") == null + || seq.getAnnotation("Search Scores")[0].getEValue() > eValue) + && seq.getHMM() == null) + { + hideSequence(new SequenceI[] { seq }); + } + } + } + + /** + * Filters out sequences with an score lower than the specified value. The + * filtered sequences are hidden or deleted. + * + * @param score + * @param delete + */ + public void filterByScore(double score) + { + for (SequenceI seq : alignment.getSequencesArray()) + { + if ((seq.getAnnotation("Search Scores") == null + || seq.getAnnotation("Search Scores")[0] + .getBitScore() < score) + && seq.getHMM() == null) + { + hideSequence(new SequenceI[] { seq }); + } + } + } }