Home   Research   Resource   About us   Sitemap   
R Packages
 Funmap Package
 EIP Package
 R/fGWAS Package
 HaruPDF Package
 3FunMap Software
 fGWAS Software

Home>>Resource >> Software

Funmap: Functional Mapping Package for R (Version 2.2)


The Funmap package is developed to identify quantitative trait loci (QTL) for a longitudinal, or vectorized, phenotypic trait as based on the Funmap model[1]. Version 2.2 has implemented 5 functional curves( Logistic Curve, Bi-Exponential Curve, Pharmacology Curve, Nonparametric method, Exponentiation Curve) and three cross types(backcross, F2 cross and RILs by selfing). the Function FM2.qtlscan is the easiest way to call the computational model by five arguments of the phenotype file, the genotype file, the marker file, the curve type and the cross type. The computational model automatically performs the hypothesis tests and permutation. The package can output a brief report for the raw data, results of the QTL scanning and permutation results. For some results, figures will be outputted to a PDF file and a Rdata file will be generated. For more details, please refer to the document.

[1] Ma, C. X., G. Casella, and R. L. Wu, 2003. Functional mapping of quantitative trait loci underlying the character process: A theoretical framework. Genetics 161(4): 1751-1762.


The packages for Windows, Linux and Mac OS are available. The document also can be downloaded by the following link.


The Funmap package depends on the MSBVar package (available on CRAN), so this package should be installed first. To install Funmap, download the package file and type the appropriate command below or click the menu item "Install packages from local zip files".

Windows OS:

>install.packages("x:/fullpath/Funmap2_2.1.zip", repos=NULL)

Linux/Mac OS:

>install.packages("/fullpath/ Funmap_2.0.tar.gz", repos=NULL)

Before the package is used in R, the package importation is necessary by the following command:

> library(Funmap2)

After it is loaded, all functions within Funmap will be readily available to the user.

Sample Script:

The following source shows how to call the main function in R.
FM2.qtlscan( "pheno.csv", "geno.csv", "marker.csv", CURVE_LC, CROSS_BC );

The following source shows how to call the main function in R.
FM2.simu_test( par_NP, CURVE_NP, CROSS_F2 );

The following source shows how to call the main function in R.
par <- FM2.param( par_LC, CURVE_LC, CROSS_BC );
dat <- FM2.simulate(par);
ret <- FM2.qtlmodel(dat);
FM2.report( "report.pdf", dat, ret );

How to define a curve for real data

The following source shows how to define a curve and apply it the data analysis in Funmap2.


#define a function to calculate the curve's mean value.
Foo.get_mu<-function( par, times, options=list())
   return ( par[[1]]*( 1 + par[[2]]*exp(-par[[3]]*times) )^(1/(1-par[[4]]) ) );

   type = 1,
   name = "FOO",
   desc = "FOO Curve",
   #parameter's number, it is important.
   par_num = 4,
   par_name = c( "a", "b", "r", "k" ),
   trait_num = 1,
   get_mu = Foo.get_mu);

CURVE_FOO <<- FM2.reg_curve( curve_FOO );

FM2.qtlscan( "pheno.csv", "geno.csv", "marker.csv", CURVE_FOO, CROSS_BC );

Sample Report:

Link: http://statgen.psu.edu/software/funmap/report_demo.2.2.pdf

Last updated:

Version 2.2  10/05/2012, (1)New method to producereport (2) Customized curve;
Version 2.0  01/19/2011
Version 1.0  06/21/2010

Copyright© 2009-, Center for Statistical Genetics, Penn State University, All Rights Reserved.