2 package org.forester.application;
5 import java.io.FileInputStream;
6 import java.io.FileNotFoundException;
7 import java.io.IOException;
9 import org.forester.io.parsers.GeneralMsaParser;
10 import org.forester.msa.Msa;
11 import org.forester.msa.MsaMethods;
12 import org.forester.util.BasicDescriptiveStatistics;
13 import org.forester.util.CommandLineArguments;
14 import org.forester.util.DescriptiveStatistics;
16 public class msa_quality {
18 public static void main( final String args[] ) {
19 CommandLineArguments cla = null;
21 cla = new CommandLineArguments( args );
23 catch ( final Exception e ) {
24 // ForesterUtil.fatalError( PRG_NAME, e.getMessage() );
26 // if ( cla.isOptionSet( HELP_OPTION_1 ) || cla.isOptionSet( HELP_OPTION_2 ) || ( args.length == 0 ) ) {
30 final File in = cla.getFile( 0 );
33 msa = GeneralMsaParser.parse( new FileInputStream( in ) );
35 catch ( final FileNotFoundException e ) {
36 // TODO Auto-generated catch block
39 catch ( final IOException e ) {
40 // TODO Auto-generated catch block
45 final DescriptiveStatistics stats = new BasicDescriptiveStatistics();
46 for( int c = start; c <= end; ++c ) {
47 stats.addValue( MsaMethods.calculateIdentityRatio( msa, c ) );