Skip to content
Commits on Source (7)
2019-01-23 twu
* Makefile.gsnaptoo.am, VERSION, changepoint.h, compress.c, concordance.h,
diag.c, extension-search.h, gbuffer.c, gbuffer.h, genome.c, genome.h,
genome128_consec.c, genome128_hr.c, genome_hr.c, genome_sites.c, gmap.c,
gsnap.c, kmer-search.c, kmer-search.h, knownsplicing.c, knownsplicing.h,
oligoindex_localdb.h, outbuffer.h, output.c, pair.c, pair.h, path-solve.c,
path-solve.h, samprint.c, segment-search.c, segment-search.h,
simplepair.c, simplepair.h, splice.c, splice.h, splicetrie.c,
splicetrie.h, splicetrie_build.h, src, stage1hr.c, stage1hr.h, stage3.c,
stage3hr.c, stage3hr.h, substring.c, substring.h, trunk, types.h,
univcoord.h, univdiagpool.c: Merged revisions 218195 through 218285 from
branches/2019-01-17-split-gmap-gsnap to separate GMAP and GSNAP code
* stage1hr.c: Added debugging statements
* stage3hr.c: At a given locus, checking for nmatches_posttrim before
checking for splice score
* splice.c, splice.h, substring.c: Added limit on consecutive matches in
scanning for spliceends
* path-solve.c: Restored previous code that did not look at extendedp
* splice.c: Added requirement for MIN_EXON_LENGTH in trimming ends
* cigar.c, path-solve.c: Added debugging statements
* gsnap.c: Added --sam_sparse_secondaries to omit SEQ and QUAL flags in
secondary alignments
* samprint.c, samprint.h: Using mate_plusp computed in Cigar_compute_main in
compute_flag, to give correct results for translocations. Added
sam_sparse_secondaries_p to omit SEQ and QUAL flags in secondary
alignments
2019-01-22 twu
* path-solve.c: Restored usage of the sense condition to handle the
non-splicing condition
* filestring.c: Handling the case in Filestring_merge where source->string
is NULL
* path-solve.c: Checking if qstart or qend is extended from spliced
endpoints of middle diagonal, and if not extended, using the original
endpoints
* junction.c: Changed name of macro for debugging
* samprint.c: Handling the case where hard clipping removes all substrings
* extension-search.c: Added debugging statement
* cigar.c: Handling the case where hard clipping removes all substrings
2019-01-18 twu
* extension-search.c: Fixed bugs in process_seed for processing the
remainder of the queryfwd set or the queryrev set
* extension-search.c: Rewrote algorithm extensively to combine seeds and
sets from queryfwd and queryrev passes
* segment-search.c: Using new interface to Path_solve_from_diagonals
* path-solve.c, path-solve.h: Changed Path_solve_from_diagonals to take a
univdiagonal, qstart, and qend, instead of a Univdiag_T object
* kmer-search.c: Removed unused include file
2019-01-17 twu
* setup.genomecomp.ok: Revised gold standard for extra bytes at end
* segment-search.c: Fixed problem with allocation when total_npositions is
zero in Segment_identify_lower and Segment_identify_higher
* hitlistpool.c: Initial import
* gsnap.c: Remoed oligoindices_major, oligoindices_minor, pairpool,
diagpool, cellpool, and Dynprog_T objects as variables
* gmap.c: Using new interfaces to stage1, stage2, and stage3 procedures
* stage3.c, stage3.h: Removed unused parameters
* translation.c: Removed npairs as a parameter for backward procedures
* terminal.c, terminal.h: Removed mismatch_positions_alloc as a parameter
* stage2.c: Removed code based on anchoredp, anchor_querypos, and
anchor_position, which are now always false and 0
* stage1hr.c, stage1hr.h: Using new interfaces to kmer-search,
extension-search, terminal, and concordance procedures. Removed
oligoindices_minor, diagpool, and cellpool parameters to single_read and
paired_read procedures
* stage1.c, stage1.h: Using new interfaces to Block_process_oligo_5 and
Block_process_oligo_3. Removed sizelimit parameters to Stage1_compute
procedures
* splice.c, splice.h: Removed unused parameters to Splice_setup
* smooth.c: Removed exon_denominator as a parameter to
find_internal_bads_by_prob
* segment-search.c: Removed unused variable
* samprint.h: Removed preprocessor macros for GSNAP
* samprint.c: Using new interfaces to Substring_compute_chrpos and
Pair_print_sam
* path-solve.h: Removed interface to Path_solve_via_gmap
* path-solve.c: Using new interfaces to substring procedures
* pair.c, pair.h: Removed unused parameters for Pair_print_sam
* output.c: Using new interfaces to stage3 print procedures
* iit-write-univ.c: Removed omegas as a parameter to node_select
* iit-read.c, iit-read.h: Commented out obsolete procedure
* genome128_consec.c: Added macros around some procedures. Removed unused
procedures
* genome128_hr.c: Added macros around some procedures
* intersect.c: Added LARGE_GENOMES macro to a procedure
* indexdb.c: Added LARGE_GENOMES macro to a procedure
* oligoindex_hr.c, oligoindex_hr.h: Removed unused parameters from
Oligoindex_untally
* kmer-search.c, kmer-search.h: Removed unused parameters
* extension-search.c, extension-search.h: Removed unused parameters
* epu16-bitpack64-read.c, epu16-bitpack64-readtwo.c: Commented out print
procedures for debugging
* epu16-bitpack64-incr.c: Turned off CHECK macro
* dynprog_single.c, dynprog_single.h: Removed glengthL and glengthR as
parameters to Dynprog_microexon_int
* dynprog_genome.c, dynprog_genome.h: Removed unused parameters, including
calculation of canonical_reward
* distant-rna.c, distant-rna.h: Removed user_maxlevel as a parameter
* datadir.c: Removed unused variables
* concordance.c, concordance.h: Using new interface to Stage3pair_new.
Removed unused parameters
* stage3hr.c, stage3hr.h: Removed oligoindices_minor, diagpool, and cellpool
as parameters, used previously for resolving insides
* compress-write.c: Using different format statements for Univcoord_T
variables
* cigar.c: Removed trimlength as a parameter to length_cigar_M. Using new
interface to Substring_compute_chrpos
* substring.c, substring.h: Removed plusp as a parameter to
embellish_genomic and hardclip_high as a parameter to
Substring_compute_chrpos
* reader.c, reader.h: Commented out unused procedures
* block.c, block.h: Removed indexdb_sizelimit as a parameter to
Block_process_oligo_5 and Block_process_oligo_3
* atoiindex.c, cmetindex.c, snpindex.c: Using new interfaces to
Indexdb_bitpack_counter and Localdb_new_genome
* localdb.c, localdb.h: Removed expand_offsets_p as a parameter to
Localdb_new_genome
* indexdb-write.c, indexdb-write.h: Removed offsetsstrm and offsetspages as
parameters to Indexdb_bitpack_counter and Indexdb_bitpack_counter_huge
2019-01-16 twu
* Makefile.gsnaptoo.am, VERSION, access.c, atoiindex.c, boyer-moore.h,
cellpool.c, chrom.h, cigar.c, cmetindex.c, compress-write.h,
concordance.c, concordance.h, diag.h, diagpool.c, distant-rna.c,
distant-rna.h, extension-search.c, extension-search.h, filestring.c,
genome128_hr.c, genome_sites.h, genomicpos.c, gmap.c, gmapindex.c,
gregion.c, gsnap.c, hitlistpool.h, indel.c, indexdb.c, indexdb.h,
intersect-large.h, intersect.c, intersect.h, intlist.c, intlist.h,
intlistdef.h, intlistpool.c, intlistpool.h, junction.c, junction.h,
kmer-search.c, kmer-search.h, ladder.c, ladder.h, list.h, listdef.h,
listpool.c, listpool.h, localdb.c, localdb.h, localdbdef.h, matchpool.c,
maxent_hr.h, mem.h, merge-diagonals-heap.h, merge-diagonals-simd-uint4.c,
merge-diagonals-simd-uint4.h, merge-diagonals-simd-uint8.h, merge-uint4.c,
method.c, oligoindex_hr.c, oligoindex_hr.h, outbuffer.c, outbuffer.h,
output.c, output.h, pair.c, pair.h, pairpool.c, path-solve.c,
path-solve.h, result.h, resulthr.h, samprint.c, samprint.h,
segment-search.c, segment-search.h, shortread.c, shortread.h, splice.c,
splice.h, splicestringpool.c, splicetrie.c, splicetrie_build.h, src,
stage1hr.c, stage1hr.h, stage3.c, stage3.h, stage3hr.c, stage3hr.h,
stage3hrdef.h, substring.c, substring.h, terminal.c, terminal.h, trunk,
types.h, uint8listpool.c, uint8listpool.h, uint8table_rh.c,
uint8table_rh.h, uintlist.c, uintlist.h, uintlistpool.c, uintlistpool.h,
uinttable.c, uinttable_rh.c, uinttable_rh.h, uniqscan.c, univcoord.h,
univdiag.c, univdiag.h, univdiagdef.h, univdiagpool.c, univdiagpool.h,
univinterval.h: Merged revisions 216893 to 218146 from
branches/2018-10-08-path-solve to improve path-solve procedure
2018-10-18 twu
* genome-write.c: Adding 2 words to the end of genomecomp, needed for
accessing nextlow (ptr+4) in the fwd_partial and rev_partial procedures in
oligoindex_hr.c
2018-10-10 twu
* genome.c: Replaced occurrences of 1U with 1
* bitpack64-serial-write.c, bitpack64-write.c, genome-write.c, genome.c,
genome128.c, gmapindex.c, indexdb-write.c, indexdb.c, indexdb_hr.c,
kmer-search.c, outbuffer.c, pair.c, parserange.c, stage3.c, stage3hr.c,
substring.c: Replaced occurrences of 1U with 1
* sedgesort.c: Fixed bug in Sedgesort_uint8 where we assigned -1U instead of
(UINT8) -1 as the sentinel value
* path-solve.c: Removing endpoints from the left and right to see if a
continuing alignment works
* Makefile.gsnaptoo.am, concordance.c, concordance.h, distant-rna.c,
distant-rna.h, extension-search.c, extension-search.h, gsnap.c,
intlistpool.c, junction.c, junction.h, kmer-search.c, kmer-search.h,
list.h, listpool.c, listpool.h, pair.c, pair.h, path-solve.c,
path-solve.h, segment-search.c, segment-search.h, src, stage1hr.c,
stage1hr.h, stage3hr.c, stage3hr.h, terminal.c, terminal.h, trunk: Merged
revision 216940 from branches/2018-10-10-reduce-list-push to add
Listpool_T object for lists of substrings and junctions
2018-10-09 twu
* Makefile.gsnaptoo.am, VERSION, intersect-large.c, intersect-large.h,
intersect.c, intersect.h, path-solve.c, record.h, segment-search.c,
segment-search.h, src, stage1hr.c, stage1hr.h, trunk: Merged revisions
216922 through 216936 from branches/2018-10-09-merge-records to replace
Merge_records procedures in segment search with Merge_diagonals
* localdb.c: Allocating extra space for array, needed for Sedgesort
* concordance.c: Removed unused code for filtering paired-end hits
* concordance.c: Restored computation of abort_pairing_p
* Makefile.gsnaptoo.am, VERSION, distant-rna.c, distant-rna.h,
extension-search.c, filter-diagonals.c, filter-diagonals.h, gsnap.c,
kmer-search.c, kmer-search.h, localdb.c, localdb.h,
merge-diagonals-heap.c, merge-diagonals-heap.h,
merge-diagonals-simd-uint4.c, merge-diagonals-simd-uint4.h,
merge-diagonals-simd-uint8.c, merge-diagonals-simd-uint8.h,
merge-records-heap.c, merge-records-heap.h, merge-records-simd.c,
merge-records-simd.h, merge-uint4.c, path-solve.c, path-solve.h,
segment-search.c, segment-search.h, splice.c, splice.h, src, stage1hr.c,
stage1hr.h, stage3hr.c, stage3hr.h, substring.c, substring.h, terminal.c,
terminal.h, trunk: Merged revisions 216889 to 216917 from
branches/2018-10-07-filter-diagonals to introduce a filtering step before
segment search, and to pre-allocate memory for Merge_records,
Merge_diagonals, Splice_resolve, and Substring_new procedures
* kmer-search.c, src: Fixed double-assignment of variable
2018-10-08 twu
* method.c, method.h, segment-search.c, segment-search.h, stage1hr.c:
Distinguishing between segment search for single-end reads and segment
search for anchored paired-end reads
2018-10-07 twu
* Makefile.gsnaptoo.am, VERSION, concordance.c, concordance.h,
config.site.rescomp.prd, extension-search.c, extension-search.h, gsnap.c,
intersect-large.c, intersect-large.h, intersect.c, intersect.h,
intlistpool.c, intlistpool.h, intpool.c, intpool.h, kmer-search.c,
kmer-search.h, ladder.c, ladder.h, localdb.c, mem.h,
merge-diagonals-heap.c, merge-diagonals-heap.h,
merge-diagonals-simd-uint4.c, merge-diagonals-simd-uint4.h,
merge-diagonals-simd-uint8.c, merge-diagonals-simd-uint8.h,
merge-heap-diagonals.c, merge-heap-diagonals.h, merge-heap-records.c,
merge-heap-records.h, merge-records-heap.c, merge-records-heap.h,
merge-records-simd.c, merge-records-simd.h, merge-simd-diagonals.c,
merge-simd-diagonals.h, merge-simd-records.c, merge-simd-records.h,
merge-uint4.h, merge-uint8.c, merge-uint8.h, method.c, method.h,
path-solve.c, path-solve.h, sedgesort.c, sedgesort.h, segment-search.c,
segment-search.h, src, stage1hr.c, stage1hr.h, stage3hr.c, trunk: Merged
revisions 216741 to 216887 from branches/2018-10-01-gsnapl-speed to
increased speed of GSNAP and GSNAPL, especially for paired-end reads
* index.html: Updated for current version
2018-10-03 twu
* concordance.c, concordance.h, stage1hr.c: Using new interfaces to
Stage3pair_new and Concordance_pair_up procedures
* stage3hr.c, stage3hr.h: No longer filtering substrings based on
endtrim_allowed on one side. Performing resolve_insides at end of
Stage3pair_new
* segment-search.c: Fixed debugging statements
* path-solve.c: No longer calling a check creation of a substring of the
middle diagonal
* kmer-search.c: Hiding a debugging procedure
* acinclude.m4, configure.ac, genome128_consec.c, genome128_hr.c,
simd-intrinsics.m4: Added compiler checks for the SIMD intrinsics
_mm_extract_epi64 and _mm_popcnt_u64, and using them
* extension-search.c: Removed unused debugging procedure
* epu16-bitpack64-write.c: Modified comments
* bigendian.c, bigendian.h: Implemented FWRITE_USHORT and FWRITE_USHORTS for
bigendian machines
* substring.c: Fixed uninitialized fields querystart_pretrim and
queryend_pretrim in Substring_T object
2018-07-06 twu
 
* VERSION, config.site.rescomp.tst, index.html, path-solve.c, src, trunk:
......
2018-09-27
\ No newline at end of file
2019-01-24
\ No newline at end of file
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for gmap 2018-09-27.
# Generated by GNU Autoconf 2.69 for gmap 2019-01-24.
#
# Report bugs to <Thomas Wu <twu@gene.com>>.
#
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='gmap'
PACKAGE_TARNAME='gmap'
PACKAGE_VERSION='2018-09-27'
PACKAGE_STRING='gmap 2018-09-27'
PACKAGE_VERSION='2019-01-24'
PACKAGE_STRING='gmap 2019-01-24'
PACKAGE_BUGREPORT='Thomas Wu <twu@gene.com>'
PACKAGE_URL=''
 
......@@ -1373,7 +1373,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures gmap 2018-09-27 to adapt to many kinds of systems.
\`configure' configures gmap 2019-01-24 to adapt to many kinds of systems.
 
Usage: $0 [OPTION]... [VAR=VALUE]...
 
......@@ -1444,7 +1444,7 @@ fi
 
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of gmap 2018-09-27:";;
short | recursive ) echo "Configuration of gmap 2019-01-24:";;
esac
cat <<\_ACEOF
 
......@@ -1585,7 +1585,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
gmap configure 2018-09-27
gmap configure 2019-01-24
generated by GNU Autoconf 2.69
 
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2191,7 +2191,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
 
It was created by gmap $as_me 2018-09-27, which was
It was created by gmap $as_me 2019-01-24, which was
generated by GNU Autoconf 2.69. Invocation command line was
 
$ $0 $@
......@@ -2541,8 +2541,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking package version" >&5
$as_echo_n "checking package version... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2018-09-27" >&5
$as_echo "2018-09-27" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2019-01-24" >&5
$as_echo "2019-01-24" >&6; }
 
 
### Read defaults
......@@ -4409,7 +4409,7 @@ fi
 
# Define the identity of the package.
PACKAGE='gmap'
VERSION='2018-09-27'
VERSION='2019-01-24'
 
 
cat >>confdefs.h <<_ACEOF
......@@ -19937,7 +19937,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by gmap $as_me 2018-09-27, which was
This file was extended by gmap $as_me 2019-01-24, which was
generated by GNU Autoconf 2.69. Invocation command line was
 
CONFIG_FILES = $CONFIG_FILES
......@@ -20003,7 +20003,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
gmap config.status 2018-09-27
gmap config.status 2019-01-24
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
 
......
gmap (2019-01-24-1) UNRELEASED; urgency=medium
* New upstream version
* debhelper 12
* Standards-Version: 4.3.0
* Respect DEB_BUILD_OPTIONS in override_dh_auto_test target
-- Andreas Tille <tille@debian.org> Thu, 31 Jan 2019 14:07:07 +0100
gmap (2018-09-27-2) experimental; urgency=medium
* Add patch supposedly fixing builds on MIPS and ARM architectures
......
......@@ -6,12 +6,12 @@ Uploaders: Shaun Jackman <sjackman@debian.org>,
Section: non-free/science
XS-Autobuild: yes
Priority: optional
Build-Depends: debhelper (>= 11~),
Build-Depends: debhelper (>= 12~),
dh-exec,
help2man,
libbz2-dev,
zlib1g-dev
Standards-Version: 4.2.1
Standards-Version: 4.3.0
Vcs-Browser: https://salsa.debian.org/med-team/gmap
Vcs-Git: https://salsa.debian.org/med-team/gmap.git
Homepage: http://research-pub.gene.com/gmap
......
Subject: Update bigendian.[c,h] files in attempt to fix builds on arm and mips
Author: Upstream
Forwarded: not-needed
--- gmap.orig/src/bigendian.c
+++ gmap/src/bigendian.c
@@ -18,6 +18,45 @@
return;
--- a/src/bigendian.c
+++ b/src/bigendian.c
@@ -19,6 +19,45 @@ Bigendian_write_char (unsigned char valu
}
+
+/************************************************************************
+ * Unsigned short
......@@ -47,13 +47,13 @@ Forwarded: not-needed
+
+
/************************************************************************
* Int
* Unsigned short
************************************************************************/
--- gmap.orig/src/bigendian.h
+++ gmap/src/bigendian.h
@@ -98,6 +98,9 @@
#define FWRITE_UINT8S(a,n,fp) Bigendian_fwrite_uint8s(a,n,fp)
#endif
--- a/src/bigendian.h
+++ b/src/bigendian.h
@@ -101,6 +101,9 @@ Bigendian_fwrite_double (double value, F
#define FWRITE_USHORT(x,fp) Bigendian_fwrite_ushort(x,fp)
#define FWRITE_USHORTS(a,n,fp) Bigendian_fwrite_ushorts(a,n,fp)
+#define FWRITE_USHORT(x,fp) Bigendian_fwrite_ushort(x,fp)
+#define FWRITE_USHORTS(a,n,fp) Bigendian_fwrite_ushorts(a,n,fp)
......
......@@ -37,7 +37,9 @@ override_dh_install:
done
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
dh_auto_test --no-parallel
endif
override_dh_installexamples:
mkdir $(CURDIR)/debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)/examples
......
This diff is collapsed.
This diff is collapsed.
static char rcsid[] = "$Id: access.c 213998 2018-03-03 04:59:34Z twu $";
static char rcsid[] = "$Id: access.c 218147 2019-01-16 21:28:41Z twu $";
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
......@@ -690,13 +690,16 @@ shmem_attach (int *shmid, key_t *key, char *filename, size_t filesize, size_t el
0666)) != -1) {
/* Created new shared memory */
if ((memory = shmat(*shmid,NULL,0)) == (void *) -1) {
fprintf(stderr,"Error with shmat. Error %d: %s\n",errno,strerror(errno));
fprintf(stderr,"Error with shmat (1). Error %d: %s\n",errno,strerror(errno));
exit(9);
} else if (unload_shared_memory_p == true) {
semaphore_ids = Intlist_push(semaphore_ids,semid);
shmem_memory = List_push(shmem_memory,memory);
shmem_ids = Intlist_push(shmem_ids,*shmid);
copy_limited_from_file(memory,filename,filesize,eltsize);
donep = true;
} else {
semaphore_ids = Intlist_push(semaphore_ids,semid);
shmem_memory = List_push(shmem_memory,memory);
......@@ -709,7 +712,8 @@ shmem_attach (int *shmid, key_t *key, char *filename, size_t filesize, size_t el
} else if ((*shmid = shmget(*key,0,0)) != -1) {
/* Found existing shared memory */
if ((memory = shmat(*shmid,NULL,0)) == (void *) -1) {
fprintf(stderr,"Error with shmat. Error %d: %s\n",errno,strerror(errno));
fprintf(stderr,"Error with shmat (2). Error %d: %s\n",errno,strerror(errno));
exit(9);
} else if ((nattached = shmem_nattached(*shmid)) > 1) {
/* Existing memory is indeed valid: attached (by a process other than this one) */
......@@ -1009,9 +1013,9 @@ Access_mmap (int *fd, size_t *len, char *filename, bool randomp) {
,*fd,0);
if (memory == MAP_FAILED) {
fprintf(stderr,"Error in access.c (1): Got mmap failure on len %jd from length %jd. Error %d: %s\n",
length,length,errno,strerror(errno));
debug(printf("Got MAP_FAILED on len %jd from length %jd\n",length,length));
fprintf(stderr,"Error in access.c (1): Got mmap failure on file %s with length %jd. Error %d: %s\n",
filename,length,errno,strerror(errno));
debug(printf("Got MAP_FAILED on file %s with length %jd\n",filename,length));
memory = (void *) NULL;
} else if (randomp == true) {
......@@ -1149,9 +1153,9 @@ Access_mmap_rw (int *fd, size_t *len, char *filename, bool randomp) {
,*fd,0);
if (memory == MAP_FAILED) {
fprintf(stderr,"Error in access.c (3): Got mmap failure on len %jd from length %jd. Error %d: %s\n",
*len,length,errno,strerror(errno));
debug(printf("Got MAP_FAILED on len %zu from length %jd\n",*len,length));
fprintf(stderr,"Error in access.c (3): Got mmap failure on file %s with len %jd from length %jd. Error %d: %s\n",
filename,*len,length,errno,strerror(errno));
debug(printf("Got MAP_FAILED on file %s with len %zu from length %jd\n",filename,*len,length));
memory = (void *) NULL;
} else if (randomp == true) {
......@@ -1303,9 +1307,9 @@ Access_mmap_and_preload (int *fd, size_t *len, int *npages, double *seconds, cha
,*fd,0);
if (memory == MAP_FAILED) {
fprintf(stderr,"Error in access.c (5): Got mmap failure on len %jd from length %jd. Error %d: %s\n",
*len,length,errno,strerror(errno));
debug(printf("Got MAP_FAILED on len %jd from length %zu\n",*len,length));
fprintf(stderr,"Error in access.c (5): Got mmap failure on file %s with len %jd from length %jd. Error %d: %s\n",
filename,*len,length,errno,strerror(errno));
debug(printf("Got MAP_FAILED on file %s with len %jd from length %zu\n",filename,*len,length));
memory = (void *) NULL;
Stopwatch_stop(stopwatch);
Stopwatch_free(&stopwatch);
......
static char rcsid[] = "$Id: atoiindex.c 215536 2018-05-30 21:51:32Z twu $";
static char rcsid[] = "$Id: atoiindex.c 218151 2019-01-17 05:36:54Z twu $";
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
......@@ -59,6 +59,7 @@ static char rcsid[] = "$Id: atoiindex.c 215536 2018-05-30 21:51:32Z twu $";
#include "genomicpos.h"
#include "iit-read-univ.h"
#include "indexdb.h"
#include "indexdbdef.h"
#include "indexdb-write.h"
#include "genome.h"
#include "genome128_hr.h"
......@@ -730,10 +731,11 @@ sort_positions (char *ptrsfile, char *compfile, FILE *positions_high_fp, FILE *p
}
#if 0
/* G C G T */
static unsigned char ag_conversion[4] = {2, 1, 2, 3};
static char AG_CHARTABLE[4] = {'G','C','G','T'};
#endif
static void
compute_ag_local (char *new_region_filename,char *new_pointers_filename,
......@@ -996,7 +998,7 @@ compute_ag (char *new_pointers_filename, char *new_offsets_filename,
newoffsetsmeta = (UINT4 *) Access_allocate_private(&offsetsmeta_access,&offsetsmeta_len,&seconds,new_pointers_filename,sizeof(UINT4));
newoffsetsstrm = (UINT4 *) Access_allocate_private(&offsetsstrm_access,&offsetsstrm_len,&seconds,new_offsets_filename,sizeof(UINT4));
#endif
countermeta = Indexdb_bitpack_counter(&counterstrm,newoffsetsmeta,newoffsetsstrm,index1part);
countermeta = Indexdb_bitpack_counter(&counterstrm,newoffsetsmeta,index1part);
for (oligoi = 0; oligoi < oligospace; oligoi += BLOCKSIZE) {
Bitpack64_block_offsets(oldoffsets,oligoi,indexdb->offsetsmeta,indexdb->offsetsstrm);
......@@ -1093,9 +1095,11 @@ compute_ag (char *new_pointers_filename, char *new_offsets_filename,
}
#if 0
/* A C G C */
static unsigned char tc_conversion[4] = {0, 1, 2, 1};
static char TC_CHARTABLE[4] = {'A','C','G','C'};
#endif
static void
compute_tc_local (char *new_region_filename, char *new_pointers_filename,
......@@ -1360,7 +1364,7 @@ compute_tc (char *new_pointers_filename, char *new_offsets_filename,
newoffsetsmeta = (UINT4 *) Access_allocate_private(&offsetsmeta_access,&offsetsmeta_len,&seconds,new_pointers_filename,sizeof(UINT4));
newoffsetsstrm = (UINT4 *) Access_allocate_private(&offsetsstrm_access,&offsetsstrm_len,&seconds,new_offsets_filename,sizeof(UINT4));
#endif
countermeta = Indexdb_bitpack_counter(&counterstrm,newoffsetsmeta,newoffsetsstrm,index1part);
countermeta = Indexdb_bitpack_counter(&counterstrm,newoffsetsmeta,index1part);
for (oligoi = 0; oligoi < oligospace; oligoi += BLOCKSIZE) {
Bitpack64_block_offsets(oldoffsets,oligoi,indexdb->offsetsmeta,indexdb->offsetsstrm);
......@@ -1558,7 +1562,7 @@ main (int argc, char *argv[]) {
if ((localdb = Localdb_new_genome(&local1part,&local1interval,
sourcedir,fileroot,IDX_FILESUFFIX,/*snps_root*/NULL,
required_local1part,required_local1interval,
/*expand_offsets_p*/false,/*locoffsetsstrm_access*/USE_ALLOCATE,
/*locoffsetsstrm_access*/USE_ALLOCATE,
/*locpositions_access*/USE_ALLOCATE,/*sharedp*/false,
/*multiple_sequences_p*/false,/*unload_shared_memory_p*/false)) != NULL) {
local_mask = ~(~0U << 2*local1part);
......@@ -1627,7 +1631,7 @@ main (int argc, char *argv[]) {
required_index1part,required_index1interval,
/*expand_offsets_p*/false,/*offsetsstrm_access*/USE_ALLOCATE,
/*positions_access*/USE_ALLOCATE,/*sharedp*/false,
/*multiple_sequences_p*/false,/*unload_shared_memory_p*/false)) != NULL) {
/*multiple_sequences_p*/false,/*preload_shared_memory_p*/false,/*unload_shared_memory_p*/false)) != NULL) {
#ifdef HAVE_64_BIT
index_mask = ~(~0ULL << 2*index1part);
#else
......
static char rcsid[] = "$Id: bigendian.c 168395 2015-06-26 17:13:13Z twu $";
static char rcsid[] = "$Id: bigendian.c 216772 2018-10-03 21:26:53Z twu $";
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
......@@ -18,6 +18,45 @@ Bigendian_write_char (unsigned char value, int fd) {
return;
}
/************************************************************************
* Unsigned short
************************************************************************/
size_t
Bigendian_fwrite_ushort (unsigned short value, FILE *fp) {
unsigned char buf[2];
buf[1] = value & 0xff;
buf[0] = (value >>= 8) & 0xff;
if (fwrite(buf,sizeof(unsigned short),2,fp) == 0) {
/* Should set error indicator for stream and set errno */
return 0;
} else {
return 1;
}
}
size_t
Bigendian_fwrite_ushorts (unsigned short *array, int n, FILE *fp) {
unsigned char buf[4];
unsigned short value;
int i;
for (i = 0; i < n; i++) {
value = array[i];
buf[1] = value & 0xff;
buf[0] = (value >>= 8) & 0xff;
if (fwrite(buf,sizeof(unsigned short),2,fp) == 0) {
/* Should set error indicator for stream and set errno */
return 0;
}
}
return n;
}
/************************************************************************
* Int
************************************************************************/
......
/* $Id: bigendian.h 168395 2015-06-26 17:13:13Z twu $ */
/* $Id: bigendian.h 216772 2018-10-03 21:26:53Z twu $ */
#ifndef BIGENDIAN_INCLUDED
#define BIGENDIAN_INCLUDED
#ifdef HAVE_CONFIG_H
......@@ -98,6 +98,9 @@ Bigendian_fwrite_double (double value, FILE *fp);
#define FWRITE_UINT8S(a,n,fp) Bigendian_fwrite_uint8s(a,n,fp)
#endif
#define FWRITE_USHORT(x,fp) Bigendian_fwrite_ushort(x,fp)
#define FWRITE_USHORTS(a,n,fp) Bigendian_fwrite_ushorts(a,n,fp)
#define FREAD_CHARS(a,n,fp) fread(a,sizeof(char),n,fp)
#define FWRITE_CHARS(a,n,fp) fwrite(a,sizeof(char),n,fp)
......
static char rcsid[] = "$Id: bitpack64-write.c 212659 2018-01-20 00:58:14Z twu $";
static char rcsid[] = "$Id: bitpack64-write.c 216944 2018-10-10 07:14:00Z twu $";
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
......@@ -5358,7 +5358,7 @@ Bitpack64_write_differential_huge (char *pagesfile, char *ptrsfile, char *compfi
/* Write pages */
if (pagei > 0) {
pages[pagei++] = -1U; /* Final value */
pages[pagei++] = (UINT4) -1; /* Final value */
if ((pages_fp = FOPEN_WRITE_BINARY(pagesfile)) == NULL) {
fprintf(stderr,"Can't write to file %s\n",pagesfile);
exit(9);
......@@ -5521,7 +5521,7 @@ Bitpack64_write_differential_huge_bitpacks (char *pagesfile, char *ptrsfile, cha
/* Write pages */
if (pagei > 0) {
pages[pagei++] = -1U; /* Final value */
pages[pagei++] = (UINT4) -1; /* Final value */
if ((pages_fp = FOPEN_WRITE_BINARY(pagesfile)) == NULL) {
fprintf(stderr,"Can't write to file %s\n",pagesfile);
exit(9);
......@@ -5717,7 +5717,7 @@ Bitpack64_write_fixed10_huge (char *pagesfile, char *ptrsfile, char *compfile,
/* Write pages */
if (pagei > 0) {
pages[pagei++] = -1U; /* Final value */
pages[pagei++] = (UINT4) -1; /* Final value */
if ((pages_fp = FOPEN_WRITE_BINARY(pagesfile)) == NULL) {
fprintf(stderr,"Can't write to file %s\n",pagesfile);
exit(9);
......
static char rcsid[] = "$Id: block.c 214447 2018-03-26 03:17:38Z twu $";
static char rcsid[] = "$Id: block.c 218152 2019-01-17 05:37:56Z twu $";
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
......@@ -423,8 +423,7 @@ Block_process_oligo (Univcoord_T **fwdpositions, int *nfwdhits,
int
Block_process_oligo_5 (Univcoord_T **fwdpositions, int *nfwdhits,
Univcoord_T **revpositions, int *nrevhits,
T this, Indexdb_T indexdb_fwd, Indexdb_T indexdb_rev,
int indexdb_sizelimit) {
T this, Indexdb_T indexdb_fwd, Indexdb_T indexdb_rev) {
#if 0
printf("block_process: Querypos %d, oligos are %06X and %06X\n",this->last_querypos,this->forward,this->revcomp >> this->leftreadshift);
#endif
......@@ -440,8 +439,7 @@ Block_process_oligo_5 (Univcoord_T **fwdpositions, int *nfwdhits,
int
Block_process_oligo_3 (Univcoord_T **fwdpositions, int *nfwdhits,
Univcoord_T **revpositions, int *nrevhits,
T this, Indexdb_T indexdb_fwd, Indexdb_T indexdb_rev,
int indexdb_sizelimit) {
T this, Indexdb_T indexdb_fwd, Indexdb_T indexdb_rev) {
#if 0
printf("block_process Querypos %d, oligos are %06X and %06X\n",this->last_querypos,this->forward >> this->leftreadshift,this->revcomp);
#endif
......
/* $Id: block.h 214025 2018-03-05 07:06:43Z twu $ */
/* $Id: block.h 218152 2019-01-17 05:37:56Z twu $ */
#ifndef BLOCK_INCLUDED
#define BLOCK_INCLUDED
......@@ -56,13 +56,11 @@ Block_skip_3 (T this, int genestrand, int nskip);
extern int
Block_process_oligo_5 (Univcoord_T **fwdpositions, int *nfwdhits,
Univcoord_T **revpositions, int *nrevhits,
T this, Indexdb_T indexdb_fwd, Indexdb_T indexdb_rev,
int indexdb_sizelimit);
T this, Indexdb_T indexdb_fwd, Indexdb_T indexdb_rev);
extern int
Block_process_oligo_3 (Univcoord_T **fwdpositions, int *nfwdhits,
Univcoord_T **revpositions, int *nrevhits,
T this, Indexdb_T indexdb_fwd, Indexdb_T indexdb_rev,
int indexdb_sizelimit);
T this, Indexdb_T indexdb_fwd, Indexdb_T indexdb_rev);
#undef T
#endif
/* $Id: boyer-moore.h 157221 2015-01-22 18:38:57Z twu $ */
/* $Id: boyer-moore.h 218147 2019-01-16 21:28:41Z twu $ */
#ifndef BOYER_MOORE_INCLUDED
#define BOYER_MOORE_INCLUDED
#include "intlist.h"
#include "genomicpos.h"
#include "univcoord.h"
extern Intlist_T
BoyerMoore (char *query, int querylen, char *text, int textlen);
......
static char rcsid[] = "$Id: cellpool.c 212659 2018-01-20 00:58:14Z twu $";
static char rcsid[] = "$Id: cellpool.c 218147 2019-01-16 21:28:41Z twu $";
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
......@@ -48,28 +48,6 @@ struct T {
List_T listcellchunks;
};
void
Cellpool_free (T *old) {
List_T p;
struct Cell_T *objectptr;
struct List_T *listcellptr;
if (*old) {
for (p = (*old)->objectchunks; p != NULL; p = List_next(p)) {
objectptr = (struct Cell_T *) List_head(p);
FREE(objectptr);
}
List_free(&(*old)->objectchunks);
for (p = (*old)->listcellchunks; p != NULL; p = List_next(p)) {
listcellptr = (struct List_T *) List_head(p);
FREE(listcellptr);
}
List_free(&(*old)->listcellchunks);
FREE(*old);
}
return;
}
void
Cellpool_free_memory (T this) {
List_T p;
......@@ -100,6 +78,13 @@ Cellpool_free_memory (T this) {
return;
}
void
Cellpool_free (T *old) {
Cellpool_free_memory(*old);
FREE_KEEP(*old);
return;
}
void
Cellpool_report_memory (T this) {
......@@ -139,7 +124,7 @@ add_new_listcellchunk (T this) {
T
Cellpool_new (void) {
T new = (T) MALLOC(sizeof(*new));
T new = (T) MALLOC_KEEP(sizeof(*new));
new->nobjects = 0;
new->objectctr = 0;
......
/* $Id: changepoint.h 218286 2019-01-23 16:46:55Z twu $ */
#ifndef CHANGEPOINT_INCLUDED
#define CHANGEPOINT_INCLUDED
......