1 class Samtools01 < Formula
2 #class SamtoolsAT01 < Formula
3 desc "Tools for manipulating next-generation sequencing data"
4 homepage "https://samtools.sourceforge.io/"
5 # doi "10.1093/bioinformatics/btp352"
7 # <http://samtools.sourceforge.net/pileup.shtml>
8 # The `pileup' command has been removed in [0.1.17](https://github.com/samtools/samtools/commits/0.1.17) in commit c350a570e955d5b4c2c13f607b7442df6d332c67.
9 # See <https://sourceforge.net/projects/samtools/files/samtools/0.1.16/> for README.
11 url "https://github.com/samtools/samtools/archive/0.1.16.tar.gz"
12 sha256 "7657e5dc66fbd1f02133349de34955a50635a9980c21ebff06c116e4e1e65986"
14 keg_only :versioned_formula
16 option "with-dwgsim", "Build with 'Whole Genome Simulation'"
17 option "without-bcftools", "Do not install BCFtools"
25 # http://sourceforge.net/apps/mediawiki/dnaa/index.php?title=Whole_Genome_Simulation
26 url "https://downloads.sourceforge.net/project/dnaa/dwgsim/dwgsim-0.1.11.tar.gz"
27 sha256 "6ffc8a4f7d20bc7c8b3efa1d2b3ae6cbf9609a93db976d4e7ccd2a209a2305b5"
31 # https://github.com/lh3/samtools/issues/15
32 # diff -uN ksort.h.0 ksort.h >> ../samtools-0.1.rb
38 system "make", "-C", "bcftools" if build.with? "bcftools"
40 if build.with? "dwgsim"
41 ohai "Building dwgsim"
42 resource("dwgsim").stage do
43 ln_s buildpath, "samtools"
44 system "make", "CC=#{ENV.cc}"
45 bin.install %w[dwgsim dwgsim_eval]
50 samtools bcftools/bcftools bcftools/vcfutils.pl
51 misc/maq2sam-long misc/maq2sam-short misc/md5fa misc/md5sum-lite misc/wgsim
54 bin.install Dir["misc/*.pl"]
55 lib.install "libbam.a"
56 man1.install "samtools.1"
57 (share+"samtools").install "examples"
58 (include+"bam").install Dir["*.h"]
62 assert_match "samtools", shell_output("#{bin}/samtools 2>&1", 1)
67 diff --git a/ksort.h b/ksort.h
68 index fa850ab..f8d8c4c 100644
72 tmp = *l; *l = l[i]; l[i] = tmp; ks_heapadjust_##name(0, i, l); \
75 - inline void __ks_insertsort_##name(type_t *s, type_t *t) \
76 + static inline void __ks_insertsort_##name(type_t *s, type_t *t) \
78 type_t *i, *j, swap_tmp; \
79 for (i = s + 1; i < t; ++i) \