[GenABEL-dev] Patch bug [#1322] polygenic would not run with a covariate which is non-informative

L.C. Karssen l.karssen at erasmusmc.nl
Wed May 25 04:29:00 CEST 2011


Hi Nicola, 

On Tue, 2011-05-24 at 21:33 +0200, pirastu at burlo.trieste.it wrote:
> Dear all,
> 

> I've also attached a first version of the "How to Make a patch"
> intructions. I've based this on what I've actually done to make this patch
> and if you have any suggestions comments changes ecc. please let me know.
> 

Thanks for your howto, it will be very helpful. I took a look at it and
fixed a couple of typos and made a few minor changes. 

Let me know what you think of it.

Lennart.


> Best
> 
> Nicola
> 
> _______________________________________________
> genabel-devel mailing list
> genabel-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel

-- 
-----------------------------------------------
L.C. Karssen
Erasmus MC
Department of Epidemiology
Room Ee 2224

Postbus 2040
3000 CA Rotterdam
The Netherlands

phone: +31-10-7044217
fax: +31-10-7044657
e-mail: l.karssen at erasmusmc.nl
GPG key ID: 0E1D39E3
-----------------------------------------------
-------------- next part --------------
How to make a patch.

OK, so you want to fix something that's not working in one of the
*ABEL packages and don't know where to start. Actually it's easier
than you think.

The first thing you need to do is to dowload the last vesion of the
*ABEL source code with the command:

svn co svn://svn.r-forge.r-project.org/svnroot/genabel/pkg

it is important to use co (checkout) and not export because otherwise
the command diff needed to make the patch will not work.

You will now notice that a new directory has been created called ./pkg
Inside you will find a directory for each package.

You can find the source for each function in the corresponding package directory in the R directory so for example the source for polygenic will be in ./pkg/GenABEL/R/polygenic.R.

Now open the file you intend to fix and make all the changes you intend to make.
Once you are done go to the pkg directory and recompile the package you have fixed using the command (assuming you made changes to GenABEL)

R CMD INSTALL GenABEL

Open R and check that you actually fixed the problem.
If this is the case also run

R CMD check GenABEL

to verify that everything is working fine.
If everything goes well you are ready to make the patch that can be
sent to the maintainers.

At this point it is important to update your version of the source
code by going to the pkg directory and running:

svn update

This is important since it probably took you some time to make the patch and probably other changes have been made which could complicate the creation of the patch.

Now it is time for the actual creation of the patch.
From the root directory of the pkg directory run

svn diff ./pkg > patch_file_name

This is your patch file.

Now to check that it works fine, you could copy back the original
version of the function (for example from an svn checkout in a
temporary directory) and try if the patch works from the directory
where you have created it with

patch -p0 -i patch_file_name

Rerun the R CMD commands and recheck everything and you are ready to
submit the patch file to the community. Don't forget to describe what
you fixed (if possible including a bug number from the bug tracker)
and maybe give an example of the new/improved functionality.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.r-forge.r-project.org/pipermail/genabel-devel/attachments/20110525/6cd956eb/attachment.pgp>


More information about the genabel-devel mailing list