git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8e355d5
)
JAL-674 return original and replacement sequences and the alignment to allow more...
author
Jim Procter
<jprocter@dundee.ac.uk>
Thu, 30 Oct 2014 15:44:50 +0000
(15:44 +0000)
committer
Jim Procter
<jprocter@dundee.ac.uk>
Thu, 30 Oct 2014 15:44:50 +0000
(15:44 +0000)
src/jalview/analysis/AlignSeq.java
patch
|
blob
|
history
diff --git
a/src/jalview/analysis/AlignSeq.java
b/src/jalview/analysis/AlignSeq.java
index
f5afa9c
..
c546310
100755
(executable)
--- a/
src/jalview/analysis/AlignSeq.java
+++ b/
src/jalview/analysis/AlignSeq.java
@@
-1069,11
+1069,19
@@
public class AlignSeq
* @param ochains
* @param al
* @param dnaOrProtein
* @param ochains
* @param al
* @param dnaOrProtein
- * @param removeOldAnnots when true, old annotation is cleared before new annotation transferred
+ * @param removeOldAnnots
+ * when true, old annotation is cleared before new annotation
+ * transferred
+ * @return List<List<SequenceI> originals, List<SequenceI> replacement,
+ * List<AlignSeq> alignment between each>
*/
*/
- public static void replaceMatchingSeqsWith(List<SequenceI> seqs, List<AlignmentAnnotation> annotations, List<SequenceI> ochains,
+ public static List<List<? extends Object>> replaceMatchingSeqsWith(
+ List<SequenceI> seqs, List<AlignmentAnnotation> annotations,
+ List<SequenceI> ochains,
AlignmentI al, String dnaOrProtein, boolean removeOldAnnots)
{
AlignmentI al, String dnaOrProtein, boolean removeOldAnnots)
{
+ List<SequenceI> orig = new ArrayList<SequenceI>(), repl = new ArrayList<SequenceI>();
+ List<AlignSeq> aligs = new ArrayList<AlignSeq>();
if (al != null && al.getHeight() > 0)
{
ArrayList<SequenceI> matches = new ArrayList<SequenceI>();
if (al != null && al.getHeight() > 0)
{
ArrayList<SequenceI> matches = new ArrayList<SequenceI>();
@@
-1108,10
+1116,13
@@
public class AlignSeq
if ((q = ochains.indexOf(sp)) > -1)
{
seqs.set(p, sq = matches.get(q));
if ((q = ochains.indexOf(sp)) > -1)
{
seqs.set(p, sq = matches.get(q));
+ orig.add(sp);
+ repl.add(sq);
sq.setName(sp.getName());
sq.setDescription(sp.getDescription());
Mapping sp2sq;
sq.transferAnnotation(sp, sp2sq = aligns.get(q).getMappingFromS1(false));
sq.setName(sp.getName());
sq.setDescription(sp.getDescription());
Mapping sp2sq;
sq.transferAnnotation(sp, sp2sq = aligns.get(q).getMappingFromS1(false));
+ aligs.add(aligns.get(q));
int inspos = -1;
for (int ap = 0; ap < annotations.size();)
{
int inspos = -1;
for (int ap = 0; ap < annotations.size();)
{
@@
-1142,6
+1153,7
@@
public class AlignSeq
}
}
}
}
}
}
+ return Arrays.asList(orig, repl, aligs);
}
/**
}
/**