[GenABEL-dev] moving filevector and iterator to DatABEL
Maksim Struchalin
m.v.struchalin at mail.ru
Thu Nov 14 18:06:53 CET 2013
Hi All,
I would like to start discussing a plan of moving filevector and
iterator libraries in DatABEL. At the current version of GenABEL, the
code of iterator and filevector is copied to the body of package and
compiled separetly from DatABEL (like DataABEL does not exists at all).
It makes some troubles (e.g. for impute2databel). I think we can
separate this code from GenABEL and it will be quite easy.
I tried to do it, but I got in some problems. As I see, iterator is
called from three GenABEL functions: impute2databel, qtscore and
summary.snp.data. Two months ago Lennart changed impute2databel in a way
that it calls iterator from DatABEL. I see that it works more or less
good now (at least on my computer). But qtscore and summary.snp.data use
a special version of iterator which is implemented in GenABEL itself
(called iteratorGA). I compared iterators from DatABEL and GenABEL and
they are quite different. So, as I see, the main problem of moving
itarator to DatABEL is in these two function only which should be
changed in a way that they use iterator implemented in DatABEL.
Another issue is compatibility of impute2databel. As I understand, the
current implementation of impute2databel (which call iterator from
DatABEL) is not compatible with mac/win. Perhaps the problem is in
absense of R_init_DatABEL.cpp file in DatABEL (manual "Writing R
Extensions, Registering native routines"). This file conatins some code
which tells R about the functions in DatABEL (a function iterator in our
case) which are gonna be used from other pakcages. We only need to
implement it in DatABEL (I did it and it works for me).
I do not know how these changes might affect other *ABEL packages: I see
that MixABEL, TestABEL use its own iterators. But, I expect that it does
not touch them.
So, I propose:
1) Make a test on mac/win and see how R_init_DatABEL.cpp solve the
compatibility issue.
2) Change qtscore and summary.snp.data in a way that it calls iterator
which is implemented in DatABEL.
3) Test everything and see that it works.
It seems easy to do. The only difficulty which I see is changing qtscore
and summary.snp.data. For myself, I see a routine work with spending 95%
time for understanding what is written there. If some of you can consult
me here, it would accelerate everything (for example: what was the
reason for creating iteratorGA?)
What do you think about the plan? Do you see any pitfalls? Would like to
contribute :-)?
Small remark: The name iterator is already used in stl C++ library
(compliler told it to me when I was implementing R_init_DatABEL.cpp in
DatABEL). So, we need to change it to something like "iteratorDA".
best,
Maksim
More information about the genabel-devel
mailing list