Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more obvious warning when not in sequential phylip #34

Open
shchurch opened this issue Oct 12, 2017 · 1 comment
Open

more obvious warning when not in sequential phylip #34

shchurch opened this issue Oct 12, 2017 · 1 comment

Comments

@shchurch
Copy link
Collaborator

current warning is that taxa dont match up, difficult to sort out.

@shchurch
Copy link
Collaborator Author

In addition this code fails when there are spaces before the start of the phylip header:
sub _check_taxa_compatible {
my $tre = shift;
my $aln = shift;
my $R = Statistics::R->new();
my $utility_r_functions = get_utility_R_functions();
my $cmds = <<EOF;
.libPaths( c( .libPaths(), "/travis_R_lib") )
$utility_r_functions
tre <- read.tree("$tre")
dat <- read.delim("$aln",sep="\ ",stringsAsFactors =F)
datx <- dat[[1]]
tret <- tre[[2]]
se <- setequal(datx,tret)
se
EOF
my $r_out = $R->run($cmds);
if($r_out !
'TRUE') {
warn " constraint tree and alignment have some difference in taxa\n";
warn " please verify that all taxa names are exactly identical and \n";
die " present in both the alignment and constraint \n";
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant