# a Jrna template file

package jrna_template;

use Jrna;
use Jrna_objs;
use strict;
use warnings;


my $data = Jrna->input (
			"data/evan/Evanioidea.0.05.Nex",		# full path to input file
			"data/evan/Evaniodea.index.0.02.txt",	# full path to stem file
			"evan",					# model "name"
			59					# number taxa (n-1)
		);


my $all_data = slice->new;    
$all_data->blocks(0..211);
$all_data->taxa(0..59);

my $COI = slice->new;  
$COI->blocks(0);
$COI->taxa(0..59);

my $rna28S = slice->new;    
$rna28S->blocks(1..113);
$rna28S->taxa(0..59);

my $rna16S = slice->new;    
$rna16S->blocks(114..211);
$rna16S->taxa(0..59);

my $rna16S_and_rna18S = slice->new;   
$rna16S_and_rna18S->blocks(1..211);
$rna16S_and_rna18S->taxa(0..59);

my $test = slice->new;    
$test->blocks(1..20);
$test->taxa(0..59);

# end partitions 

my $my_data = $all_data;			# point to the slice/partion you want to use 

$data->init();				# required
$data->init_stems($my_data);		# required for output using stems (nearly everything)

#$data->out_bayes($my_data, 0);

#&Jrna::slice_prune_uninformative_taxa($my_data);

#my @alphabet = qw/A C G U - ?/;
#my @exclude = qw/- ?/;

#$data->out_column_stats($my_data,  	
#									'-exclude' => \@exclude,
#									'-offset' => 0,
#									'-type' => 'percent',
#									'-header' => 'true',
#								'-blockgaps' => 'true'	
#							);

#$data->out_bayes($my_data, 0);



#&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


# a nice example of how to generate an output file, this maximizes length of output to 120 chars
#&Jrna::out_mx(*STDOUT, $my_data, 1, 2, 120, 1, 1, " ", 0, 1, 2, 20, 2, 1, 0, 0);

#&Jrna::out_mx(*STDOUT, $my_data, 1, 2, 162, 1, 1, " ", 0, 1, 0, 20, 0, 1, 0, 0);

#$data->out_nexus($my_data, 1);
#$data->out_tnt($my_data, 0);

#$data->out_fasta($my_data, 500, 1, 0, 1 );

#$data->out_phylip($my_data, 0);
#$data->out_poy($my_data, 0);
#$data->out_inaase($my_data, 1);

#$data->out_phase($my_data, 0, "ichs", 2); 

#$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__


