X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fanalysis%2FDna.java;h=2106dc2136f060e704afa778a535f48f333ef014;hb=136c0793b90b72b928c4d77dc109dd5c644e00d3;hp=0ec5d36923549c58a1dd2d38dfe59491c2830f32;hpb=db93a1adcbe0a4eaaf06e0a70ade0d6c5c1961c3;p=jalview.git diff --git a/src/jalview/analysis/Dna.java b/src/jalview/analysis/Dna.java index 0ec5d36..2106dc2 100644 --- a/src/jalview/analysis/Dna.java +++ b/src/jalview/analysis/Dna.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2) - * Copyright (C) 2015 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -45,7 +45,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.List; -import java.util.Map; public class Dna { @@ -685,7 +684,7 @@ public class Dna */ MapList map = new MapList(scontigs, new int[] { 1, resSize }, 3, 1); - transferCodedFeatures(selection, newseq, map, null, null); + transferCodedFeatures(selection, newseq, map); /* * Construct a dataset sequence for our new peptide. @@ -754,25 +753,15 @@ public class Dna /** * Given a peptide newly translated from a dna sequence, copy over and set any - * features on the peptide from the DNA. If featureTypes is null, all features - * on the dna sequence are searched (rather than just the displayed ones), and - * similarly for featureGroups. + * features on the peptide from the DNA. * * @param dna * @param pep * @param map - * @param featureTypes - * hash whose keys are the displayed feature type strings - * @param featureGroups - * hash where keys are feature groups and values are Boolean objects - * indicating if they are displayed. */ private static void transferCodedFeatures(SequenceI dna, SequenceI pep, - MapList map, Map featureTypes, - Map featureGroups) + MapList map) { - SequenceFeature[] sfs = dna.getSequenceFeatures(); - Boolean fgstate; DBRefEntry[] dnarefs = DBRefUtils.selectRefs(dna.getDBRefs(), DBRefSource.DNACODINGDBS); if (dnarefs != null) @@ -786,24 +775,15 @@ public class Dna } } } - if (sfs != null) + for (SequenceFeature sf : dna.getFeatures().getAllFeatures()) { - for (SequenceFeature sf : sfs) - { - fgstate = (featureGroups == null) ? null : featureGroups - .get(sf.featureGroup); - if ((featureTypes == null || featureTypes.containsKey(sf.getType())) - && (fgstate == null || fgstate.booleanValue())) + if (FeatureProperties.isCodingFeature(null, sf.getType())) { - if (FeatureProperties.isCodingFeature(null, sf.getType())) + // if (map.intersectsFrom(sf[f].begin, sf[f].end)) { - // if (map.intersectsFrom(sf[f].begin, sf[f].end)) - { - } } } - } } }