Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/rcedgar/muscle into main
Browse files Browse the repository at this point in the history
  • Loading branch information
rcedgar committed May 28, 2022
2 parents 89d8d23 + 00617bc commit 6c60116
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
cd $GITHUB_WORKSPACE
ls -lh
cd src
make
make LDFLAGS2=-static
- name: Upload binary artifact
uses: actions/upload-artifact@v2
with:
Expand Down
5 changes: 1 addition & 4 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ endif

CXXFLAGS := $(CXXFLAGS) -O3 -fopenmp -ffast-math

LDFLAGS := $(LDFLAGS) -O3 -fopenmp -pthread -lpthread
ifeq ($(OS),Linux)
LDFLAGS += -static
endif
LDFLAGS := $(LDFLAGS) -O3 -fopenmp -pthread -lpthread ${LDFLAGS2}

HDRS := $(shell echo *.h)
OBJS := $(shell echo *.cpp | sed "-es/^/$(OS)\//" | sed "-es/ / $(OS)\//g" | sed "-es/\.cpp/.o/g")
Expand Down
2 changes: 1 addition & 1 deletion src/countsort.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CountSortMem
CountSortMem()
{
m_MaxValueCount = 0;
zero(m_Vecs, NVEC);
memset_zero(m_Vecs, NVEC);
}

void Free()
Expand Down
2 changes: 1 addition & 1 deletion src/ensemble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void Ensemble::SortMSA(MSA &M)
M.GetLabelToSeqIndex(Labels2, LabelToSeqIndex2);

char **szSeqsSorted = myalloc(char *, SeqCount);
zero(szSeqsSorted, SeqCount);
memset_zero(szSeqsSorted, SeqCount);
for (uint SeqIndex = 0; SeqIndex < SeqCount; ++SeqIndex)
{
const string &Label = Labels2[SeqIndex];
Expand Down
8 changes: 8 additions & 0 deletions src/gitver.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash

if [ ! -d ../.git ] ; then
if [ ! -f gitver.txt ] ; then
echo "0" > gitver.txt
fi
echo "Repo not found, git hash set to zero"
exit 0
fi

PATH=$PATH:/usr/bin

git describe --abbrev=6 --dirty --long --always \
Expand Down
2 changes: 1 addition & 1 deletion src/gitver.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
if exist gitver.txt (
echo gitver.txt found
) else (
echo 000 > gitver.txt
echo "-" > gitver.txt
)

if exist c:\cygwin64\bin\bash.exe (
Expand Down
2 changes: 1 addition & 1 deletion src/help.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"\n"
"Update ensemble by adding two sequences of digits to each replicate, digits\n"
"are column confidence (CC) values, e.g. \"73\" means CC=0.73, \"++\" is CC=1.0:\n"
" muscle -addconfseqs ensemble.efa -output ensemble_cc.efa\n"
" muscle -addconfseq ensemble.efa -output ensemble_cc.efa\n"
"\n"
"Calculate letter confidence (LC) values, -ref specifies the alignment to\n"
"compare against the ensemble (e.g. from -maxcc), output is in aligned\n"
Expand Down
2 changes: 1 addition & 1 deletion src/help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Convert FASTA to EFA, input has one filename per line:

Update ensemble by adding two sequences of digits to each replicate, digits
are column confidence (CC) values, e.g. "73" means CC=0.73, "++" is CC=1.0:
muscle -addconfseqs ensemble.efa -output ensemble_cc.efa
muscle -addconfseq ensemble.efa -output ensemble_cc.efa

Calculate letter confidence (LC) values, -ref specifies the alignment to
compare against the ensemble (e.g. from -maxcc), output is in aligned
Expand Down
11 changes: 6 additions & 5 deletions src/myutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ static char *GetThreadStr()
{
unsigned NewThreadStrCount = ThreadIndex + 4;
char **NewThreadStrs = myalloc(char *, NewThreadStrCount);
zero(NewThreadStrs, NewThreadStrCount);
memset_zero(NewThreadStrs, NewThreadStrCount);
if (g_ThreadStrCount > 0)
memcpy(NewThreadStrs, g_ThreadStrs, g_ThreadStrCount*sizeof(char *));
g_ThreadStrs = NewThreadStrs;
Expand Down Expand Up @@ -898,6 +898,8 @@ void Log(const char *Format, ...)

void Die_(const char *Format, ...)
{
va_list ArgList;
va_start(ArgList, Format);
#pragma omp critical
{
static bool InDie = false;
Expand All @@ -908,10 +910,7 @@ void Die_(const char *Format, ...)

if (g_fLog != 0)
setbuf(g_fLog, 0);
va_list ArgList;
va_start(ArgList, Format);
myvstrprintf(Msg, Format, ArgList);
va_end(ArgList);

fprintf(stderr, "\n\n");
Log("\n");
Expand Down Expand Up @@ -944,6 +943,7 @@ void Die_(const char *Format, ...)

exit(1);
}
va_end(ArgList);
}

void Warning_(const char *Format, ...)
Expand Down Expand Up @@ -2076,7 +2076,8 @@ void GetVersionString(string &s)
"T"
#endif
;

if (GIT_VER == 0)
GIT_VER = "-";
Ps(s, "%s %s.%s%s [%s]", PROGRAM_NAME, MY_VERSION, GetPlatform(), Flags, GIT_VER);
}

Expand Down
1 change: 0 additions & 1 deletion src/myutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ inline bool feq(double x, double y)
#define asserteq(x, y) assert(feq(x, y))
#define assertaeq(x, y) asserta(feq(x, y))

#define zero(a, n) memset((a), 0, (n)*sizeof(a[0]))
#define memset_zero(a, n) memset((a), 0, (n)*sizeof(a[0]))

void ResetRand(unsigned Seed);
Expand Down

0 comments on commit 6c60116

Please sign in to comment.