debian/0000755000000000000000000000000012246574225007177 5ustar debian/README.test0000644000000000000000000000055412235741634011037 0ustar Notes on how this package can be tested. ──────────────────────────────────────── This package can be tested by running the provided test: R --no-save <>= library(parallel) options(srapply_fapply="parallel", mc.cores=detectCores()) olaps <- readGAlignmentsFromBam(bv) @ Files: inst/unitTests/cases/ex1.sam.gz Except of the first two lines this is a copy of file inst/extdata/ex1.sam Files: inst/unitTests/cases/ex1_*.bam* Files are derived from file inst/extdata/ex1.sam and just used for verification of the correctness of Rsamtools. Files: inst/unitTests/cases/plp_refskip.bam* This is a hand-crafted file used in a unit test Source code duplication ======================= The following files are copies of source code that is just contained in other Debian packages. We are discussing this issue with upstream to enable making use of dynamic linking for future versions of this package. Files: src/samtools/* Source is part of samtools (0.1.19-1) For more details what was tried see debian/patches/use-debian-packaged-libs.patch Files: src/tabix/* Source is part of tabix (0.2.6-1) -- Andreas Tille Fri, 25 Oct 2013 08:53:18 +0200 debian/copyright0000644000000000000000000001233012234150732011117 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Rsamtools Upstream-Contact: Bioconductor Package Maintainer Source: http://www.bioconductor.org/packages/release/bioc/html/Rsamtools.html Files: * Copyright: © 2006-2013 Martin Morgan, Hervé Pagès License: Artistic-2.0 Files: debian/* Copyright: 2013 Andreas Tille License: Artistic-2.0 License: Artistic-2.0 The "Artistic License" . Preamble . 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. . 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. . 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: . a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. . b) use the modified Package only within your corporation or organization. . c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. . d) make other distribution arrangements with the Copyright Holder. . 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: . a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. . b) accompany the distribution with the machine-readable source of the Package with your modifications. . c) give non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. . d) make other distribution arrangements with the Copyright Holder. . 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded. . 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whoever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package. . 7. C subroutines (or comparably compiled subroutines in other languages) supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. . 8. Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. . 9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. . 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. debian/rules0000755000000000000000000000031612235723416010253 0ustar #!/usr/bin/make -f debRreposname=bioc include /usr/share/R/debian/r-cran.mk install/$(package):: rm -rf debian/$(package)/usr/lib/R/site-library/$(cranNameOrig)/LICENSE clean:: dh_clean rm -f src/*.a debian/patches/0000755000000000000000000000000012235741257010625 5ustar debian/patches/series0000644000000000000000000000003712246574157012047 0ustar use_debian_packaged_zlib.patch debian/patches/use-debian-packaged-libs.patch0000644000000000000000000000613112235741257016347 0ustar Author: Andreas Tille LastChanged: Wed, 04 Sep 2013 11:11:22 +0200 Description: This does not yet work / patch disabled The purpose of this patch was to link dynymically against libbam which is provided by libbam-dev package since the source of Rsamtools contains a copy of samtools code which should be avoided. Unfortunately this simple hack does not work because of some magic in the R build process which is not yet fully understood and needs more investigation most probably by discussing the issue with upstream. . It was verified that this patch does not work by the following method: R --no-save < tests/Rsamtools_unit_tests.R which crashed after: Error in checkIdentical(exp, sapply(obs, length)) : FALSE. Without the patch the test also runs in some errors - some of them due to missing modules pasillaBamSubset and ShortRead (see Suggested Depends in debian/control - these modules are not yet packaged) and some due to blocked http, but the whole test at least finished with some summary. --- a/Rsamtools.mk +++ b/Rsamtools.mk @@ -2,7 +2,7 @@ SAMTOOLS_PATH=\ `echo 'cat(system.file("usrlib", .Platform[["r_arch"]],\ package="Rsamtools", mustWork=TRUE))' |\ "${R_HOME}/bin/R" --vanilla --slave` -PKG_LIBS+="$(SAMTOOLS_PATH)/libbam.a" "$(SAMTOOLS_PATH)/libbcf.a"\ +PKG_LIBS+="-lbam" "$(SAMTOOLS_PATH)/libbcf.a"\ "$(SAMTOOLS_PATH)/libtabix.a" -lz -pthread PKG_CPPFLAGS+=-D_USE_KNETFILE -D_FILE_OFFSET_BITS=64 \ -D_LARGEFILE64_SOURCE --- a/src/Makevars.common +++ b/src/Makevars.common @@ -1,13 +1,8 @@ PATCH_O = samtools_patch.o KNETFILE_O = knetfile.o -BAMOBJ_0 = \ - bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o \ - bam_pileup.o bam_lpileup.o bam_md.o razf.o faidx.o \ - $(KNETFILE_O) bam_sort.o sam_header.o bam_reheader.o kprobaln.o BCFOBJ_0 = \ bcf.o vcf.o bcfutils.o prob1.o kfunc.o index.o fet.o \ bcf2qcall.o -BAMOBJ=$(BAMOBJ_0:%=samtools/%) $(PATCH_O) BCFOBJ=$(BCFOBJ_0:%=samtools/bcftools/%) $(PATCH_O) TABIXOBJ = \ samtools/bgzf.o samtools/kstring.o samtools/knetfile.o \ @@ -25,7 +20,7 @@ PKG_CFLAGS += \ PKG_LIBS += -pthread \ $(SHLIB_OPENMP_CFLAGS) \ - "${R_PACKAGE_DIR}/usrlib${R_ARCH}/libbam.a" \ + "-lbam" \ "${R_PACKAGE_DIR}/usrlib${R_ARCH}/libbcf.a" \ "${R_PACKAGE_DIR}/usrlib${R_ARCH}/libtabix.a" @@ -44,8 +39,8 @@ libs: libs0 cp samtools/bgzf.h samtools/kstring.h samtools/knetfile.h \ "${R_PACKAGE_DIR}/include/tabix/" mkdir -p "${R_PACKAGE_DIR}/usrlib${R_ARCH}" - cp libbam.a libbcf.a libtabix.a "${R_PACKAGE_DIR}/usrlib${R_ARCH}" + cp libbcf.a libtabix.a "${R_PACKAGE_DIR}/usrlib${R_ARCH}" clean: - rm $(BAMOBJ) $(BCFOBJ) $(TABIXOBJ) *.a *.o *.so *.dll + rm $(BCFOBJ) $(TABIXOBJ) *.a *.o *.so *.dll --- a/src/Makevars +++ b/src/Makevars @@ -2,13 +2,10 @@ include Makevars.common PKG_LIBS += -lz -libs0: libbam.a libbcf.a libtabix.a +libs0: libbcf.a libtabix.a mkdir -p "${R_PACKAGE_DIR}/usretc${R_ARCH}" cp ../Rsamtools.mk "${R_PACKAGE_DIR}/usretc${R_ARCH}" -libbam.a: $(BAMOBJ) - $(AR) -crus $@ $(BAMOBJ) - libbcf.a: $(BCFOBJ) $(AR) -crus $@ $(BCFOBJ) debian/patches/use_debian_packaged_zlib.patch0000644000000000000000000000155212246574146016611 0ustar Author: Andreas Tille LastChanged: Sun, 01 Dec 2013 09:45:58 +0100 Description: If the systems includes zlib natively there is no point in requiring the import of zlibbioc --- a/DESCRIPTION +++ b/DESCRIPTION @@ -14,7 +14,7 @@ License: Artistic-2.0 | file LICENSE LazyLoad: yes Depends: methods, IRanges (>= 1.19.11), GenomicRanges (>= 1.13.35), XVector, Biostrings (>= 2.29.7) -Imports: utils, BiocGenerics (>= 0.1.3), zlibbioc, bitops +Imports: utils, BiocGenerics (>= 0.1.3), bitops Suggests: ShortRead (>= 1.19.10), GenomicFeatures, TxDb.Dmelanogaster.UCSC.dm3.ensGene, KEGG.db, TxDb.Hsapiens.UCSC.hg18.knownGene, RNAseqData.HNRNPC.bam.chr14, --- a/NAMESPACE +++ b/NAMESPACE @@ -2,8 +2,6 @@ useDynLib(Rsamtools, .registration=TRUE) import(methods) -import(zlibbioc) - import(XVector) importFrom(bitops, bitAnd) debian/watch0000644000000000000000000000025212211575112010213 0ustar version=3 opts=downloadurlmangle=s/\.\./packages\/release\/bioc/ \ http://www.bioconductor.org/packages/release/bioc/html/Rsamtools.html .*/Rsamtools_([\d\.]+)\.tar\.gz debian/changelog0000644000000000000000000000057212246574225011055 0ustar r-bioc-rsamtools (1.14.2-1) unstable; urgency=low * New upstream version (adapted patch) Closes: #730984 * Build-Depends: r-bioc-xvector -- Andreas Tille Sun, 01 Dec 2013 09:45:58 +0100 r-bioc-rsamtools (1.12.4-1) unstable; urgency=low * Initial release (closes: #728285) -- Andreas Tille Wed, 04 Sep 2013 11:11:22 +0200 debian/compat0000644000000000000000000000000212205374244010367 0ustar 9 debian/control0000644000000000000000000000274212246573623010610 0ustar Source: r-bioc-rsamtools Maintainer: Debian Med Packaging Team Uploaders: Andreas Tille Section: gnu-r Priority: optional Build-Depends: debhelper (>= 9), cdbs, r-base-dev, r-cran-bitops, r-bioc-biocgenerics, r-bioc-iranges, r-bioc-biostrings, r-bioc-genomicranges, r-bioc-xvector, libbam-dev Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/viewvc/debian-med/trunk/packages/R/r-bioc-rsamtools/trunk/ Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/R/r-bioc-rsamtools/trunk/ Homepage: http://www.bioconductor.org/packages/release/bioc/html/Rsamtools.html Package: r-bioc-rsamtools Architecture: any Depends: ${R:Depends}, ${misc:Depends}, ${shlibs:Depends}, r-cran-bitops, r-bioc-biocgenerics, r-bioc-iranges, r-bioc-biostrings, r-bioc-genomicranges, r-bioc-xvector # The following BioConductor modules are not yet packaged but used in the unit test Suggests: r-bioc-pasillabamsubset, r-bioc-shortread Description: GNU R binary alignment (BAM), variant call (BCF), or tabix file import This package provides an interface to the 'samtools', 'bcftools', and 'tabix' utilities for manipulating SAM (Sequence Alignment / Map), binary variant call (BCF) and compressed indexed tab-delimited (tabix) files.