[Genabel-commits] r785 - pkg/GenABEL/src/GAlib
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Sep 16 14:01:24 CEST 2011
Author: yurii
Date: 2011-09-16 14:01:24 +0200 (Fri, 16 Sep 2011)
New Revision: 785
Modified:
pkg/GenABEL/src/GAlib/convert_snp_merlin.cpp
pkg/GenABEL/src/GAlib/export_plink.cpp
pkg/GenABEL/src/GAlib/export_plink.h
pkg/GenABEL/src/GAlib/gwaa.c
Log:
small fixes to ensure cross-platform compilation
Modified: pkg/GenABEL/src/GAlib/convert_snp_merlin.cpp
===================================================================
--- pkg/GenABEL/src/GAlib/convert_snp_merlin.cpp 2011-09-16 11:30:28 UTC (rev 784)
+++ pkg/GenABEL/src/GAlib/convert_snp_merlin.cpp 2011-09-16 12:01:24 UTC (rev 785)
@@ -20,7 +20,6 @@
//STL
#include <vector>
-#include <vector>
#include <map>
#include <iterator>
Modified: pkg/GenABEL/src/GAlib/export_plink.cpp
===================================================================
--- pkg/GenABEL/src/GAlib/export_plink.cpp 2011-09-16 11:30:28 UTC (rev 784)
+++ pkg/GenABEL/src/GAlib/export_plink.cpp 2011-09-16 12:01:24 UTC (rev 785)
@@ -20,7 +20,7 @@
SEXP export_plink(SEXP Ids, SEXP Snpdata, SEXP Nsnps, SEXP NidsTotal, SEXP Coding, SEXP From, SEXP To,
SEXP Male, SEXP Traits, SEXP Pedfilename, SEXP Plink, SEXP Append)
{
- vector<unsigned short int> sex;
+ std::vector<unsigned short int> sex;
unsigned short int sx;
for(unsigned int i=0;i<((unsigned int) length(Male));i++) {
sx = INTEGER(Male)[i];
@@ -28,11 +28,11 @@
sex.push_back(sx);
}
- vector<std::string> ids;
+ std::vector<std::string> ids;
for(unsigned int i=0;i<((unsigned int) length(Ids));i++)
ids.push_back(CHAR(STRING_ELT(Ids,i)));
- vector<std::string> coding;
+ std::vector<std::string> coding;
for(unsigned int i=0;i<((unsigned int) length(Coding));i++)
coding.push_back(CHAR(STRING_ELT(Coding,i)));
@@ -93,7 +93,7 @@
//fileWoA << " x" << Letter0 << Letter1 << Genotype[0] << Genotype[1] << Genotype[2] << Genotype[3];
}
// end unwrap
- fileWoA << endl;
+ fileWoA << "\n";
}
//Rprintf("C\n");
fileWoA.close();
Modified: pkg/GenABEL/src/GAlib/export_plink.h
===================================================================
--- pkg/GenABEL/src/GAlib/export_plink.h 2011-09-16 11:30:28 UTC (rev 784)
+++ pkg/GenABEL/src/GAlib/export_plink.h 2011-09-16 12:01:24 UTC (rev 785)
@@ -1,9 +1,11 @@
#ifndef __export_plink_H__
#define __export_plink_H__
-#include <vector.h>
+#include <string>
#include <iostream>
#include <fstream>
+#include <sstream>
+#include <vector>
#include <math.h>
#include <Rdefines.h>
Modified: pkg/GenABEL/src/GAlib/gwaa.c
===================================================================
--- pkg/GenABEL/src/GAlib/gwaa.c 2011-09-16 11:30:28 UTC (rev 784)
+++ pkg/GenABEL/src/GAlib/gwaa.c 2011-09-16 12:01:24 UTC (rev 785)
@@ -1121,7 +1121,7 @@
{
int nsnps = (*Nsnps);
int nstra = (*Nstra);
- if (nstra!=1) return 100;
+ if (nstra!=1) return;
int nids = (*Nids);
int gt[nids];
int i, j, igt, i1=1;
More information about the Genabel-commits
mailing list