# a Jrna template file

package jrna_template;

use Jrna;
use Jrna_objs;
use strict;
use warnings;


my $data = Jrna->input (
			"data/moth/The.Motherlode.01.Nex",		# full path to input file
			"data/moth/The_Motherlode_index.02.txt",	# full path to stem file
			"moth",						# model "name"
			248						# number taxa (n-1)
		);

#template for generating mixed model analysis

my $slice = slice->new;    # now everything following this must refer to $slice, so:
$slice->blocks(0..321);
$slice->taxa(0..248);
#$slice->taxa(0..15, 17..36, 40..82, 86..121, 123..139, 141..151, 153..168, 170..181, 183..185, 187..235, 237..239, 242..246);	# taxa with 28S data

# end partitions

my $my_data = $slice;			# point to 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, 		# a *percentage* cutoff, blocks without this perecentage of data rows will be excluded
#		'-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, 0 includes all data
#		'-use_prealigned' => 1,			# use the prealigned flag on prealignable blocks (unbracketed blocks where there are no gaps in any sequence)
#		'-strip_bracketed_gaps' => 1,	# strip gaps from bracketed blocks
#		'-use_deletegapsfrominput' => 1,	# place a '-deletegapsfrominput in front of *all* blocks (overrides -strip_bracketed_gaps), likely safest now, but note alignment consequences
#		'-fileroot' => 'ency'
#);

#$data->out_inaase($my_data, 1);

#$data->out_phase($my_data, 2, "moth", 2);
#$data->out_bayes($my_data, 0);

#$data->out_rna_translate($my_data);
#$data->out_gde($my_data);

# methods that produce file-output:
#    	out_inaase(slice; correct data [0-no, 1-yes])
#    	*out_phylip(slice, stem mode)
#    	out_bayes(slice, stem mode)
#	out_poy(slice, stem mode, fileroot)
# 	out_phase(slice, stem mode, fileroot (text name for result files), output control file(s) [0-no; 1-single RNA6A; 2-multi mode])
#    	out_nexus(slice, stem mode)
#    	*out_tnt(slice, stem mode)
#    	out_rna_translate(slice)
#    	*out_web(slice, mode, interleave size, interleave)
#    	out_gde(slice)
#
# methods that produce screen output
#	descr_seq_length(slice)

1;

__END__


