Just a heads up, we don't have a huge amount of space on this machine, ~750 GB for the git repos. We can include some data in the projects, but really big datasets will need to remain elsewhere. For anyone new to Git, this is a fairly good place to start: http://gitref.org/index.html Documentation for Gitlab is available here: http://doc.gitlab.com/

Commit 0261148a authored by Khalid Kunji's avatar Khalid Kunji
parents 044dba13 fdc86dbb
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -16,6 +16,6 @@ target_link_libraries(GIGI Mersenne)
set(CMAKE_BUILD_TYPE Release)
#endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra -static")
#set(CMAKE_CXX_FLAGS "-Wall -Wextra -static")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
......@@ -6,6 +6,6 @@ add_executable(gigimerge GIGIMerge.cpp)
set(CMAKE_BUILD_TYPE Release)
#endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
#set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
......@@ -120,7 +120,7 @@ inline bool mergeColumnsLine(std::string& line, bool first, std::ofstream& fout)
}
index++;
}
for (; index < line.length(); index++) {
for (; index < static_cast<int>(line.length()); index++) {
fout << line[index];
}
return fout.good();
......
No preview for this file type
No preview for this file type
......@@ -6,6 +6,6 @@ add_executable(gigisplit GIGISplit.cpp)
set(CMAKE_BUILD_TYPE Release)
#endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
#set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
......@@ -45,7 +45,7 @@ static bool getParameters(const char* file, std::string* param) {
if (fin.good()) {
success = true;
for (int i = 0; success && i < 8; i++) {
success = std::getline(fin, param[i]);
success = static_cast<bool> (std::getline(fin, param[i]));
}
fin.close();
}
......@@ -98,8 +98,8 @@ static unsigned int* getPartitionSizes(unsigned int variants, unsigned int parti
std::cout << remainder << " partition(s) of size " << (size + 1) << " and ";
}
std::cout << (partitions - remainder) << " partition(s) of size " << size << std::endl;
for (int i = 0; i < partitions; i++) {
sizes[i] = (i < remainder) ? size + 1 : size;
for (int i = 0; i < static_cast<int> (partitions); i++) {
sizes[i] = (i < static_cast<int> (remainder)) ? size + 1 : size;
}
return sizes;
}
......@@ -115,23 +115,25 @@ static std::string getFileName(const char* prefix, int id, const char* extension
//Splits file by rows.
static bool splitFileByRows(const char* inputFile, unsigned int* partitions, unsigned int partitionCount, bool* validVariants, const char* output, const char* extension, bool hasHeader) {
bool success = true, written;
bool success = true;
bool written = true;
std::ifstream fin(inputFile, std::ifstream::in);
std::string header, line;
if (fin.good()) {
if (hasHeader) {
success = getline(fin, header);
success = static_cast<bool> (getline(fin, header));
}
for (int i = 0, v = 0; success && i < partitionCount; i++) {
for (int i = 0, v = 0; success && i < static_cast<int>(partitionCount); i++) {
std::ofstream fout(getFileName(output, i, extension).c_str());
if (fout.good()) {
if (hasHeader) {
success = written = fout << header << std::endl;
success = written = static_cast<bool> (fout << header << std::endl);
}
for (int j = 0; success && j < partitions[i]; v++) {
if (success = getline(fin, line)) {
for (int j = 0; success && j < static_cast<int>(partitions[i]); v++) {
if ( ( success = static_cast<bool>(getline(fin, line)) ) ) {
if (validVariants[v]) {
success = written = fout << line << std::endl;
written = static_cast<bool> (fout << line << std::endl);
success = written;
j++;
}
}
......@@ -164,7 +166,7 @@ static std::ofstream* createOutputFiles(const char* output, const char* extensio
if (fout != NULL) {
bool success = true;
int i;
for (i = 0; success && i < partitionCount; i++) {
for (i = 0; success && i < static_cast<int>(partitionCount); i++) {
fout[i].open(getFileName(output, i, extension).c_str());
success = fout[i].good();
}
......@@ -196,11 +198,11 @@ static inline bool splitLineByColumns(std::string& line, unsigned int* partition
int idSize = line.length() - 4 * variants;
int vIndex = idSize;
int i, v;
for (i = 0, v = 0; success && i < partitionCount; i++) {
for (i = 0, v = 0; success && i < static_cast<int>(partitionCount); i++) {
for (int j = 0; j < idSize; j++) {
fout[i] << line[j];
}
for (int j = 0; j < partitions[i]; v++) {
for (int j = 0; j < static_cast<int>(partitions[i]); v++) {
if (validVariants[v]) {
fout[i] << line[vIndex++];
fout[i] << line[vIndex++];
......@@ -261,7 +263,7 @@ static bool splitGenotypeFile(const char* inputFile, unsigned int* partitions, u
static bool createParameterFile(std::string* param, int partitionCount, const char* output, const char* extension) {
bool success = true;
for (unsigned int i = 0; success && i < partitionCount; i++) {
for (int i = 0; success && i < static_cast<int>(partitionCount); i++) {
std::ofstream fout(getFileName(output, i, extension).c_str());
if (fout.good()) {
fout << param[PARAMETER_PED_FILE] << std::endl;
......
No preview for this file type
No preview for this file type
File mode changed from 100644 to 100755
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment