for( final GapContribution gap_gontribution : stats ) {
to_remove_ids.add( gap_gontribution.getId() );
}
+ if ( !_realign ) {
+ _step = -1;
+ }
printTableHeader();
- final int x = ForesterUtil.roundToInt( _msa.getNumberOfSequences() / 20.0 );
+ int x = ForesterUtil.roundToInt( _msa.getNumberOfSequences() / 20.0 );
+ if ( x < 1 ) {
+ x = 1;
+ }
MsaProperties msa_prop = new MsaProperties( _msa, _report_aln_mean_identity );
msa_props.add( msa_prop );
printMsaProperties( "", msa_prop );
return msa_props;
}
+ final public void deleteGapColumns( final double max_allowed_gap_ratio ) {
+ _msa.deleteGapColumns( max_allowed_gap_ratio );
+ }
+
final public Msa getMsa() {
return _msa;
}
return _removed_seq_ids;
}
+ public final void removeSequencesByMinimalLength( final int min_effective_length ) {
+ printMsaProperties( "", new MsaProperties( _msa, _report_aln_mean_identity ) );
+ System.out.println();
+ _msa = DeleteableMsa.createInstance( MsaMethods.removeSequencesByMinimalLength( _msa, min_effective_length ) );
+ removeGapColumns();
+ printMsaProperties( "", new MsaProperties( _msa, _report_aln_mean_identity ) );
+ System.out.println();
+ }
+
public final List<MsaProperties> removeViaGapAverage( final double mean_gapiness ) throws IOException,
InterruptedException {
final GapContribution stats[] = calcGapContribtionsStats( _norm );
}
private final boolean isPrintMsaStats( final int i ) {
- return ( ( ( _step < 2 ) && ( _step_for_diagnostics < 2 ) ) || ( ( _step_for_diagnostics > 0 ) && ( ( ( i + 1 ) % _step_for_diagnostics ) == 0 ) ) );
+ return ( ( ( _step == 1 ) && ( _step_for_diagnostics == 1 ) ) || ( ( _step_for_diagnostics > 0 ) && ( ( ( i + 1 ) % _step_for_diagnostics ) == 0 ) ) );
}
private final boolean isPrintMsaStatsWriteOutfileAndRealign( final int i ) {
- return ( ( ( _step < 2 ) && ( _step_for_diagnostics < 2 ) ) || ( ( _step > 0 ) && ( ( ( i + 1 ) % _step ) == 0 ) ) );
+ return ( ( ( _step == 1 ) && ( _step_for_diagnostics == 1 ) ) || ( ( _step > 0 ) && ( ( ( i + 1 ) % _step ) == 0 ) ) );
}
private final StringBuilder msaPropertiesAsSB( final MsaProperties msa_properties ) {
sb.append( msa_properties.getLength() );
sb.append( "\t" );
sb.append( NF_4.format( msa_properties.getGapRatio() ) );
- if ( _report_aln_mean_identity /*msa_properties.getAverageIdentityRatio() >= 0*/) {
+ if ( _report_aln_mean_identity ) {
sb.append( "\t" );
sb.append( NF_4.format( msa_properties.getAverageIdentityRatio() ) );
}
}
private final void printMsaProperties( final String id, final MsaProperties msa_properties ) {
- if ( ( _step < 2 ) || ( _step_for_diagnostics < 2 ) ) {
+ if ( ( _step == 1 ) || ( _step_for_diagnostics == 1 ) ) {
System.out.print( ForesterUtil.pad( id, _longest_id_length, ' ', false ) );
System.out.print( "\t" );
}
}
private final void printTableHeader() {
- if ( ( _step < 2 ) || ( _step_for_diagnostics < 2 ) ) {
+ if ( ( _step == 1 ) || ( _step_for_diagnostics == 1 ) ) {
System.out.print( ForesterUtil.pad( "Id", _longest_id_length, ' ', false ) );
System.out.print( "\t" );
}