# exod ver 0.02

package jrna_template;

use Jrna;
use Jrna_objs;
use strict;
use warnings;

my $data = Jrna->input (
			"data/exod/Exodontiella_D2_00.02.Nex",		# full path to input file
			"data/exod/Exodontiella_index_0.00.txt",		# full path to stem file
			"exod",							# model "name"
			81							# number taxa (n-1)
		);

# define some data partitions
my $all_data = slice->new;
$all_data->blocks(0..119);
$all_data->taxa(0..81);

my $whart_slice = slice->new;
$whart_slice->blocks(0..62);
$whart_slice->taxa(0..32);

my $test_slice = slice->new;
$test_slice->blocks(0..119);
$test_slice->taxa(0..81);

my @excluded_taxa = (3, 9, 10, 11, 13, 17, 26,29, 30, 39,40,48, 50, 55..57, 65, 66, 68, 71, 76, 78, 79);
my @recoded_blocks = (112..119);

$whart_slice->remove('Taxa', @excluded_taxa);
$whart_slice->remove('Blocks', @recoded_blocks);

my $my_data = $test_slice;		# make a working copy of the slice/partion you want to use

$data->init();						# required
$data->init_stems($my_data);		# required for output using stems (nearly everything)

# &Jrna::mx_safenames();			# translate long taxon names to unique short ones
# $data->out_web($my_data, 1, 0);	# best to start with this one as a test

# $data->out_nexus($my_data, 0);
# $data->out_phylip($my_data, 0);
# $data->out_tnt($my_data, 0);

 $data->out_poy(
		'-slice' => $my_data,
		'-min_terminals' => 0, 				# NOTE NOT AS whole number here!!
		'-output_mode' => 1, 				# 0 - DO on all blocks; 1- DO on unbracketed, FSO on bracketed; 2- FSO on all blocks; 3- DO on all unbracketed; 4-DO on bracketed; FSO on unbracketed
		'-block_mode' => 0,					# see slice_stems for description
		'-use_prealigned' => 0,				# 0=false, 1=true
		'-strip_bracketed_gaps' => 1,		# strip gaps from bracketed blocks...0=false, 1=true
		'-use_deletegapsfrominput' => 0, 	# place a '-deletegapsfrominput in front of *all* blocks
		'-fileroot' => 'poybatch'
	);

# $data->out_phase($my_data, 0, "exod", 2);

#$data->out_bayes($my_data, 0);
#$data->out_rna_translate($my_data);
# $data->out_fasta($my_data, 80, 1, 1, 0);
#$data->out_gde($my_data);

1;

__END__


