System.out.println();
System.out.println( PRG_NAME + "" );
System.out.println();
- System.out.println( " exmple: " );
+ System.out.println( " example: " );
System.out.println();
System.out
.println( "dom_dup \"HUMAN~[12]-2\" groups.txt RRMa_ALL_plus_RRMa_ee3_50_hmmalign_05_40_fme_gsdi.phylo.xml" );
public static void main( final String args[] ) {
try {
final CommandLineArguments cla = new CommandLineArguments( args );
- if ( cla.isOptionSet( HELP_OPTION_1 ) || cla.isOptionSet( HELP_OPTION_2 ) || ( cla.getNumberOfNames() != 3 ) ) {
+ if ( cla.isOptionSet( HELP_OPTION_1 ) || cla.isOptionSet( HELP_OPTION_2 ) || ( args.length < 2 ) ) {
printHelp();
System.exit( 0 );
}
}
}
- private static PhylogenyNode moveUp( final PhylogenyNode node, final double depth ) {
+ private static PhylogenyNode moveUpOLd( final PhylogenyNode node, final double depth ) {
PhylogenyNode n = node;
double current_depth = 0.0;
while ( current_depth < depth ) {
return n;
}
+ private static PhylogenyNode moveUp( final PhylogenyNode node, final double depth ) {
+ PhylogenyNode n = node;
+ PhylogenyNode prev = node;
+ while ( depth > n.calculateDistanceToRoot() ) {
+ prev = n;
+ n = n.getParent();
+ }
+ return prev;
+ }
+
private static void printHelp() {
ForesterUtil.printProgramInformation( PRG_NAME,
PRG_DESC,
System.out.println();
System.out.println( PRG_NAME + "" );
System.out.println();
- System.out.println( " exmple: " );
+ System.out.println( " example: " );
System.out.println();
- System.out
- .println( "dom_dup \"HUMAN~[12]-2\" groups.txt RRMa_ALL_plus_RRMa_ee3_50_hmmalign_05_40_fme_gsdi.phylo.xml" );
System.out.println();
System.out.println();
}
annotation.toPhyloXML( writer, level, my_ind );
}
}
- if ( getDomainArchitecture() != null ) {
- getDomainArchitecture().toPhyloXML( writer, level, my_ind );
- }
if ( ( getCrossReferences() != null ) && !getCrossReferences().isEmpty() ) {
writer.write( ForesterUtil.LINE_SEPARATOR );
writer.write( my_ind );
writer.write( my_ind );
PhylogenyDataUtil.appendClose( writer, PhyloXmlMapping.SEQUENCE_X_REFS );
}
+ if ( getDomainArchitecture() != null ) {
+ getDomainArchitecture().toPhyloXML( writer, level, my_ind );
+ }
writer.write( ForesterUtil.LINE_SEPARATOR );
writer.write( indentation );
PhylogenyDataUtil.appendClose( writer, PhyloXmlMapping.SEQUENCE );