This is an automated email from the git hooks/post-receive script. bob.dybian-guest pushed a commit to branch master in repository fastqtl.
commit bf8a2e8eb13f316041018e3cdf1c1daf8179475c Author: Dylan Aïssi <[email protected]> Date: Mon May 2 23:45:07 2016 +0200 Initial debian/* --- debian/changelog | 5 + debian/compat | 1 + debian/control | 51 +++++ debian/copyright | 61 ++++++ debian/fastQTL.1 | 143 ++++++++++++++ debian/fastqtl-doc.doc-base | 9 + debian/fastqtl-doc.install | 5 + debian/fastqtl.install | 1 + debian/fastqtl.lintian-overrides | 2 + .../patches/01_Makefile_dynamic_hardenings.patch | 95 +++++++++ debian/patches/02_Replace_libtabix_by_libhts.patch | 216 +++++++++++++++++++++ debian/patches/series | 2 + debian/rules | 21 ++ debian/source/format | 1 + debian/tests/control | 2 + debian/tests/output_tests/README | 17 ++ .../tests/output_tests/fastqtl_expected_output.log | 60 ++++++ .../tests/output_tests/fastqtl_expected_output.txt | 5 + debian/tests/run-sample-analysis | 30 +++ debian/upstream/metadata | 10 + debian/watch | 3 + 21 files changed, 740 insertions(+) diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..36c70da --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +fastqtl (2.184+dfsg-1) UNRELEASED; urgency=low + + * Initial release. (Closes: #823115) + + -- Dylan Aïssi <[email protected]> Sat, 30 Apr 2016 23:21:54 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..39f6788 --- /dev/null +++ b/debian/control @@ -0,0 +1,51 @@ +Source: fastqtl +Section: science +Priority: optional +Maintainer: Debian Med Packaging Team <[email protected]> +Uploaders: Dylan Aïssi <[email protected]> +Build-Depends: debhelper (>= 9), + libboost-dev, + libboost-iostreams-dev, + libboost-program-options-dev, + libgsl0-dev, + r-mathlib, + zlib1g-dev, + libblas-dev, + libeigen3-dev, + libhts-dev +Testsuite: autopkgtest +Standards-Version: 3.9.8 +Vcs-Browser: https://anonscm.debian.org/git/debian-med/fastqtl.git +Vcs-Git: https://anonscm.debian.org/git/debian-med/fastqtl.git +Homepage: http://fastqtl.sourceforge.net/ + +Package: fastqtl +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: fastqtl-doc +Description: Quantitative Trait Loci (QTL) mapper in cis for molecular phenotypes + The goal of FastQTL is to identify single-nucleotide polymorphisms (SNPs) + which are significantly associated with various molecular phenotypes + (i.e. expression of known genes, cytosine methylation levels, etc). + It performs scans for all possible phenotype-variant pairs in cis + (i.e. variants located within a specific window around a phenotype). + FastQTL implements a new permutation scheme (Beta approximation) to accurately + and rapidly correct for multiple-testing at both the genotype and phenotype + levels. + +Package: fastqtl-doc +Section: doc +Architecture: all +Depends: ${misc:Depends} +Enhances: fastqtl +Description: QTL mapper in cis for molecular phenotypes - documentation + The goal of FastQTL is to identify single-nucleotide polymorphisms (SNPs) + which are significantly associated with various molecular phenotypes + (i.e. expression of known genes, cytosine methylation levels, etc). + It performs scans for all possible phenotype-variant pairs in cis + (i.e. variants located within a specific window around a phenotype). + FastQTL implements a new permutation scheme (Beta approximation) to accurately + and rapidly correct for multiple-testing at both the genotype and phenotype + levels. + . + This package provides documentation and example data to work with FastQTL. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..6630d43 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,61 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: FastQTL +Upstream-Contact: Olivier Delaneau <olivier.delaneau at gmail.com> +Source: http://fastqtl.sourceforge.net/ +Comment: Exclude embedded Eigen and Tabix, and some other stuff. +Files-Excluded: bin + lib + obj + Makefile.static + .dropbox + .project + +Files: * +Copyright: 2014-2015 Olivier Delaneau, Alfonso Buil and Emmanouil T. Dermitzakis +License: GPL-3+ + +Files: src/utils/tabix.*pp +Copyright: 2011-2016 Erik Garrison <erik.garrison at gmail.com> (tabixpp software) + 2014-2015 Olivier Delaneau, Alfonso Buil and Emmanouil T. Dermitzakis +License: Expat + +Files: debian/* +Copyright: 2016 Dylan Aïssi <[email protected]> +License: GPL-3+ + +License: GPL-3+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU General Public License + version 3 can be found in `/usr/share/common-licenses/GPL-3'. + +License: Expat + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/debian/fastQTL.1 b/debian/fastQTL.1 new file mode 100644 index 0000000..02811e1 --- /dev/null +++ b/debian/fastQTL.1 @@ -0,0 +1,143 @@ +.\" +.TH FastQTL "1" "March 2016" "2.184" +.SH NAME +FastQTL \- Quantitative Trait Loci (QTL) mapper in cis for molecular phenotypes +.SH SYNOPSIS +.B fastQTL [\fIoptions\fR] +.SH DESCRIPTION +The goal of FastQTL is to identify single-nucleotide polymorphisms (SNPs) +which are significantly associated with various molecular phenotypes +(i.e. expression of known genes, cytosine methylation levels, etc). +It performs scans for all possible phenotype-variant pairs in cis +(i.e. variants located within a specific window around a phenotype). +FastQTL implements a new permutation scheme (Beta approximation) to accurately +and rapidly correct for multiple-testing at both the genotype and phenotype +levels. +.SH OPTIONS +.SS Basic options +.TP +\fB\-\-help\fR +.br +Print help about options. +.TP +\fB\-\-silent\fR +Silent mode on terminal. +.TP +\fB\-\-seed\fR arg (=1459232241) +Random number generator seed. +Useful to replicate runs of the software. + +.SS Input and Output files options +.TP +\fB\-L, \-\-log\fR +Screen output is copied in this file. +.TP +\fB\-V, \-\-vcf\fR +Genotypes in VCF format. +.TP +\fB\-B, \-\-bed\fR +Phenotypes in BED format. +.TP +\fB\-C, \-\-cov\fR +Covariates in TXT format. +.TP +\fB\-G, \-\-grp\fR +Phenotype groups in TXT format. +.TP +\fB\-O, \-\-out\fR +Output file. + +.SS Exclusion and Inclusion files options +.TP +\fB\-\-exclude\-samples\fR +List of samples to exclude. +.TP +\fB\-\-include\-samples\fR +List of samples to include. +.TP +\fB\-\-exclude\-sites\fR +List of sites to exclude. +.TP +\fB\-\-include\-sites\fR +List of sites to include. +.TP +\fB\-\-exclude\-phenotypes\fR +List of phenotypes to exclude. +.TP +\fB\-\-include\-phenotypes\fR +List of phenotypes to include. +.TP +\fB\-\-exclude\-covariates\fR +List of covariates to exclude. +.TP +\fB\-\-include\-covariates\fR +List of covariates to include. + +.SS Parameters +.TP +\fB\-\-normal\fR +To perform quantile normalization on the phenotype quantifications to make them normally distributed. +Implemented as the rntransform function of the GenABEL package. + +.TP +\fB\-W, \-\-window\fR +Cis-window size. +Default values is 1Mb (1e6). +It means that all variants within 1e6 bp of the phenotype location (e.g. TSS) is analyzed. +.TP +\fB\-T, \-\-threshold\fR +To filter out all phenotype-variant pairs with a p-value above the specified threshold in the output of a nominal pass. + +.SS Modes +.TP +\fB\-P, \-\-permute\fR +Permutation pass to calculate corrected p-values for molecular phenotypes. +.TP +\fB\-\-psequence\fR +Permutation sequence. +.TP +\fB\-\-map\fR +Map best QTL candidates per molecular phenotype. +.TP +\fB\-\-map\-full\fR +Scan full cis-window to discover independent signals. +.TP +\fB\-\-interaction\fR +Test for interactions with variable specified in file. + +.SS Parallelization +.TP +\fB\-K, \-\-chunk\fR +Specify which chunk needs to be processed. +.TP +\fB\-\-commands\fR +Generates all commands. +.TP +\fB\-R, \-\-region\fR +Region of interest. + +.SH EXAMPLE +for c in $(seq 1 256); do +.br + \fBfastQTL\fR \fB--vcf\fR genotypes.vcf.gz +.br + \fB--bed\fR phenotypes.bed.gz +.br + \fB--chunk\fR $c 256 +.br + \fB--permute\fR 1000 +.br + \fB--out\fR results.$c\.txt.gz +.br +done +.br +zcat results.*.txt.gz | gzip -c > fastqtl_expected_output.txt.gz +.br + +.SH SEE ALSO +.BR http://fastqtl.sourceforge.net/ +.SH AUTHOR +FastQTL was written by Olivier Delaneau, Halit Ongen, Alfonso Buil and Manolis Dermitzakis. +.PP +This manual page was written by Dylan Aïssi <[email protected]>, +for the Debian project (but may be used by others). diff --git a/debian/fastqtl-doc.doc-base b/debian/fastqtl-doc.doc-base new file mode 100644 index 0000000..8442d9c --- /dev/null +++ b/debian/fastqtl-doc.doc-base @@ -0,0 +1,9 @@ +Document: fastqtl +Title: FastQTL +Author: Olivier Delaneau <olivier.delaneau at gmail.com> +Abstract: Description of FastQTL +Section: Science/Biology + +Format: HTML +Index: /usr/share/doc/fastqtl/doc/index.html +Files: /usr/share/doc/fastqtl/doc/* diff --git a/debian/fastqtl-doc.install b/debian/fastqtl-doc.install new file mode 100644 index 0000000..e18b35c --- /dev/null +++ b/debian/fastqtl-doc.install @@ -0,0 +1,5 @@ +README usr/share/doc/fastqtl/ +doc/* usr/share/doc/fastqtl/doc/ +example/examples.tar.xz usr/share/doc/fastqtl/examples/ +debian/tests/run-sample-analysis /usr/share/doc/fastqtl/examples/ +debian/tests/output_tests/* /usr/share/doc/fastqtl/examples/ diff --git a/debian/fastqtl.install b/debian/fastqtl.install new file mode 100644 index 0000000..404a511 --- /dev/null +++ b/debian/fastqtl.install @@ -0,0 +1 @@ +bin/fastQTL usr/bin/ diff --git a/debian/fastqtl.lintian-overrides b/debian/fastqtl.lintian-overrides new file mode 100644 index 0000000..e6e1027 --- /dev/null +++ b/debian/fastqtl.lintian-overrides @@ -0,0 +1,2 @@ +# This warning comes from libeigen3-dev (See https://bugs.debian.org/813233 ) +fastqtl: spelling-error-in-binary \ No newline at end of file diff --git a/debian/patches/01_Makefile_dynamic_hardenings.patch b/debian/patches/01_Makefile_dynamic_hardenings.patch new file mode 100644 index 0000000..439697d --- /dev/null +++ b/debian/patches/01_Makefile_dynamic_hardenings.patch @@ -0,0 +1,95 @@ +Author: Dylan Aïssi <[email protected]> +Description: Patch the makefile in order to use a full dynamic linking and to activate hardenings. +Last-Update: 2016-04-30 +Forwarded: TODO + +--- a/Makefile ++++ b/Makefile +@@ -1,13 +1,27 @@ +-#PLEASE SPECIFY THE R path here where you built the R math library standalone +-RMATH=~/Software/R-3.1.3/src ++#!/usr/bin/make -f ++ ++# Define DYNAMIC_LINK to compile using full dynamic linking ++DYNAMIC_LINK = 1 ++ ++ifndef DYNAMIC_LINK ++ #PLEASE SPECIFY THE R path here where you built the R math library standalone ++ RMATH=~/Software/R-3.1.3/src ++else ++ RMATH= ++endif + + #compiler + CXX=g++ + + #internal paths + VPATH=$(shell for file in `find src -name *.cpp`; do echo $$(dirname $$file); done) +-PATH_TABX=lib/Tabix +-PATH_EIGN=lib/Eigen ++ifndef DYNAMIC_LINK ++ PATH_TABX=lib/Tabix ++ PATH_EIGN=lib/Eigen ++else ++ PATH_TABX= ++ PATH_EIGN= ++endif + + #compiler flags + CXXFLAG_OPTI=-O3 -D_FAST_CORRELATION +@@ -21,15 +35,25 @@ + LDFLAG_MACX=-mmacosx-version-min=10.7 -stdlib=libc++ + + #includes +-INC_BASE=-Isrc -I$(PATH_TABX) -I$(PATH_EIGN) +-INC_MATH=-I$(RMATH)/include/ ++ifndef DYNAMIC_LINK ++ INC_BASE=-Isrc -I$(PATH_TABX) -I$(PATH_EIGN) ++ INC_MATH=-I$(RMATH)/include/ ++else ++ INC_BASE=-Isrc ++ INC_MATH= ++endif + INC_MACX=-I/usr/local/include/ + + #libraries + #LIB_BASE=-lm -lboost_iostreams -lboost_program_options -lz -lgsl -lblas + LIB_BASE=-lm -lz -lboost_iostreams -lboost_program_options -lgsl -lblas +-LIB_MATH=$(RMATH)/nmath/standalone/libRmath.a +-LIB_TABX=$(PATH_TABX)/libtabix.a ++ifndef DYNAMIC_LINK ++ LIB_MATH=$(RMATH)/nmath/standalone/libRmath.a ++ LIB_TABX=$(PATH_TABX)/libtabix.a ++else ++ LIB_MATH=-lRmath ++ LIB_TABX=-ltabix ++endif + LIB_MACX=-L/usr/local/lib/ + + #files (binary, objects, headers & sources) +@@ -42,10 +66,10 @@ + all: linux + + #linux release +-linux: CXXFLAG=$(CXXFLAG_OPTI) $(CXXFLAG_WARN) ++linux: CXXFLAG=$(CXXFLAG_OPTI) $(CXXFLAG_WARN) $(CXXFLAGS) $(CPPFLAGS) + linux: IFLAG=$(INC_BASE) $(INC_MATH) + linux: LIB=$(LIB_MATH) $(LIB_TABX) $(LIB_BASE) +-linux: LDFLAG=$(LDFLAG_OPTI) ++linux: LDFLAG=$(LDFLAG_OPTI) $(LDFLAGS) + linux: $(FILE_BIN) + + #macos release +--- a/src/residualizer.h ++++ b/src/residualizer.h +@@ -17,8 +17,8 @@ + #ifndef _RESIDUALIZER_H + #define _RESIDUALIZER_H + +-#include <Dense> +-#include <LU> ++#include <eigen3/Eigen/Dense> ++#include <eigen3/Eigen/LU> + #include "utils/utils.h" + + using namespace Eigen; diff --git a/debian/patches/02_Replace_libtabix_by_libhts.patch b/debian/patches/02_Replace_libtabix_by_libhts.patch new file mode 100644 index 0000000..14c0bf2 --- /dev/null +++ b/debian/patches/02_Replace_libtabix_by_libhts.patch @@ -0,0 +1,216 @@ +Author: Dylan Aïssi <[email protected]> +Description: Merge src/utils/tabix.*pp with upstream (libtabixpp 1.0.0) in order to use libhts instead libtabix. +Last-Update: 2016-04-29 +Forwarded: No + + +--- a/Makefile ++++ b/Makefile +@@ -52,7 +52,7 @@ + LIB_TABX=$(PATH_TABX)/libtabix.a + else + LIB_MATH=-lRmath +- LIB_TABX=-ltabix ++ LIB_TABX=-lhts + endif + LIB_MACX=-L/usr/local/lib/ + +--- a/src/utils/tabix.cpp ++++ b/src/utils/tabix.cpp +@@ -8,6 +8,7 @@ + Tabix::Tabix(void) { } + + Tabix::Tabix(string& file) { ++ has_jumped = false; + filename = file; + const char* cfilename = file.c_str(); + struct stat stat_tbi,stat_vcf; +@@ -30,78 +31,99 @@ + } + free(fnidx); + +- if ((t = ti_open(cfilename, 0)) == 0) { ++ if ((fn = hts_open(cfilename, "r")) == 0) { + cerr << "[tabix++] fail to open the data file." << endl; + exit(1); + } + +- if (ti_lazy_index_load(t) < 0) { ++ if ((tbx = tbx_index_load(cfilename)) == NULL) { + cerr << "[tabix++] failed to load the index file." << endl; + exit(1); + } + +- idxconf = ti_get_conf(t->idx); ++ int nseq; ++ const char** seq = tbx_seqnames(tbx, &nseq); ++ for (int i=0; i<nseq; i++) { ++ chroms.push_back(seq[i]); ++ } ++ free(seq); ++ ++ idxconf = &tbx_conf_vcf; + + // set up the iterator, defaults to the beginning +- iter = ti_query(t, 0, 0, 0); ++ current_chrom = chroms.begin(); ++ iter = tbx_itr_querys(tbx, current_chrom->c_str()); + + } + + Tabix::~Tabix(void) { +- ti_iter_destroy(iter); +- ti_close(t); ++ tbx_itr_destroy(iter); ++ tbx_destroy(tbx); + } + + void Tabix::getHeader(string& header) { + header.clear(); +- ti_iter_destroy(iter); +- iter = ti_query(t, 0, 0, 0); +- const char* s; +- int len; +- while ((s = ti_read(t, iter, &len)) != 0) { +- if ((int)(*s) != idxconf->meta_char) { +- firstline = string(s); // stash this line ++ kstring_t str = {0,0,0}; ++ while ( hts_getline(fn, KS_SEP_LINE, &str) >= 0 ) { ++ if ( !str.l || str.s[0]!=tbx->conf.meta_char ) { + break; + } else { +- header += string(s); ++ header += string(str.s); + header += "\n"; + } + } ++ // set back to start ++ current_chrom = chroms.begin(); ++ if (iter) tbx_itr_destroy(iter); ++ iter = tbx_itr_querys(tbx, current_chrom->c_str()); + } + + void Tabix::getLastHeader(string & header) { +- header.clear(); +- ti_iter_destroy(iter); +- iter = ti_query(t, 0, 0, 0); +- const char* s; +- int len; +- while ((s = ti_read(t, iter, &len)) != 0) { +- if ((int)(*s) != idxconf->meta_char) { +- firstline = string(s); // stash this line +- break; +- } else header = string(s); +- } ++ header.clear(); ++ kstring_t str = {0,0,0}; ++ while ( hts_getline(fn, KS_SEP_LINE, &str) >= 0 ) { ++ if ( !str.l || str.s[0]!=tbx->conf.meta_char ) { ++ break; ++ } else header = string(str.s); ++ } ++ // set back to start ++ current_chrom = chroms.begin(); ++ if (iter) tbx_itr_destroy(iter); ++ iter = tbx_itr_querys(tbx, current_chrom->c_str()); + } + + bool Tabix::setRegion(string region) { +- if (ti_parse_region(t->idx, region.c_str(), &tid, &beg, &end) == 0) { +- firstline.clear(); +- ti_iter_destroy(iter); +- iter = ti_queryi(t, tid, beg, end); +- return true; +- } else return false; ++ tbx_itr_destroy(iter); ++ iter = tbx_itr_querys(tbx, region.c_str()); ++ has_jumped = true; ++ return true; + } + + bool Tabix::getNextLine(string & line) { +- const char* s; +- int len; +- if (!firstline.empty()) { +- line = firstline; // recovers line read if header is parsed +- firstline.clear(); +- return true; +- } +- if ((s = ti_read(t, iter, &len)) != 0) { +- line = string(s); +- return true; +- } else return false; ++ kstring_t str = {0,0,0}; ++ if (has_jumped) { ++ if (iter && tbx_itr_next(fn, tbx, iter, &str) >= 0) { ++ line = string(str.s); ++ return true; ++ } else return false; ++ } else { // step through all sequences in the file ++ // we've never jumped, so read everything ++ if (iter && tbx_itr_next(fn, tbx, iter, &str) >= 0) { ++ line = string(str.s); ++ return true; ++ } else { ++ ++current_chrom; ++ while (current_chrom != chroms.end()) { ++ tbx_itr_destroy(iter); ++ iter = tbx_itr_querys(tbx, current_chrom->c_str()); ++ if (iter && tbx_itr_next(fn, tbx, iter, &str) >= 0) { ++ line = string(str.s); ++ return true; ++ } else { ++ ++current_chrom; ++ } ++ } ++ return false; ++ } ++ } + } +--- a/src/utils/tabix.hpp ++++ b/src/utils/tabix.hpp +@@ -9,24 +9,31 @@ + #include <string> + #include <stdlib.h> + #include <sys/stat.h> +-#include <bgzf.h> +-#include <tabix.h> ++#include <htslib/bgzf.h> ++#include <htslib/tbx.h> ++#include <htslib/kseq.h> + #include <iostream> ++#include <cstring> ++#include <vector> + + + using namespace std; + + class Tabix { + +- tabix_t *t; +- ti_iter_t iter; +- const ti_conf_t *idxconf; ++ htsFile* fn; ++ tbx_t* tbx; ++ hts_itr_t* iter; ++ const tbx_conf_t *idxconf; + int tid, beg, end; + string firstline; ++ bool has_jumped; ++ vector<string>::iterator current_chrom; + + public: + + string filename; ++ vector<string> chroms; + + Tabix(void); + Tabix(string& file); +@@ -36,6 +43,7 @@ + void getLastHeader(string & header); + bool setRegion(string region); + bool getNextLine(string& line); ++ + }; + + #endif diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..cb0fd3c --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +01_Makefile_dynamic_hardenings.patch +02_Replace_libtabix_by_libhts.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..b1b0686 --- /dev/null +++ b/debian/rules @@ -0,0 +1,21 @@ +#!/usr/bin/make -f + +# Don't override the upstream FLAG -O3 +CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS 2>/dev/null | sed -e 's/-O2//g') + +%: + dh $@ + +override_dh_auto_build: + mkdir -p $(CURDIR)/obj/ + mkdir -p $(CURDIR)/bin/ + $(MAKE) CXXFLAGS='$(CXXFLAGS)' + cd $(CURDIR)/example/ && \ + tar Jcvf examples.tar.xz * + +override_dh_installman: + dh_installman debian/fastQTL.1 + +get-orig-source: + uscan --verbose --force-download --repack --compress xz + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..46ebe02 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) \ No newline at end of file diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..3403f8a --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,2 @@ +Tests: run-sample-analysis +Depends: @ diff --git a/debian/tests/output_tests/README b/debian/tests/output_tests/README new file mode 100644 index 0000000..6ad7c39 --- /dev/null +++ b/debian/tests/output_tests/README @@ -0,0 +1,17 @@ +#!/bin/sh -e +# Output files (i.e. fastqtl_expected_output.txt and fastqtl_expected_output.log) were generated following: + +wget http://fastqtl.sourceforge.net/files/FastQTL-2.184.linux.tgz +tar -zxvf FastQTL-2.184.linux.tgz + +./FastQTL/bin/fastQTL.static \ + --vcf ./FastQTL/example/genotypes.vcf.gz \ + --bed ./FastQTL/example/phenotypes.bed.gz \ + --cov ./FastQTL/example/covariates.txt.gz \ + --interaction ./FastQTL/example/interaction.txt \ + --chunk 1 100 \ + --permute 100 \ + --seed 1 \ + --out fastqtl_expected_output.txt \ + --log fastqtl_expected_output.log + diff --git a/debian/tests/output_tests/fastqtl_expected_output.log b/debian/tests/output_tests/fastqtl_expected_output.log new file mode 100644 index 0000000..516aedb --- /dev/null +++ b/debian/tests/output_tests/fastqtl_expected_output.log @@ -0,0 +1,60 @@ + +Perform permutation based interaction analysis (used to calculate corrected p-values for MPs) + * Perform 100 permutations + * Test interaction with term from [./FastQTL/example/interaction.txt] + * Random number generator is seeded with 1 + * Considering variants within 1e+06 bp of the MPs + * Chunk processed 1 / 100 + +Scanning phenotype data in [./FastQTL/example/phenotypes.bed.gz] + * 364 phenotypes + +Reading phenotype data in [./FastQTL/example/phenotypes.bed.gz] + * region = 22:17517460-17739125 + * 373 samples included + * 5 phenotypes included + +Reading genotype data in [./FastQTL/example/genotypes.vcf.gz] in VCF format + * region = 22:16517460-18739125 + * 373 samples included + * 8684 sites included + +Reading covariates in [./FastQTL/example/covariates.txt.gz] + * 373 samples included + * 4 covariate(s) included + +Reading interaction term in [./FastQTL/example/interaction.txt] + * 373 samples included + +Imputing missing genotypes + +Imputing missing phenotypes + +Initialize covariate + +Processing gene [ENSG00000237438.1] + * Number of variants in cis = 7966 + * Beta distribution parameters = 1.0382 2287.7101 + * Progress = 20.0% + +Processing gene [ENSG00000177663.8] + * Number of variants in cis = 8165 + * Beta distribution parameters = 0.7994 2826.0721 + * Progress = 40.0% + +Processing gene [ENSG00000183307.3] + * Number of variants in cis = 8279 + * Beta distribution parameters = 0.9595 9906.5566 + * Progress = 60.0% + +Processing gene [ENSG00000069998.8] + * Number of variants in cis = 8466 + * Beta distribution parameters = 0.9606 4564.2130 + * Progress = 80.0% + +Processing gene [ENSG00000093072.10] + * Number of variants in cis = 8531 + * Beta distribution parameters = 1.0645 1772.4331 + * Progress = 100.0% + +Running time: 162 seconds diff --git a/debian/tests/output_tests/fastqtl_expected_output.txt b/debian/tests/output_tests/fastqtl_expected_output.txt new file mode 100644 index 0000000..1c6c843 --- /dev/null +++ b/debian/tests/output_tests/fastqtl_expected_output.txt @@ -0,0 +1,5 @@ +ENSG00000237438.1 7966 1.03823 2287.71 352.293 indel:1I_22_17834337 316877 1.89696e-05 0.0693069 0.0519815 +ENSG00000177663.8 8165 0.799377 2826.07 380.167 snp_22_17389156 -176688 6.27191e-05 0.178218 0.192496 +ENSG00000183307.3 8279 0.959492 9906.56 432.588 snp_22_17336410 -265847 0.000868799 0.940594 0.949806 +ENSG00000069998.8 8466 0.960617 4564.21 389.88 snp_22_18023838 377661 8.54998e-05 0.227723 0.216574 +ENSG00000093072.10 8531 1.06453 1772.43 334.203 snp_22_17738177 -948 0.000356058 0.683168 0.649116 diff --git a/debian/tests/run-sample-analysis b/debian/tests/run-sample-analysis new file mode 100755 index 0000000..5403e7d --- /dev/null +++ b/debian/tests/run-sample-analysis @@ -0,0 +1,30 @@ +#!/bin/sh -e +# http://dep.debian.net/deps/dep8/ +# Autopkgtest: Test if fastqtl run analysis correctly +# Author: Dylan Aïssi <[email protected]> +# Last-Update: 2016-04-02 + +pkg=fastqtl +if [ "$ADTTMP" = "" ] ; then + ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX` +fi +cd $ADTTMP +cp -a /usr/share/doc/${pkg}/examples/* $ADTTMP + +tar Jxvf $ADTTMP/examples.tar.xz + +fastQTL \ + --vcf genotypes.vcf.gz \ + --bed phenotypes.bed.gz \ + --cov covariates.txt.gz \ + --interaction interaction.txt \ + --chunk 1 100 \ + --permute 100 \ + --seed 1 \ + --out fastqtl_output.txt \ + --log fastqtl_output.log + +diff fastqtl_expected_output.txt fastqtl_output.txt + +rm -f $ADTTMP/* + diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..1c3d170 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,10 @@ +Contact: Olivier Delaneau <olivier.delaneau at gmail.com> +Name: FastQTL +Reference: + - Author: Halit Ongen and Alfonso Buil and Andrew Anand Brown and Emmanouil T. Dermitzakis and and Olivier Delaneau + Title: "Fast and efficient QTL mapper for thousands of molecular phenotypes" + Journal: Bioinformatics + Year: 2015 + DOI: 10.1093/bioinformatics/btv722 + URL: https://bioinformatics.oxfordjournals.org/content/early/2016/02/19/bioinformatics.btv722 + eprint: https://bioinformatics.oxfordjournals.org/content/early/2016/02/19/bioinformatics.btv722.full.pdf+html diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..599d74a --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts="repacksuffix=+dfsg,dversionmangle=s/\+dfsg//g" \ + http://fastqtl.sourceforge.net/pages/install.html http://fastqtl.sourceforge.net/files/FastQTL-(\d\S*).linux\.tgz -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/fastqtl.git _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
