Skip to content

Commit

Permalink
For compiling OmicOUT
Browse files Browse the repository at this point in the history
  • Loading branch information
avsmith committed Jun 7, 2017
1 parent 83ea783 commit 706764e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,7 @@
/lib/
/doc/*.aux
/doc/auto/
/OmicOUT/.deps/
/OmicOUT/.dirstamp
/OmicOUT/omicout-main.o
/omicout
18 changes: 12 additions & 6 deletions OmicOUT/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,14 @@ void statistics(float b, float SE, int AL_name_idx, int AR_name_idx, resultH &r

t=fabs(b/SE);

ptemp=erfc(t*one_oversqrt2);

if( t < 1.6)
{
t1=4.4-t;
ptemp=0.5-0.1*t1*t;
}
else
{
ptemp=erfc(t*one_oversqrt2);
}

result rdata;
Expand Down Expand Up @@ -229,21 +235,21 @@ int main(int argc, char *argv[] )

ifstream fp_allResults;
fp_allResults.open((source + ".dbin").c_str(),ios::in | ios::binary );
if(fp_allResults == 0)
if(!fp_allResults.is_open())
{
cout << "Error reading File "<< (source + ".dbin") << endl;
exit(1);
}
ifstream fp_InfoResults;
fp_InfoResults.open((source + ".ibin").c_str(),ios::in | ios::binary );
if(fp_InfoResults == 0)
if(!fp_InfoResults)
{
cout << "Error Creating File " << (source + ".ibin") << endl;
exit(1);
}
ofstream fp_sigResults;
fp_sigResults.open((dest + ".txt").c_str(),ios::out | ios::trunc);
if(fp_sigResults == 0)
if(!fp_sigResults)
{
cout << "Error Creating File "<< (dest + ".txt") << endl;
exit(1);
Expand Down Expand Up @@ -474,4 +480,4 @@ int main(int argc, char *argv[] )



}
}
5 changes: 4 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NOTE: This is not a recursive makefile. This file is to be included
# in the top Makefile.am

bin_PROGRAMS = omicabelnomm
bin_PROGRAMS = omicabelnomm omicout

oanomm_cpp = src/AIOwrapper.cpp src/Algorithm.cpp src/Utility.cpp
oanomm_headers = $(oanomm_cpp:.cpp=.h) src/Definitions.h
Expand All @@ -11,3 +11,6 @@ omicabelnomm_CPPFLAGS = $(AM_CPPFLAGS)
if USE_MPI
omicabelnomm_CPPFLAGS += -DUSE_MPI
endif

omicout_SOURCES = OmicOUT/main.cpp
omicout_CPPFLAGS = $(AM_CPPFLAGS)

0 comments on commit 706764e

Please sign in to comment.