[GenABEL-dev] Hardcoded paths in OmicABELnoMM's test.cpp

L.C. Karssen lennart at karssen.org
Mon Oct 27 22:16:27 CET 2014


On 27-10-14 22:11, Frank, Alvaro Jesus wrote:
> Which files? what do you mean hardcoded? the user already specifies the paths.

in checks/test.cpp, for example on lines 188--201:

    params.fnameOutFiles = "examples/results/normal";
    params.fnameAL = "examples/interactions/XL";
    params.fnameAR = "examples/interactions/XR";
    params.fnameY = "examples/interactions/Y";

    params.use_interactions = true;
    params.r = 2;
    params.limit_t = 50;
    params.limit_m = params.limit_t * params.r;
    // params.limit_n = 1000;
    params.fname_excludelist = "examples/exclude_individuals.txt";
    string source_path = "examples/interactions/INT";
    string out_path[] = {"examples/results/single_inter_",
                         "examples/results/multi_inter_"};

The way I understand this is that the path examples/interactions,
examples/results, etc. are fixed.


Lennart.

> ________________________________________
> From: genabel-devel-bounces at lists.r-forge.r-project.org [genabel-devel-bounces at lists.r-forge.r-project.org] on behalf of L.C. Karssen [lennart at karssen.org]
> Sent: Monday, October 27, 2014 9:42 PM
> To: GenABEL Development list
> Subject: [GenABEL-dev] Hardcoded paths in OmicABELnoMM's test.cpp
> 
> Hi Alvaro,
> 
> When I looked into the checks for OmicABELnoMM I noticed that the paths
> to input and output files are hardcoded in the cpp file. While this is
> (probably) OK for the file names, the fact that directories are
> hardcoded also results in problems when running 'make distcheck'.
> 
> What would be the easiest way to enable the user to specify a path for
> input and output files?
> 'make distcheck' sets an environment variable [1], so we could check for
> that. But since it also sets the path as a make variable, I guess it's
> easiest to add this path to the source code when compiling.
> Or, maybe a bit nicer: add a command line option and wrap the check in a
> shell script that provides the path.
> 
> 
> What do you think?
> 
> Lennart.
> 
> [1]
> http://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html
> 
> --
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
> L.C. Karssen
> Utrecht
> The Netherlands
> 
> lennart at karssen.org
> http://blog.karssen.org
> GPG key ID: A88F554A
> -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
> 

-- 
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
L.C. Karssen
Utrecht
The Netherlands

lennart at karssen.org
http://blog.karssen.org
GPG key ID: A88F554A
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.r-forge.r-project.org/pipermail/genabel-devel/attachments/20141027/0ea62b95/attachment-0001.sig>


More information about the genabel-devel mailing list