Scripts/termlens

From TNT

Jump to: navigation, search

termlens
Author: Pablo Goloboff.
Version: 1.0.
For: not provided.
Arguments: not provided.
Example: not provided.
Script
Scripts may not be displaying correctly here at present, use the script from the provide file in the archive.


macro=; var : fullis besis thisis numt taxdone ; if ( !argnumber ) errmsg This script finds the taxa which increase tree length the most (reporting ties when they exist). You must specify which tree to use (as first arg.); end set fullis length [ %1 ] ; set besis 1000000000000 ; set numt ntrees+1 ; report -; sil = all ; loop 0 ntax

 progress #1 ntax Checking taxon #1... ; 
 progress = ; 
 if ( !isintree [ %1 #1 ] ) continue ; end
 copytree %1 ;
 pruntax 'numt' / #1 ; 
 set thisis length [ 'numt' ] ;
 keep 'numt' ; 
 if ( 'thisis' < 'besis' )
   set besis 'thisis' ;
   agroup =0 ; 
   set taxdone 0 ; 
   end
 if ( 'thisis' == 'besis' )
   agroup >0 #1 ;
   set taxdone ++ ; 
   end
 stop 

progress/; lquote [ ; sil - all ; report=; set besis 'fullis' - 'besis' ; quote The following 'taxdone' taxa save 'besis' steps if pruned (one at a time) from the tree: ; loop 0 ntax if ( !isinagroup [ 0 #1 ] ) continue ; end ; quote &32 $taxon #1 (#1); stop proc/;

Personal tools