-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef LIBIQTREE2_FUN | ||
#define LIBIQTREE2_FUN | ||
|
||
#include <string> | ||
|
||
using namespace std; | ||
|
||
// Calculates the RF distance between two trees | ||
int calculate_RF_distance(const string& tree1, const string& tree2); | ||
|
||
// Generates a random phylogenetic tree | ||
void generate_random_tree_file(int numtaxa, int seed, string tree_gen_mode, string outfile); | ||
|
||
// perform phylogenetic analysis on the input alignment file | ||
void phylogenetic_analysis(string& align_file, int ncpus = 1); | ||
|
||
#endif /* LIBIQTREE2_FUN */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
# | ||
# Creates one static library from several. | ||
# | ||
# Usage: copy all your libs to a single directory and call this script. | ||
# | ||
if [[ $# -ne 2 ]]; then | ||
echo "Usage: unify-static-libs.sh output-name path-to-libs" | ||
exit 2 | ||
fi | ||
# Inputs | ||
LIBNAME=$1 | ||
LIBSDIR=$2 | ||
# Tmp dir | ||
OBJDIR=/tmp/unify-static-libs | ||
# Command to evaluate | ||
cmd="ar -crs $LIBNAME" | ||
mkdir -p ${OBJDIR} | ||
# Extract .o | ||
echo "Extracting objects to ${OBJDIR}..." | ||
for i in ${LIBSDIR}/*.a | ||
do | ||
echo $i | ||
mkdir -p ${OBJDIR}/$i | ||
ar --output ${OBJDIR}/$i -x $i | ||
cmd="${cmd} ${OBJDIR}/$i/*.o" | ||
done | ||
# Link objects into a single lib | ||
echo "Creating $LIBNAME from objects..." | ||
eval "$cmd" | ||
# ar -crs $LIBNAME $OBJDIR/*.o | ||
# Clean up | ||
# rm -rf ${OBJDIR} | ||
echo "Done." |