final static private String MIN_LENGTH_OPTION = "ml";
final static private String GAP_RATIO_LENGTH_OPTION = "gr";
final static private String REPORT_ALN_MEAN_IDENTITY = "q";
- final static private String OUTPUT_FORMAT_PHYLIP_OPTION = "f";
+ final static private String OUTPUT_FORMAT_PHYLIP_OPTION = "p";
final static private String OUTPUT_REMOVED_SEQS_OPTION = "ro";
final static private String MAFFT_OPTIONS = "mo";
//
final static private String DO_NOT_NORMALIZE_FOR_EFF_LENGTH_OPTION = "nn";
final static private String PRG_NAME = "msa_compactor";
final static private String PRG_DESC = "multiple sequence aligment compactor";
- final static private String PRG_VERSION = "0.02";
- final static private String PRG_DATE = "140316";
+ final static private String PRG_VERSION = "0.2";
+ final static private String PRG_DATE = "140428";
final static private String E_MAIL = "czmasek@sanfordburham.org";
final static private String WWW = "https://sites.google.com/site/cmzmasek/home/software/forester";
int worst_remove = -1;
double av_gap = -1;
int length = -1;
- int step = -1;
+ int step = 1;
boolean realign = false;
boolean norm = true;
String path_to_mafft = null;
- int step_for_diagnostics = -1;
+ int step_for_diagnostics = 1;
int min_length = -1;
double gap_ratio = -1;
boolean report_aln_mean_identity = false;
msa = DeleteableMsa.createInstance( GeneralMsaParser.parse( is ) );
}
final DescriptiveStatistics initial_msa_stats = MsaMethods.calculateEffectiveLengthStatistics( msa );
- System.out.println( initial_msa_stats.toString() );
+ //System.out.println( initial_msa_stats.toString() );
if ( ( cla.isOptionSet( LENGTH_OPTION ) || cla.isOptionSet( REMOVE_WORST_OFFENDERS_OPTION ) || cla
.isOptionSet( AV_GAPINESS_OPTION ) ) && ( out == null ) ) {
ForesterUtil.fatalError( PRG_NAME, "outfile file missing" );
System.out.println( "Output format : "
+ ( output_format == MSA_FORMAT.FASTA ? "fasta" : "phylip" ) );
}
- System.out.println( "Step for output and re-aligning) : " + ( step > 1 ? step : 1 ) );
- System.out.println( "Step for diagnostics reports : "
- + ( step_for_diagnostics > 1 ? step_for_diagnostics : 1 ) );
+ System.out.println( "Step for output and re-aligning : " + step );
+ System.out.println( "Step for diagnostics reports : " + step_for_diagnostics );
System.out.println( "Calculate mean identity : " + report_aln_mean_identity );
if ( !norm ) {
System.out.println( "Normalize : " + norm );
System.out.println();
//
//
+ final int initial_number_of_seqs = msa.getNumberOfSequences();
+ List<MsaProperties> msa_props = null;
if ( worst_remove > 0 ) {
final MsaCompactor mc = new MsaCompactor( msa );
mc.setRealign( realign );
+ mc.setOutputFormat( output_format );
if ( realign ) {
mc.setPathToMafft( path_to_mafft );
+ mc.setMafftOptions( mafft_options );
}
mc.setNorm( norm );
+ mc.setReportAlnMeanIdentity( report_aln_mean_identity );
mc.setOutFileBase( out );
if ( removed_seqs_out_base != null ) {
mc.setRemovedSeqsOutBase( removed_seqs_out_base );
}
- if ( step > 1 ) {
- mc.setStep( step );
- }
- if ( step_for_diagnostics > 1 ) {
- mc.setStepForDiagnostics( step_for_diagnostics );
- }
- mc.removeWorstOffenders( worst_remove );
+ mc.setStep( step );
+ mc.setStepForDiagnostics( step_for_diagnostics );
+ msa_props = mc.removeWorstOffenders( worst_remove );
}
else if ( av_gap > 0 ) {
final MsaCompactor mc = new MsaCompactor( msa );
mc.setRealign( realign );
+ mc.setOutputFormat( output_format );
if ( realign ) {
mc.setPathToMafft( path_to_mafft );
+ mc.setMafftOptions( mafft_options );
}
mc.setNorm( norm );
+ mc.setReportAlnMeanIdentity( report_aln_mean_identity );
mc.setOutFileBase( out );
if ( removed_seqs_out_base != null ) {
mc.setRemovedSeqsOutBase( removed_seqs_out_base );
}
- if ( step > 1 ) {
- mc.setStep( step );
- }
- if ( step_for_diagnostics > 1 ) {
- mc.setStepForDiagnostics( step_for_diagnostics );
- }
- mc.removeViaGapAverage( av_gap );
+ mc.setStep( step );
+ mc.setStepForDiagnostics( step_for_diagnostics );
+ msa_props = mc.removeViaGapAverage( av_gap );
}
else if ( length > 0 ) {
// TODO if < shortest seq -> error
final MsaCompactor mc = new MsaCompactor( msa );
mc.setRealign( realign );
+ mc.setOutputFormat( output_format );
if ( realign ) {
mc.setPathToMafft( path_to_mafft );
+ mc.setMafftOptions( mafft_options );
}
mc.setNorm( norm );
+ mc.setReportAlnMeanIdentity( report_aln_mean_identity );
+ mc.setOutFileBase( out );
if ( removed_seqs_out_base != null ) {
mc.setRemovedSeqsOutBase( removed_seqs_out_base );
}
- if ( step > 1 ) {
- mc.setStep( step );
- }
- if ( step_for_diagnostics > 1 ) {
- mc.setStepForDiagnostics( step_for_diagnostics );
- }
- mc.removeViaLength( length );
+ mc.setStep( step );
+ mc.setStepForDiagnostics( step_for_diagnostics );
+ msa_props = mc.removeViaLength( length );
}
else {
//MsaCompactor.chart( msa, step, realign, norm, path_to_mafft );
- final int initial_number_of_seqs = msa.getNumberOfSequences();
final MsaCompactor mc = new MsaCompactor( msa );
mc.setRealign( realign );
if ( realign ) {
mc.setPathToMafft( path_to_mafft );
+ mc.setMafftOptions( mafft_options );
}
mc.setNorm( norm );
mc.setReportAlnMeanIdentity( report_aln_mean_identity );
mc.setOutFileBase( out );
- if ( step > 1 ) {
- mc.setStep( step );
- }
- if ( step_for_diagnostics > 1 ) {
- mc.setStepForDiagnostics( step_for_diagnostics );
- }
- final List<MsaProperties> msa_props = mc.chart( step, realign, norm );
- Chart.display( msa_props, initial_number_of_seqs );
+ mc.setStep( step );
+ mc.setStepForDiagnostics( step_for_diagnostics );
+ msa_props = mc.chart( step, realign, norm );
}
+ Chart.display( msa_props, initial_number_of_seqs, report_aln_mean_identity, in.toString() );
}
catch ( final IllegalArgumentException iae ) {
iae.printStackTrace(); //TODO remove me
+ "=<integer> number of worst offender sequences to remove" );
System.out.println( " -" + LENGTH_OPTION + "=<integer> target MSA length" );
System.out.println( " -" + AV_GAPINESS_OPTION + "=<decimal> target gap-ratio (0.0-1.0)" );
- System.out.println( " -" + STEP_OPTION + "=<integer> step for output and re-aligning (default: 1)" );
System.out.println( " -" + REALIGN_OPTION + " to realign using MAFFT" + mafft_comment );
System.out.println( " -" + MAFFT_OPTIONS + "=<string> options for MAFFT (default: --auto)" );
+ System.out.println( " -" + STEP_OPTION + "=<integer> step for output and re-aligning (default: 1)" );
System.out.println( " -" + STEP_FOR_DIAGNOSTICS_OPTION
+ "=<integer> step for diagnostics reports (default: 1)" );
- System.out.println( " -" + MIN_LENGTH_OPTION
- + "=<integer> minimal effecive sequence length (for deleting of shorter sequences)" );
- System.out.println( " -" + GAP_RATIO_LENGTH_OPTION
- + "=<decimal> maximal allowed gap ratio per column (for deleting of columms) (0.0-1.0)" );
+ // System.out.println( " -" + MIN_LENGTH_OPTION
+ // + "=<integer> minimal effecive sequence length (for deleting of shorter sequences)" );
+ // System.out.println( " -" + GAP_RATIO_LENGTH_OPTION
+ // + "=<decimal> maximal allowed gap ratio per column (for deleting of columms) (0.0-1.0)" );
System.out
.println( " -"
+ REPORT_ALN_MEAN_IDENTITY
- + " to calculate mean MSA column identity (\"MSA quality\") (not recommended for very large alignments)" );
+ + " to calculate mean MSA column identity (\"MSA quality\") (not recommended for very large alignments)" );
System.out.println( " -" + OUTPUT_FORMAT_PHYLIP_OPTION
+ " to write output alignments in phylip format instead of fasta" );
System.out.println( " -" + OUTPUT_REMOVED_SEQS_OPTION + "=<file> to output the removed sequences" );
private ChartPanel _chart_panel = null;
private final JMenuItem _m_exit = new JMenuItem();
private List<MsaProperties> _msa_props;
+ private final boolean _show_msa_qual;
private final int _initial_number_of_seqs;
+ private final String _title;
- private Chart( final List<MsaProperties> msa_props, final int initial_number_of_seqs ) {
+ private Chart( final List<MsaProperties> msa_props,
+ final int initial_number_of_seqs,
+ final boolean show_msa_qual,
+ final String title ) {
super();
_msa_props = msa_props;
+ _title = title;
_initial_number_of_seqs = initial_number_of_seqs;
+ _show_msa_qual = show_msa_qual;
setTitle( "msa compactor" );
setSize( 500, 400 );
setResizable( true );
seqs_gaps[ i ][ 0 ] = _initial_number_of_seqs - _msa_props.get( i ).getNumberOfSequences();
seqs_gaps[ i ][ 1 ] = ForesterUtil.roundToInt( _msa_props.get( i ).getGapRatio() * 100 );
}
- model.addData( seqs_gaps, "Gaps" );
- model.setSeriesLine( "Series " + "Gaps", true );
- model.setSeriesMarker( "Series " + "Gaps", false );
- final double[][] seqs_identity = new double[ _msa_props.size() ][ 2 ];
- for( int i = 0; i < _msa_props.size(); ++i ) {
- seqs_identity[ i ][ 0 ] = _initial_number_of_seqs - _msa_props.get( i ).getNumberOfSequences();
- seqs_identity[ i ][ 1 ] = ForesterUtil.roundToInt( _msa_props.get( i ).getAverageIdentityRatio() * 100 );
+ model.addData( seqs_gaps, "Gap ratio" );
+ model.setSeriesLine( "Series " + "Gap ratio", true );
+ model.setSeriesMarker( "Series " + "Gap ratio", false );
+ if ( _show_msa_qual ) {
+ final double[][] seqs_identity = new double[ _msa_props.size() ][ 2 ];
+ for( int i = 0; i < _msa_props.size(); ++i ) {
+ seqs_identity[ i ][ 0 ] = _initial_number_of_seqs - _msa_props.get( i ).getNumberOfSequences();
+ seqs_identity[ i ][ 1 ] = ForesterUtil
+ .roundToInt( _msa_props.get( i ).getAverageIdentityRatio() * 100 );
+ }
+ model.addData( seqs_identity, "mean MSA column identity" );
+ model.setSeriesLine( "Series " + "mean MSA column identity", true );
+ model.setSeriesMarker( "Series " + "mean MSA column identity", false );
}
- model.addData( seqs_identity, "Id" );
- model.setSeriesLine( "Series " + "Id", true );
- model.setSeriesMarker( "Series " + "Id", false );
final BoxCoordSystem coord = new BoxCoordSystem( model );
coord.setUnitFont( coord.getUnitFont().deriveFont( 20.0f ) );
coord.setXAxisUnit( "Number of Sequences" );
coord.setPaintGrid( true );
coord.setYAxisUnit( "MSA Length" );
- _chart_panel = new ChartPanel( model, "msa compactor" );
+ _chart_panel = new ChartPanel( model, _title );
_chart_panel.setCoordSystem( coord );
final MultiScatterChartRenderer renderer = new MultiScatterChartRenderer( coord, model );
renderer.setAllowBuffer( false );
return _chart_panel;
}
- public static void display( final List<MsaProperties> msa_props, final int initial_number_of_seqs ) {
+ public static void display( final List<MsaProperties> msa_props,
+ final int initial_number_of_seqs,
+ final boolean show_msa_qual,
+ final String title ) {
try {
UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
}
catch ( final Exception e ) {
e.printStackTrace();
}
- final Chart chart = new Chart( msa_props, initial_number_of_seqs );
+ final Chart chart = new Chart( msa_props, initial_number_of_seqs, show_msa_qual, title );
chart.setVisible( true );
}
catch ( final Exception e ) {
e.printStackTrace();
}
- final Chart temp = new Chart( null, 0 );
+ final Chart temp = new Chart( null, 0, true, "title" );
temp.setVisible( true );
}
}
final private static NumberFormat NF_4 = new DecimalFormat( "#.####" );
private double _gap_ratio = -1;
//
- private final String _maffts_opts = "--auto";
+ private String _maffts_opts = "--auto";
private int _min_length = -1;
//
private DeleteableMsa _msa = null;
return _removed_seq_ids;
}
- public final void 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 List<String> to_remove_ids = new ArrayList<String>();
+ final List<MsaProperties> msa_props = new ArrayList<MsaProperties>();
for( final GapContribution gap_gontribution : stats ) {
to_remove_ids.add( gap_gontribution.getId() );
}
printTableHeader();
+ MsaProperties msa_prop = new MsaProperties( _msa, _report_aln_mean_identity );
+ msa_props.add( msa_prop );
+ printMsaProperties( "", msa_prop );
+ System.out.println();
int i = 0;
while ( MsaMethods.calcGapRatio( _msa ) > mean_gapiness ) {
final String id = to_remove_ids.get( i );
final Sequence deleted = _msa.deleteRow( id, true );
_removed_seqs.add( deleted );
removeGapColumns();
- if ( ( ( _step > 0 ) && ( ( ( i + 1 ) % _step ) == 0 ) )
- || ( MsaMethods.calcGapRatio( _msa ) <= mean_gapiness ) ) {
- printMsaStatsWriteOutfileAndRealign( _realign, id );
+ if ( isPrintMsaStatsWriteOutfileAndRealign( i ) || ( MsaMethods.calcGapRatio( _msa ) <= mean_gapiness ) ) {
+ msa_prop = printMsaStatsWriteOutfileAndRealign( _realign, id );
+ msa_props.add( msa_prop );
+ System.out.println();
}
- else {
- final MsaProperties msa_prop = new MsaProperties( _msa, _report_aln_mean_identity );
+ else if ( isPrintMsaStats( i ) ) {
+ msa_prop = new MsaProperties( _msa, _report_aln_mean_identity );
+ msa_props.add( msa_prop );
printMsaProperties( id, msa_prop );
+ System.out.println();
}
- System.out.println();
++i;
}
if ( _removed_seqs_out_base != null ) {
final String msg = writeAndAlignRemovedSeqs();
+ System.out.println();
System.out.println( msg );
}
+ return msa_props;
}
- public void removeViaLength( final int length ) throws IOException, InterruptedException {
+ public List<MsaProperties> removeViaLength( final int length ) throws IOException, InterruptedException {
final GapContribution stats[] = calcGapContribtionsStats( _norm );
final List<String> to_remove_ids = new ArrayList<String>();
+ final List<MsaProperties> msa_props = new ArrayList<MsaProperties>();
for( final GapContribution gap_gontribution : stats ) {
to_remove_ids.add( gap_gontribution.getId() );
}
printTableHeader();
+ MsaProperties msa_prop = new MsaProperties( _msa, _report_aln_mean_identity );
+ msa_props.add( msa_prop );
+ printMsaProperties( "", msa_prop );
+ System.out.println();
int i = 0;
while ( _msa.getLength() > length ) {
final String id = to_remove_ids.get( i );
final Sequence deleted = _msa.deleteRow( id, true );
_removed_seqs.add( deleted );
removeGapColumns();
- if ( ( ( _step > 0 ) && ( ( ( i + 1 ) % _step ) == 0 ) ) || ( _msa.getLength() <= length ) ) {
- printMsaStatsWriteOutfileAndRealign( _realign, id );
+ if ( isPrintMsaStatsWriteOutfileAndRealign( i ) || ( _msa.getLength() <= length ) ) {
+ msa_prop = printMsaStatsWriteOutfileAndRealign( _realign, id );
+ msa_props.add( msa_prop );
+ System.out.println();
+ }
+ else if ( isPrintMsaStats( i ) ) {
+ msa_prop = new MsaProperties( _msa, _report_aln_mean_identity );
+ printMsaProperties( id, msa_prop );
+ msa_props.add( msa_prop );
+ System.out.println();
}
- final MsaProperties msa_prop = new MsaProperties( _msa, _report_aln_mean_identity );
- printMsaProperties( id, msa_prop );
- System.out.println();
++i;
}
if ( _removed_seqs_out_base != null ) {
final String msg = writeAndAlignRemovedSeqs();
+ System.out.println();
System.out.println( msg );
}
+ return msa_props;
}
- public final void removeWorstOffenders( final int to_remove ) throws IOException, InterruptedException {
+ public final List<MsaProperties> removeWorstOffenders( final int to_remove ) throws IOException,
+ InterruptedException {
final GapContribution stats[] = calcGapContribtionsStats( _norm );
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 ) {
to_remove_ids.add( stats[ j ].getId() );
_removed_seq_ids.add( stats[ j ].getId() );
}
printTableHeader();
+ MsaProperties msa_prop = new MsaProperties( _msa, _report_aln_mean_identity );
+ msa_props.add( msa_prop );
+ printMsaProperties( "", msa_prop );
+ System.out.println();
for( int i = 0; i < to_remove_ids.size(); ++i ) {
final String id = to_remove_ids.get( i );
_removed_seq_ids.add( id );
_removed_seqs.add( deleted );
removeGapColumns();
if ( isPrintMsaStatsWriteOutfileAndRealign( i ) || ( i == ( to_remove_ids.size() - 1 ) ) ) {
- printMsaStatsWriteOutfileAndRealign( _realign, id );
+ msa_prop = printMsaStatsWriteOutfileAndRealign( _realign, id );
+ msa_props.add( msa_prop );
System.out.println();
}
else if ( isPrintMsaStats( i ) ) {
- final MsaProperties msa_prop = new MsaProperties( _msa, _report_aln_mean_identity );
+ msa_prop = new MsaProperties( _msa, _report_aln_mean_identity );
+ msa_props.add( msa_prop );
printMsaProperties( id, msa_prop );
System.out.println();
}
}
if ( _removed_seqs_out_base != null ) {
final String msg = writeAndAlignRemovedSeqs();
+ System.out.println();
System.out.println( msg );
}
+ return msa_props;
}
public final List<MsaProperties> chart( final int step, final boolean realign, final boolean norm )
to_remove_ids.add( gap_gontribution.getId() );
}
printTableHeader();
- int i = 0;
final int x = ForesterUtil.roundToInt( _msa.getNumberOfSequences() / 20.0 );
MsaProperties msa_prop = new MsaProperties( _msa, _report_aln_mean_identity );
msa_props.add( msa_prop );
printMsaProperties( "", msa_prop );
System.out.println();
+ int i = 0;
while ( _msa.getNumberOfSequences() > x ) {
final String id = to_remove_ids.get( i );
_msa.deleteRow( id, false );
}
private final boolean isPrintMsaStats( final int i ) {
- return ( ( _step_for_diagnostics < 2 ) || ( ( ( i + 1 ) % _step_for_diagnostics ) == 0 ) );
+ return ( ( ( _step < 2 ) && ( _step_for_diagnostics < 2 ) ) || ( ( _step_for_diagnostics > 0 ) && ( ( ( i + 1 ) % _step_for_diagnostics ) == 0 ) ) );
}
private final boolean isPrintMsaStatsWriteOutfileAndRealign( final int i ) {
- return ( ( _step < 2 ) || ( ( ( i + 1 ) % _step ) == 0 ) );
+ return ( ( ( _step < 2 ) && ( _step_for_diagnostics < 2 ) ) || ( ( _step > 0 ) && ( ( ( i + 1 ) % _step ) == 0 ) ) );
}
public final void setGapRatio( final double gap_ratio ) {
_report_aln_mean_identity = report_aln_mean_identity;
}
- final public String writeMsa( final File outfile, final MSA_FORMAT format, final String suffix ) throws IOException {
+ final public String writeMsa( final File outfile ) throws IOException {
final Double gr = MsaMethods.calcGapRatio( _msa );
final String s = outfile + "_" + _msa.getNumberOfSequences() + "_" + _msa.getLength() + "_"
+ ForesterUtil.roundToInt( gr * 100 );
- writeMsa( _msa, s + suffix, format );
+ writeMsa( _msa, s + obtainSuffix(), _output_format );
return s;
}
final StringBuilder msg = new StringBuilder();
final String n = _removed_seqs_out_base + "_" + _removed_seqs.size() + ".fasta";
SequenceWriter.writeSeqs( _removed_seqs, new File( n ), SEQ_FORMAT.FASTA, 100 );
- msg.append( "wrote " + _removed_seqs.size() + " removed sequences to " + " to \"" + n + "\"" );
+ msg.append( "wrote " + _removed_seqs.size() + " removed sequences to " + "\"" + n + "\"" );
if ( _realign ) {
final MsaInferrer mafft = Mafft.createInstance( _path_to_mafft );
final List<String> opts = new ArrayList<String>();
final Double gr = MsaMethods.calcGapRatio( removed_msa );
String s = _removed_seqs_out_base + "_" + removed_msa.getNumberOfSequences() + "_"
+ removed_msa.getLength() + "_" + ForesterUtil.roundToInt( gr * 100 );
- String suffix = "";
- if ( _output_format == MSA_FORMAT.FASTA ) {
- suffix = ".fasta";
- }
- else if ( _output_format == MSA_FORMAT.PHYLIP ) {
- suffix = ".aln";
- }
+ final String suffix = obtainSuffix();
s += suffix;
writeMsa( removed_msa, s, _output_format );
msg.append( ", and as MSA of length " + removed_msa.getLength() + " to \"" + s + "\"" );
return msg.toString();
}
+ private String obtainSuffix() {
+ if ( _output_format == MSA_FORMAT.FASTA ) {
+ return ".fasta";
+ }
+ else if ( _output_format == MSA_FORMAT.PHYLIP ) {
+ return ".aln";
+ }
+ return "";
+ }
+
final int calcNonGapResidues( final Sequence seq ) {
int ng = 0;
for( int i = 0; i < seq.getLength(); ++i ) {
}
private final void printMsaProperties( final String id, final MsaProperties msa_properties ) {
- System.out.print( ForesterUtil.pad( id, _longest_id_length, ' ', false ) );
- System.out.print( "\t" );
- final StringBuilder sb = msaPropertiesAsSB( msa_properties );
- System.out.print( sb );
+ if ( ( _step < 2 ) || ( _step_for_diagnostics < 2 ) ) {
+ System.out.print( ForesterUtil.pad( id, _longest_id_length, ' ', false ) );
+ System.out.print( "\t" );
+ }
+ System.out.print( msaPropertiesAsSB( msa_properties ) );
System.out.print( "\t" );
}
return sb;
}
- final private void printMsaStatsWriteOutfileAndRealign( final boolean realign, final String id )
+ final private MsaProperties printMsaStatsWriteOutfileAndRealign( final boolean realign, final String id )
throws IOException, InterruptedException {
if ( realign ) {
realignWithMafft();
printMsaProperties( id, msa_prop );
final String s = writeOutfile();
System.out.print( "-> " + s + ( realign ? "\t(realigned)" : "" ) );
+ return msa_prop;
}
final private void realignWithMafft() throws IOException, InterruptedException {
_msa = DeleteableMsa.createInstance( mafft.infer( _msa.asSequenceList(), opts ) );
}
+ public final void setMafftOptions( final String maffts_opts ) {
+ _maffts_opts = maffts_opts;
+ }
+
final private void removeGapColumns() {
_msa.deleteGapOnlyColumns();
}
}
private final String writeOutfile() throws IOException {
- final String s = writeMsa( _out_file_base, MSA_FORMAT.PHYLIP, ".aln" );
- //writeMsa( _out_file_base, MSA_FORMAT.FASTA, ".fasta" );
+ final String s = writeMsa( _out_file_base );
return s;
}
}
private final void printTableHeader() {
- System.out.print( ForesterUtil.pad( "Id", _longest_id_length, ' ', false ) );
- System.out.print( "\t" );
+ if ( ( _step < 2 ) || ( _step_for_diagnostics < 2 ) ) {
+ System.out.print( ForesterUtil.pad( "Id", _longest_id_length, ' ', false ) );
+ System.out.print( "\t" );
+ }
System.out.print( "Seqs" );
System.out.print( "\t" );
System.out.print( "Length" );