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:
14a3623
)
JAL-2629 manual curation of HMMs via reference annotation functional
author
TZVanaalten
<TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Fri, 1 Sep 2017 14:18:09 +0000
(15:18 +0100)
committer
TZVanaalten
<TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Fri, 1 Sep 2017 14:18:09 +0000
(15:18 +0100)
src/jalview/hmmer/HMMAlignThread.java
patch
|
blob
|
history
src/jalview/hmmer/HMMBuildThread.java
patch
|
blob
|
history
src/jalview/hmmer/HMMERCommands.java
patch
|
blob
|
history
src/jalview/hmmer/HMMSearchThread.java
patch
|
blob
|
history
src/jalview/io/StockholmFile.java
patch
|
blob
|
history
src/jalview/viewmodel/AlignmentViewport.java
patch
|
blob
|
history
diff --git
a/src/jalview/hmmer/HMMAlignThread.java
b/src/jalview/hmmer/HMMAlignThread.java
index
532271b
..
5eec1c4
100644
(file)
--- a/
src/jalview/hmmer/HMMAlignThread.java
+++ b/
src/jalview/hmmer/HMMAlignThread.java
@@
-125,7
+125,7
@@
public class HMMAlignThread implements Runnable
try
{
cmds.exportData(seqs, outTemp.getAbsoluteFile(), hmm,
try
{
cmds.exportData(seqs, outTemp.getAbsoluteFile(), hmm,
- hmmTemp.getAbsoluteFile());
+ hmmTemp.getAbsoluteFile(), null);
} catch (IOException e1)
{
e1.printStackTrace();
} catch (IOException e1)
{
e1.printStackTrace();
diff --git
a/src/jalview/hmmer/HMMBuildThread.java
b/src/jalview/hmmer/HMMBuildThread.java
index
f940fbb
..
2fdc97b
100644
(file)
--- a/
src/jalview/hmmer/HMMBuildThread.java
+++ b/
src/jalview/hmmer/HMMBuildThread.java
@@
-234,7
+234,16
@@
public class HMMBuildThread implements Runnable
}
cmds.uniquifySequences(newArr);
}
cmds.uniquifySequences(newArr);
- cmds.exportData(newArr, stoTemp, null, null);
+
+ if (forGroup)
+ {
+ cmds.exportData(newArr, stoTemp, null, null, group);
+ }
+ else
+ {
+ cmds.exportData(newArr, stoTemp, null, null, alignment);
+ }
+
jalview.analysis.SeqsetUtils.deuniquify(cmds.hash, array);
} catch (FileNotFoundException e)
jalview.analysis.SeqsetUtils.deuniquify(cmds.hash, array);
} catch (FileNotFoundException e)
@@
-330,8
+339,11
@@
public class HMMBuildThread implements Runnable
{
if (af != null)
{
{
if (af != null)
{
+ if (af.getTitle().length() < 15)
+ {
name = af.getTitle();
}
name = af.getTitle();
}
+ }
if (name == null || "".equals(name))
{
name = "Alignment";
if (name == null || "".equals(name))
{
name = "Alignment";
@@
-362,7
+374,8
@@
public class HMMBuildThread implements Runnable
*/
private void importData() throws IOException, InterruptedException
{
*/
private void importData() throws IOException, InterruptedException
{
- HMMFile file = new HMMFile(new FileParse(hmmTemp.getAbsolutePath(),
+ HMMFile file = new HMMFile(
+ new FileParse(hmmTemp.getAbsolutePath(),
DataSourceType.FILE));
SequenceI[] seqs = file.getSeqsAsArray();
SequenceI seq = seqs[0];
DataSourceType.FILE));
SequenceI[] seqs = file.getSeqsAsArray();
SequenceI seq = seqs[0];
diff --git
a/src/jalview/hmmer/HMMERCommands.java
b/src/jalview/hmmer/HMMERCommands.java
index
ba4c57b
..
4c1748b
100644
(file)
--- a/
src/jalview/hmmer/HMMERCommands.java
+++ b/
src/jalview/hmmer/HMMERCommands.java
@@
-1,7
+1,9
@@
package jalview.hmmer;
import jalview.datamodel.Alignment;
package jalview.hmmer;
import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignmentI;
+import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.HiddenMarkovModel;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
import jalview.datamodel.HiddenMarkovModel;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
@@
-128,12
+130,24
@@
public class HMMERCommands
* @throws IOException
*/
public void exportData(SequenceI[] seqs,
* @throws IOException
*/
public void exportData(SequenceI[] seqs,
- File stoLocation, HiddenMarkovModel hmm, File hmmLocation)
+ File stoLocation, HiddenMarkovModel hmm, File hmmLocation,
+ AnnotatedCollectionI al)
throws IOException
{
if (seqs != null)
{
throws IOException
{
if (seqs != null)
{
- StockholmFile file = new StockholmFile(new Alignment(seqs));
+ AlignmentI newAl = new Alignment(seqs);
+ if (stoLocation != null)
+ {
+ for (AlignmentAnnotation annot : al.getAlignmentAnnotation())
+ {
+ if (annot.label.contains("Reference") || "RF".equals(annot.label))
+ {
+ newAl.addAnnotation(annot);
+ }
+ }
+ }
+ StockholmFile file = new StockholmFile(newAl);
String output = file.print(seqs, false);
PrintWriter writer = new PrintWriter(stoLocation);
writer.println(output);
String output = file.print(seqs, false);
PrintWriter writer = new PrintWriter(stoLocation);
writer.println(output);
diff --git
a/src/jalview/hmmer/HMMSearchThread.java
b/src/jalview/hmmer/HMMSearchThread.java
index
4012cfe
..
8adeb22
100644
(file)
--- a/
src/jalview/hmmer/HMMSearchThread.java
+++ b/
src/jalview/hmmer/HMMSearchThread.java
@@
-118,7
+118,7
@@
public class HMMSearchThread implements Runnable
}
try
{
}
try
{
- cmds.exportData(null, null, hmm, hmmTemp.getAbsoluteFile());
+ cmds.exportData(null, null, hmm, hmmTemp.getAbsoluteFile(), null);
} catch (IOException e1)
{
e1.printStackTrace();
} catch (IOException e1)
{
e1.printStackTrace();
diff --git
a/src/jalview/io/StockholmFile.java
b/src/jalview/io/StockholmFile.java
index
3644ff9
..
efd45eb
100644
(file)
--- a/
src/jalview/io/StockholmFile.java
+++ b/
src/jalview/io/StockholmFile.java
@@
-1069,6
+1069,10
@@
public class StockholmFile extends AlignFile
{
label = aa.label;
}
{
label = aa.label;
}
+ else if ("RF".equals(key))
+ {
+ label = key;
+ }
else
{
label = key + "_cons";
else
{
label = key + "_cons";
diff --git
a/src/jalview/viewmodel/AlignmentViewport.java
b/src/jalview/viewmodel/AlignmentViewport.java
index
c2c2c5d
..
9b4e1fe
100644
(file)
--- a/
src/jalview/viewmodel/AlignmentViewport.java
+++ b/
src/jalview/viewmodel/AlignmentViewport.java
@@
-3146,7
+3146,7
@@
public abstract class AlignmentViewport
AlignmentAnnotation[] annots = this.alignment.getAlignmentAnnotation();
for (AlignmentAnnotation annot : annots)
{
AlignmentAnnotation[] annots = this.alignment.getAlignmentAnnotation();
for (AlignmentAnnotation annot : annots)
{
- if ("RF".equals(annot.getCalcId()))
+ if ("RF".equals(annot.label) || annot.label.contains("Reference"))
{
return true;
}
{
return true;
}