Skip to content

Commit

Permalink
test_get_phylomarkers.t v2022-11-20 runs 24 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vinuesa committed Nov 21, 2022
1 parent ebde9fb commit 91df9bc
Showing 1 changed file with 29 additions and 26 deletions.
55 changes: 29 additions & 26 deletions test_get_phylomarkers.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# version 2021-09-19
# version 2022-11-20
use strict;
use warnings;
use Test::More tests => 22;
use Test::More tests => 24;

use lib "lib";
use lib "lib/perl/bioperl-1.5.2_102/";
Expand All @@ -21,10 +21,10 @@ ok( eval{ `perl ./concat_alignments.pl 2>&1` } =~ /list of alignment/ , 'concat_
ok( eval{ `perl ./convert_aln_format_batch_bp.pl` } =~ /Usage:/ , 'convert_aln_format_batch_bp.pl' );

# test 5
ok( eval{ `perl ./popGen_summStats.pl` } =~ /usage/ , 'popGen_summStats.pl' );
ok( eval{ `perl ./pal2nal.pl 2>&1` } =~ /Usage:/ , 'pal2nal.pl' );

# test 6
ok( eval{ `perl ./pal2nal.pl 2>&1` } =~ /Usage:/ , 'pal2nal.pl' );
ok( eval{ `perl ./popGen_summStats.pl` } =~ /usage/ , 'popGen_summStats.pl' );

# test 7
ok( eval{ `perl ./remove_uninformative_sites_from_aln.pl -h 2>&1` } =~ /Removes/ , 'remove_uninformative_sites_from_aln.pl' );
Expand All @@ -39,48 +39,51 @@ ok( eval{ `perl ./run_parallel_cmmds.pl` } =~ /usage/ , 'run_parallel_cmmds.pl'
# test 10
ok( eval{ `Rscript ./compute_suppValStas_and_RF-dist.R 2>&1` } =~ /Usage/ , 'compute_suppValStas_and_RF-dist.R' );


### Test Bash scripts
# test 11
ok( eval{ `bash ./estimate_pangenome_phylogenies.sh 2>&1` } =~ /PARS PARALLELIZATION/ , 'estimate_pangenome_phylogenies.sh' );
ok( eval{ `Rscript ./run_kdetrees.R 2>&1` } =~ /Execution/ , '/run_kdetrees.R' );

# test 12 keeps failing on Travis CI
# ok( eval{ `bash ./hcluster_pangenome_matrix.sh 2>&1` } =~ /synopsis/, 'hcluster_pangenome_matrix.sh' );
#ok( eval{ `bash ./hcluster_pangenome_matrix.sh` } =~ /synopsis/ , 'hcluster_pangenome_matrix.sh' );

### Test Bash scripts
# test 12
ok( eval{ `bash ./run_get_phylomarkers_pipeline.sh 2>&1` } =~ /INVOCATION/, 'run_get_phylomarkers_pipeline.sh' );
ok( eval{ `bash ./estimate_pangenome_phylogenies.sh 2>&1` } =~ /PARS PARALLELIZATION/ , 'estimate_pangenome_phylogenies.sh' );

# test 13
ok( eval{ `bash ./run_parallel_molecClock_test_with_paup.sh 2>&1` } =~ /OUTPUT/, 'run_parallel_molecClock_test_with_paup.sh' );
ok( eval{ `bash ./run_get_phylomarkers_pipeline.sh 2>&1` } =~ /INVOCATION/, 'run_get_phylomarkers_pipeline.sh' );

# test 14
ok( eval{ `bash ./run_pexec_cmmds.sh 2>&1` } =~ /example4/, 'run_pexec_cmmds.sh' );
ok( eval{ `bash ./run_parallel_molecClock_test_with_paup.sh 2>&1` } =~ /OUTPUT/, 'run_parallel_molecClock_test_with_paup.sh' );

# test 15
ok( eval{ `bash ./run_pexec_cmmds.sh 2>&1` } =~ /example4/, 'run_pexec_cmmds.sh' );

# test 16
ok( eval{ `bash ./run_test_suite.sh 2>&1` } =~ /LAUNCHING THE CONTAINER/, 'run_test_suite.sh' );

# test 17; which calls check_bash_version, to ensure that we are running with bash >= 4.3
ok( eval{ `bash ./run_get_phylomarkers_pipeline.sh -V 2>&1` } =~ /clustalo/, 'run_get_phylomarkers_pipeline.sh' );


### Test runs of main scripts
# test 16 default run on DNA sequence ...
ok( eval{ `cd test_sequences/core_genome && ../../run_get_phylomarkers_pipeline.sh -R 1 -t DNA | grep "wrote file gene_trees" && rm -rf get_phylomarkers_run_*` }, 'run_get_phylomarkers_pipeline.sh -R 1 -t DNA' );
# test 18 default run on DNA sequence ...
ok( eval{ `cd test_sequences/core_genome && ../../run_get_phylomarkers_pipeline.sh -R 1 -t DNA -n 10 | grep "wrote file gene_trees" && rm -rf get_phylomarkers_run_*` }, 'run_get_phylomarkers_pipeline.sh -R 1 -t DNA' );

# test 17 IQT run on proteins sequence ...
ok( eval{ `cd test_sequences/core_genome && ../../run_get_phylomarkers_pipeline.sh -R 1 -t PROT -k 1.2 -m 0.6 | grep "wrote file" && rm -rf get_phylomarkers_run_*` }, 'run_get_phylomarkers_pipeline.sh -R 1 -t PROT -k 1.2 -m 0.6' );
# test 19 IQT run on proteins sequence ...
ok( eval{ `cd test_sequences/core_genome && ../../run_get_phylomarkers_pipeline.sh -R 1 -t PROT -k 1.2 -m 0.6 -n 10 | grep "wrote file" && rm -rf get_phylomarkers_run_*` }, 'run_get_phylomarkers_pipeline.sh -R 1 -t PROT -k 1.2 -m 0.6' );

# test 18 Thorough FastTree searching and molecular clock analysis on DNA sequences using 10 cores and increasing k stringency
# test 20 Thorough FastTree searching and molecular clock analysis on DNA sequences using 10 cores and increasing k stringency
ok( eval{ `cd test_sequences/core_genome && ../../run_get_phylomarkers_pipeline.sh -R 1 -t DNA -A F -k 1.2 -m 0.7 -s 20 -l 12 -T high -K -M HKY -q 0.95 -n 10 | grep "wrote file phylogenetic_attributes_of_top"` }, 'run_get_phylomarkers_pipeline.sh -R 1 -t DNA -A F -k 1.2 ...' );

# test 19 FastTree thorough searching on a protein dataset with moderate average bipartition support
ok( eval{ `cd test_sequences/core_genome && ../../run_get_phylomarkers_pipeline.sh -R 1 -t PROT -A F -T high -m 0.6 | grep "wrote file concat_nonRecomb_KdeFilt_protAlns_FTlgG"` }, 'run_get_phylomarkers_pipeline.sh -R 1 -t PROT -A F ...' );
# test 21 FastTree thorough searching on a protein dataset with moderate average bipartition support
ok( eval{ `cd test_sequences/core_genome && ../../run_get_phylomarkers_pipeline.sh -R 1 -t PROT -A F -T high -m 0.6 -n 10 | grep "wrote file concat_nonRecomb_KdeFilt_protAlns_FTlgG"` }, 'run_get_phylomarkers_pipeline.sh -R 1 -t PROT -A F ...' );

# test 20 Run in population-genetics mode (generates a table with descritive statistics for DNA-polymorphisms) with K2P model
ok( eval{ `cd test_sequences/core_genome && ../../run_get_phylomarkers_pipeline.sh -R 2 -t DNA -S K2P | grep "wrote file polymorphism_descript_stats.tab"` }, 'run_get_phylomarkers_pipeline.sh -R 2 -t DNA -S K2P' );
# test 22 Run in population-genetics mode (generates a table with descritive statistics for DNA-polymorphisms) with K2P model
ok( eval{ `cd test_sequences/core_genome && ../../run_get_phylomarkers_pipeline.sh -R 2 -t DNA -S K2P -n 10 | grep "wrote file polymorphism_descript_stats.tab"` }, 'run_get_phylomarkers_pipeline.sh -R 2 -t DNA -S K2P' );

# test 21 estimate a ML pan-genome tree from the pan-genome matrix, using 2 independent IQT runs and UFBoot
ok( eval{ `cd test_sequences/pan_genome && ../../estimate_pangenome_phylogenies.sh -f pangenome_matrix_t0.fasta -r 2 -S UFBoot | grep "done!"` }, 'estimate_pangenome_phylogenies.sh -r 2 -S UFBoot ...' );
# test 23 estimate a ML pan-genome tree from the pan-genome matrix, using 2 independent IQT runs and UFBoot
ok( eval{ `cd test_sequences/pan_genome && ../../estimate_pangenome_phylogenies.sh -f pangenome_matrix_t0.fasta -r 2 -S UFBoot -n 10 | grep "done!"` }, 'estimate_pangenome_phylogenies.sh -r 2 -S UFBoot ...' );

# test 22 estimate a PARS pan-genome tree with bootstrapping; 50 bootstrap replicates divided on 10 core (5 reps / core)
ok( eval{ `cd test_sequences/pan_genome && ../../estimate_pangenome_phylogenies.sh -c PARS -R 3 -i pangenome_matrix_t0.phylip -n 10 -b 5 -j 1 -t 1 | grep "seq_key"` }, 'estimate_pangenome_phylogenies.sh -c PARS -R 3 ...' );
# test 24 estimate a PARS pan-genome tree with bootstrapping; 50 bootstrap replicates divided on 10 core (5 reps / core)
ok( eval{ `cd test_sequences/pan_genome && ../../estimate_pangenome_phylogenies.sh -c PARS -R 3 -i pangenome_matrix_t0.phylip -n 10 -b 5 -j 1 -t 1 -n 10 | grep "seq_key"` }, 'estimate_pangenome_phylogenies.sh -c PARS -R 3 ...' );

# test 24, run hcluster_pangenome_matrix.sh
#ok( eval{ `cd test_sequences/pan_genome && ../../hcluster_pangenome_matrix.sh -i pangenome_matrix_t0.tab -T "Pan-genome tree" -a ward.D2 -d gower -O pdf -A 'NULL,45' -X 0.8 -s sil | grep 'hcluster_pangenome_matrix_script'` }, ' hcluster_pangenome_matrix.sh -i pangenome_matrix_t0.tab ...' );

0 comments on commit 91df9bc

Please sign in to comment.