git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
in progress
[jalview.git]
/
forester
/
java
/
src
/
org
/
forester
/
msa_compactor
/
MsaCompactor.java
diff --git
a/forester/java/src/org/forester/msa_compactor/MsaCompactor.java
b/forester/java/src/org/forester/msa_compactor/MsaCompactor.java
index
6209da1
..
8a13b5c
100644
(file)
--- a/
forester/java/src/org/forester/msa_compactor/MsaCompactor.java
+++ b/
forester/java/src/org/forester/msa_compactor/MsaCompactor.java
@@
-82,7
+82,7
@@
public class MsaCompactor {
//
private String _maffts_opts = "--auto";
private DeleteableMsa _msa = null;
//
private String _maffts_opts = "--auto";
private DeleteableMsa _msa = null;
- private boolean _norm = true;
+ private boolean _normalize_for_effective_seq_length = true;
private File _out_file_base = null;
private MSA_FORMAT _output_format = MSA_FORMAT.FASTA;
private String _path_to_mafft = null;
private File _out_file_base = null;
private MSA_FORMAT _output_format = MSA_FORMAT.FASTA;
private String _path_to_mafft = null;
@@
-130,9
+130,9
@@
public class MsaCompactor {
return phy;
}
return phy;
}
- public final List<MsaProperties> chart( final int step, final boolean realign, final boolean norm )
+ public final List<MsaProperties> chart( final int step, final boolean realign, final boolean normalize_for_effective_seq_length )
throws IOException, InterruptedException {
throws IOException, InterruptedException {
- final GapContribution stats[] = calcGapContribtionsStats( norm );
+ final GapContribution stats[] = calcGapContribtionsStats( normalize_for_effective_seq_length );
final List<String> to_remove_ids = new ArrayList<String>();
final List<MsaProperties> msa_props = new ArrayList<MsaProperties>();
for( final GapContribution gap_gontribution : stats ) {
final List<String> to_remove_ids = new ArrayList<String>();
final List<MsaProperties> msa_props = new ArrayList<MsaProperties>();
for( final GapContribution gap_gontribution : stats ) {
@@
-179,6
+179,7
@@
public class MsaCompactor {
}
++i;
}
}
++i;
}
+
if ( _phylogentic_inference ) {
decorateTree( phy, msa_props, true );
displayTree( phy );
if ( _phylogentic_inference ) {
decorateTree( phy, msa_props, true );
displayTree( phy );
@@
-304,7
+305,7
@@
public class MsaCompactor {
public final List<MsaProperties> removeViaGapAverage( final double mean_gapiness ) throws IOException,
InterruptedException {
public final List<MsaProperties> removeViaGapAverage( final double mean_gapiness ) throws IOException,
InterruptedException {
- final GapContribution stats[] = calcGapContribtionsStats( _norm );
+ final GapContribution stats[] = calcGapContribtionsStats( _normalize_for_effective_seq_length );
final List<String> to_remove_ids = new ArrayList<String>();
final List<MsaProperties> msa_props = new ArrayList<MsaProperties>();
for( final GapContribution gap_gontribution : stats ) {
final List<String> to_remove_ids = new ArrayList<String>();
final List<MsaProperties> msa_props = new ArrayList<MsaProperties>();
for( final GapContribution gap_gontribution : stats ) {
@@
-350,12
+351,19
@@
public class MsaCompactor {
if ( _phylogentic_inference ) {
decorateTree( phy, msa_props, false );
displayTree( phy );
if ( _phylogentic_inference ) {
decorateTree( phy, msa_props, false );
displayTree( phy );
- }
+ System.out.println( "calculating phylogentic tree..." );
+ System.out.println();
+ final Phylogeny phy2 = calcTree();
+ addSeqs2Tree( _msa, phy2 );
+ displayTree( phy2 );
+ }
+
+
return msa_props;
}
public List<MsaProperties> removeViaLength( final int length ) throws IOException, InterruptedException {
return msa_props;
}
public List<MsaProperties> removeViaLength( final int length ) throws IOException, InterruptedException {
- final GapContribution stats[] = calcGapContribtionsStats( _norm );
+ final GapContribution stats[] = calcGapContribtionsStats( _normalize_for_effective_seq_length );
final List<String> to_remove_ids = new ArrayList<String>();
final List<MsaProperties> msa_props = new ArrayList<MsaProperties>();
for( final GapContribution gap_gontribution : stats ) {
final List<String> to_remove_ids = new ArrayList<String>();
final List<MsaProperties> msa_props = new ArrayList<MsaProperties>();
for( final GapContribution gap_gontribution : stats ) {
@@
-401,13
+409,19
@@
public class MsaCompactor {
if ( _phylogentic_inference ) {
decorateTree( phy, msa_props, false );
displayTree( phy );
if ( _phylogentic_inference ) {
decorateTree( phy, msa_props, false );
displayTree( phy );
- }
+ System.out.println( "calculating phylogentic tree..." );
+ System.out.println();
+ final Phylogeny phy2 = calcTree();
+ addSeqs2Tree( _msa, phy2 );
+ displayTree( phy2 );
+ }
+
return msa_props;
}
public final List<MsaProperties> removeWorstOffenders( final int to_remove ) throws IOException,
InterruptedException {
return msa_props;
}
public final List<MsaProperties> removeWorstOffenders( final int to_remove ) throws IOException,
InterruptedException {
- final GapContribution stats[] = calcGapContribtionsStats( _norm );
+ final GapContribution stats[] = calcGapContribtionsStats( _normalize_for_effective_seq_length );
final List<String> to_remove_ids = new ArrayList<String>();
final List<MsaProperties> msa_props = new ArrayList<MsaProperties>();
for( int j = 0; j < to_remove; ++j ) {
final List<String> to_remove_ids = new ArrayList<String>();
final List<MsaProperties> msa_props = new ArrayList<MsaProperties>();
for( int j = 0; j < to_remove; ++j ) {
@@
-456,7
+470,8
@@
public class MsaCompactor {
final Phylogeny phy2 = calcTree();
addSeqs2Tree( _msa, phy2 );
displayTree( phy2 );
final Phylogeny phy2 = calcTree();
addSeqs2Tree( _msa, phy2 );
displayTree( phy2 );
- }
+ }
+
return msa_props;
}
return msa_props;
}
@@
-472,8
+487,8
@@
public class MsaCompactor {
_maffts_opts = maffts_opts;
}
_maffts_opts = maffts_opts;
}
- public final void setNorm( final boolean norm ) {
- _norm = norm;
+ public final void setNorm( final boolean normalize_for_effective_seq_length ) {
+ _normalize_for_effective_seq_length = normalize_for_effective_seq_length;
}
final public void setOutFileBase( final File out_file_base ) {
}
final public void setOutFileBase( final File out_file_base ) {
@@
-569,8
+584,8
@@
public class MsaCompactor {
return stats;
}
return stats;
}
- final private GapContribution[] calcGapContribtionsStats( final boolean norm ) {
- final GapContribution stats[] = calcGapContribtions( norm );
+ final private GapContribution[] calcGapContribtionsStats( final boolean normalize_for_effective_seq_length ) {
+ final GapContribution stats[] = calcGapContribtions( normalize_for_effective_seq_length );
Arrays.sort( stats );
return stats;
}
Arrays.sort( stats );
return stats;
}