This is an automated email from the git hooks/post-receive script. malex-guest pushed a commit to branch master in repository gmap.
commit 4495e018ec7407f5249c84257984893e1cdbe080 Author: Alexandre Mestiashvili <a...@biotec.tu-dresden.de> Date: Fri Sep 15 09:16:13 2017 +0200 New upstream version 2017-09-11 --- ChangeLog | 15 ++++++ Makefile.in | 2 +- TODO | 3 -- VERSION | 2 +- configure | 24 ++++----- src/ChangeLog | 0 src/Makefile.in | 2 +- src/compile | 165 -------------------------------------------------------- src/gmap.c | 26 ++++----- src/pair.c | 120 ++++++++++++++++++++++++++++++++++------- 10 files changed, 143 insertions(+), 216 deletions(-) diff --git a/ChangeLog b/ChangeLog index a5e0526..f8bfc3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,20 @@ +2017-09-11 twu + + * VERSION: Updated version number + + * gmap.c, src: Merged revision 209800 from trunk to restore --intronlength + option + + * pair.c: Merged revisions 209797 and 209798 from trunk to replace gff3 + printing code for CDS with a call to the code for exons + + * gmap.c, src: Merged revision 209788 from trunk to no longer iterate on + check_middle_local + 2017-09-05 twu + * public-2017-09-05: Created public release + * sarray-search.c: Fixed bug resulting from check of common diagonal over circular origin diff --git a/Makefile.in b/Makefile.in index 1dc67f7..1a13b09 100644 --- a/Makefile.in +++ b/Makefile.in @@ -184,7 +184,7 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/compile \ $(top_srcdir)/config/config.sub \ $(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \ $(top_srcdir)/config/missing AUTHORS COPYING ChangeLog INSTALL \ - NEWS README TODO config/compile config/config.guess \ + NEWS README config/compile config/config.guess \ config/config.sub config/install-sh config/ltmain.sh \ config/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) diff --git a/TODO b/TODO deleted file mode 100644 index c5a7bd7..0000000 --- a/TODO +++ /dev/null @@ -1,3 +0,0 @@ - -Add flag that allows for splitting afterwards. - diff --git a/VERSION b/VERSION index a6b5878..5c57d19 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2017-09-05 \ No newline at end of file +2017-09-11 \ No newline at end of file diff --git a/configure b/configure index d0d7d18..9f64c4b 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gmap 2017-09-05. +# Generated by GNU Autoconf 2.69 for gmap 2017-09-11. # # Report bugs to <Thomas Wu <t...@gene.com>>. # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gmap' PACKAGE_TARNAME='gmap' -PACKAGE_VERSION='2017-09-05' -PACKAGE_STRING='gmap 2017-09-05' +PACKAGE_VERSION='2017-09-11' +PACKAGE_STRING='gmap 2017-09-11' PACKAGE_BUGREPORT='Thomas Wu <t...@gene.com>' PACKAGE_URL='' @@ -1369,7 +1369,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 2017-09-05 to adapt to many kinds of systems. +\`configure' configures gmap 2017-09-11 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1440,7 +1440,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gmap 2017-09-05:";; + short | recursive ) echo "Configuration of gmap 2017-09-11:";; esac cat <<\_ACEOF @@ -1577,7 +1577,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gmap configure 2017-09-05 +gmap configure 2017-09-11 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2183,7 +2183,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 2017-09-05, which was +It was created by gmap $as_me 2017-09-11, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2533,8 +2533,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: 2017-09-05" >&5 -$as_echo "2017-09-05" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2017-09-11" >&5 +$as_echo "2017-09-11" >&6; } ### Read defaults @@ -4401,7 +4401,7 @@ fi # Define the identity of the package. PACKAGE='gmap' - VERSION='2017-09-05' + VERSION='2017-09-11' cat >>confdefs.h <<_ACEOF @@ -19978,7 +19978,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 2017-09-05, which was +This file was extended by gmap $as_me 2017-09-11, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20044,7 +20044,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 2017-09-05 +gmap config.status 2017-09-11 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/ChangeLog b/src/ChangeLog deleted file mode 100644 index e69de29..0000000 diff --git a/src/Makefile.in b/src/Makefile.in index 2b2e097..5b6c083 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -2598,7 +2598,7 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/config/depcomp ChangeLog compile + $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ diff --git a/src/compile b/src/compile deleted file mode 100644 index 51522be..0000000 --- a/src/compile +++ /dev/null @@ -1,165 +0,0 @@ --*- mode: compilation; default-directory: "~/bioinfo/gmap/trunk/src/" -*- -Compilation started at Mon Dec 14 14:13:20 - -make -k gsnap.sse42 -/gne/home/twu/bin/gcc -DHAVE_CONFIG_H -I. -pthread -DTARGET=\"x86_64-unknown-linux-gnu\" -DGMAPDB=\"/gne/research/data/bioinfo/gmap/data/genomes\" -DMAX_READLENGTH=300 -DGSNAP=1 -DHAVE_SSE2=1 -DHAVE_SSSE3=1 -DHAVE_SSE4_1=1 -DHAVE_SSE4_2=1 -msse2 -mssse3 -msse4.1 -msse4.2 -mpopcnt -g -Wall -Wextra -DCHECK_ASSERTIONS=1 -MT gsnap_sse42-dynprog_simd.o -MD -MP -MF .deps/gsnap_sse42-dynprog_simd.Tpo -c -o gsnap_sse42-dynprog_simd.o `test -f 'dynprog_simd.c' || echo './'`dynprog_simd.c -dynprog_simd.c: In function ‘Dynprog_simd_8’: -dynprog_simd.c:2143:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2 = revp ? nt_to_int_array[gsequence[1-c]] : nt_to_int_array[gsequence[c-1]]; - ^ -dynprog_simd.c:2143:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:2144:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2_alt = revp ? nt_to_int_array[gsequence_alt[1-c]] : nt_to_int_array[gsequence_alt[c-1 - ^ -dynprog_simd.c:2144:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:2347:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2 = revp ? nt_to_int_array[gsequence[1-c]] : nt_to_int_array[gsequence[c-1]]; - ^ -dynprog_simd.c:2347:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:2348:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2_alt = revp ? nt_to_int_array[gsequence_alt[1-c]] : nt_to_int_array[gsequence_alt[c-1 - ^ -dynprog_simd.c:2348:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:1942:33: warning: variable ‘extend_ladder’ set but not used [-Wunused-but-set-variable] - __m128i gap_open, gap_extend, extend_ladder, complement_dummy; - ^ -dynprog_simd.c: In function ‘Dynprog_simd_8_upper’: -dynprog_simd.c:2770:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2 = revp ? nt_to_int_array[gsequence[1-c]] : nt_to_int_array[gsequence[c-1]]; - ^ -dynprog_simd.c:2770:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:2771:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2_alt = revp ? nt_to_int_array[gsequence_alt[1-c]] : nt_to_int_array[gsequence_alt[c-1 - ^ -dynprog_simd.c:2771:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:2896:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2 = revp ? nt_to_int_array[gsequence[1-c]] : nt_to_int_array[gsequence[c-1]]; - ^ -dynprog_simd.c:2896:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:2897:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2_alt = revp ? nt_to_int_array[gsequence_alt[1-c]] : nt_to_int_array[gsequence_alt[c-1 - ^ -dynprog_simd.c:2897:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:2632:8: warning: unused variable ‘na2_single’ [-Wunused-variable] - char na2_single; - ^ -dynprog_simd.c:2626:70: warning: unused variable ‘pairscore’ [-Wunused-variable] - Score8_T *pairscores[5], *pairscores_std_ptr, *pairscores_alt_ptr, pairscore; - ^ -dynprog_simd.c: In function ‘Dynprog_simd_8_lower’: -dynprog_simd.c:3238:3: error: ‘extend_ladder’ undeclared (first use in this function) - extend_ladder = _mm_setr_epi8(0,extend,2*extend,3*extend,4*extend,5*extend,6*extend,7*ext - ^ -dynprog_simd.c:3238:3: note: each undeclared identifier is reported only once for each function it appears in -dynprog_simd.c:3267:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na1 = revp ? nt_to_int_array[rsequence[1-r]] : nt_to_int_array[rsequence[r-1]]; - ^ -dynprog_simd.c:3267:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:3389:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na1 = revp ? nt_to_int_array[rsequence[1-r]] : nt_to_int_array[rsequence[r-1]]; - ^ -dynprog_simd.c:3389:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:3089:8: warning: unused variable ‘na2_single’ [-Wunused-variable] - char na2_single; - ^ -dynprog_simd.c:3083:45: warning: unused variable ‘pairscore’ [-Wunused-variable] - Score8_T *pairscores[5], *pairscores_ptr, pairscore; - ^ -dynprog_simd.c: In function ‘Dynprog_simd_16’: -dynprog_simd.c:3739:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2 = revp ? nt_to_int_array[gsequence[1-c]] : nt_to_int_array[gsequence[c-1]]; - ^ -dynprog_simd.c:3739:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:3740:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2_alt = revp ? nt_to_int_array[gsequence_alt[1-c]] : nt_to_int_array[gsequence_alt[c-1 - ^ -dynprog_simd.c:3740:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:3923:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2 = revp ? nt_to_int_array[gsequence[1-c]] : nt_to_int_array[gsequence[c-1]]; - ^ -dynprog_simd.c:3923:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:3924:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2_alt = revp ? nt_to_int_array[gsequence_alt[1-c]] : nt_to_int_array[gsequence_alt[c-1 - ^ -dynprog_simd.c:3924:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:3563:33: warning: variable ‘extend_ladder’ set but not used [-Wunused-but-set-variable] - __m128i gap_open, gap_extend, extend_ladder, complement_dummy; - ^ -dynprog_simd.c: In function ‘Dynprog_simd_16_upper’: -dynprog_simd.c:4259:3: error: ‘extend_ladder’ undeclared (first use in this function) - extend_ladder = _mm_setr_epi16(0,extend,2*extend,3*extend,4*extend,5*extend,6*extend,7*ex - ^ -dynprog_simd.c:4284:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2 = revp ? nt_to_int_array[gsequence[1-c]] : nt_to_int_array[gsequence[c-1]]; - ^ -dynprog_simd.c:4284:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:4285:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2_alt = revp ? nt_to_int_array[gsequence_alt[1-c]] : nt_to_int_array[gsequence_alt[c-1 - ^ -dynprog_simd.c:4285:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:4381:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2 = revp ? nt_to_int_array[gsequence[1-c]] : nt_to_int_array[gsequence[c-1]]; - ^ -dynprog_simd.c:4381:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:4382:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na2_alt = revp ? nt_to_int_array[gsequence_alt[1-c]] : nt_to_int_array[gsequence_alt[c-1 - ^ -dynprog_simd.c:4382:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:4158:8: warning: unused variable ‘na2_single’ [-Wunused-variable] - char na2_single; - ^ -dynprog_simd.c:4152:71: warning: unused variable ‘pairscore’ [-Wunused-variable] - Score16_T *pairscores[5], *pairscores_std_ptr, *pairscores_alt_ptr, pairscore; - ^ -dynprog_simd.c: In function ‘Dynprog_simd_16_lower’: -dynprog_simd.c:4675:3: error: ‘extend_ladder’ undeclared (first use in this function) - extend_ladder = _mm_setr_epi16(0,extend,2*extend,3*extend,4*extend,5*extend,6*extend,7*ex - ^ -dynprog_simd.c:4699:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na1 = revp ? nt_to_int_array[rsequence[1-r]] : nt_to_int_array[rsequence[r-1]]; - ^ -dynprog_simd.c:4699:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:4792:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] - na1 = revp ? nt_to_int_array[rsequence[1-r]] : nt_to_int_array[rsequence[r-1]]; - ^ -dynprog_simd.c:4792:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] -dynprog_simd.c:4542:8: warning: unused variable ‘na2_single’ [-Wunused-variable] - char na2_single; - ^ -dynprog_simd.c:4536:46: warning: unused variable ‘pairscore’ [-Wunused-variable] - Score16_T *pairscores[5], *pairscores_ptr, pairscore; - ^ -dynprog_simd.c: In function ‘Dynprog_traceback_8_lower’: -dynprog_simd.c:5278:8: warning: unused variable ‘add_dashes_p’ [-Wunused-variable] - bool add_dashes_p; - ^ -dynprog_simd.c:5275:11: warning: unused parameter ‘cdna_direction’ [-Wunused-parameter] - int cdna_direction, bool watsonp, int dynprogindex) { - ^ -dynprog_simd.c: In function ‘Dynprog_traceback_16_lower’: -dynprog_simd.c:5662:8: warning: unused variable ‘add_dashes_p’ [-Wunused-variable] - bool add_dashes_p; - ^ -dynprog_simd.c:5659:12: warning: unused parameter ‘cdna_direction’ [-Wunused-parameter] - int cdna_direction, bool watsonp, int dynprogindex) { - ^ -dynprog_simd.c: At top level: -dynprog_simd.c:1:13: warning: ‘rcsid’ defined but not used [-Wunused-variable] - static char rcsid[] = "$Id: dynprog_simd.c 146623 2014-09-02 21:31:32Z twu $"; - ^ -dynprog_simd.c:510:1: warning: ‘Directions8_print’ defined but not used [-Wunused-function] - Directions8_print (Direction8_T **directions_nogap, Direction8_T **directions_Egap, Directi - ^ -dynprog_simd.c:604:1: warning: ‘Directions8_print_ud’ defined but not used [-Wunused-function] - Directions8_print_ud (Direction8_T **directions_nogap, Direction8_T **directions_Egap, - ^ -dynprog_simd.c:713:1: warning: ‘Directions16_print’ defined but not used [-Wunused-function] - Directions16_print (Direction16_T **directions_nogap, Direction16_T **directions_Egap, Dire - ^ -dynprog_simd.c:807:1: warning: ‘Directions16_print_ud’ defined but not used [-Wunused-function] - Directions16_print_ud (Direction16_T **directions_nogap, Direction16_T **directions_Egap, - ^ -make: *** [gsnap_sse42-dynprog_simd.o] Error 1 -make: Target `gsnap.sse42' not remade because of errors. - -Compilation exited abnormally with code 2 at Mon Dec 14 14:13:23 diff --git a/src/gmap.c b/src/gmap.c index b8e3386..8c9e698 100644 --- a/src/gmap.c +++ b/src/gmap.c @@ -1,4 +1,4 @@ -static char rcsid[] = "$Id: gmap.c 209123 2017-08-15 19:30:25Z twu $"; +static char rcsid[] = "$Id: gmap.c 209801 2017-09-11 21:58:12Z twu $"; #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -120,7 +120,7 @@ static char rcsid[] = "$Id: gmap.c 209123 2017-08-15 19:30:25Z twu $"; #define MAX_BADOLIGOS 0.30 /* Setting to 1.0 effectively turns this check off */ #define MAX_REPOLIGOS 0.40 /* Setting to 1.0 effectively turns this check off */ -#define MAX_CHIMERA_ITER 3 +#define MAX_CHIMERA_ITER 1 /* Values larger than 1 can lead to very long (or infinite?) run times */ #define CHIMERA_PENALTY 30 /* A small value for chimera_margin will reduce this */ #define CHIMERA_IDENTITY 0.98 #define CHIMERA_PVALUE 0.01 @@ -510,6 +510,7 @@ static struct option long_options[] = { {"expand-offsets", required_argument, 0, 0}, /* expand_offsets_p */ {"min-intronlength", required_argument, 0, 0}, /* min_intronlength */ + {"intronlength", required_argument, 0, 'K'}, /* maxintronlen, maxintronlen_ends */ {"max-intronlength-middle", required_argument, 0, 0}, /* maxintronlen */ {"max-intronlength-ends", required_argument, 0, 0}, /* maxintronlen_ends */ {"split-large-introns", no_argument, 0, 0}, /* split_large_introns_p */ @@ -907,7 +908,6 @@ evaluate_query (bool *poorp, bool *repetitivep, char *queryuc_ptr, int queryleng static Stage3_T * stage3array_from_list (int *npaths_primary, int *npaths_altloc, int *first_absmq, int *second_absmq, List_T stage3list, bool mergedp, bool chimerap, bool remove_overlaps_p) { - List_T p; Stage3_T *array1, *array0, x, y; bool *eliminate; int norig_primary, norig_altloc, i_primary, i_altloc, i, j; @@ -5410,6 +5410,11 @@ parse_command_line (int argc, char *argv[], int optind) { } else if (!strcmp(long_name,"min-intronlength")) { min_intronlength = atoi(check_valid_int(optarg)); + } else if (!strcmp(long_name,"intronlength")) { + /* Included for backwards compatibility. Sets both + --max-intronlength-middle and --max-intronlength-ends */ + maxintronlen = maxintronlen_ends = atoi(check_valid_int(optarg)); + } else if (!strcmp(long_name,"max-intronlength-middle")) { maxintronlen = atoi(check_valid_int(optarg)); @@ -5658,12 +5663,6 @@ parse_command_line (int argc, char *argv[], int optind) { } break; - case 'K': - /* Included for backwards compatibility. Sets both - --max-intronlength-middle and --max-intronlength-ends */ - maxintronlen = maxintronlen_ends = atoi(check_valid_int(optarg)); - break; - case 'w': shortsplicedist = strtoul(check_valid_int(optarg),NULL,10); break; case 'L': maxtotallen_bound = atoi(check_valid_int(optarg)); break; @@ -7218,13 +7217,14 @@ Usage: gmap [OPTIONS...] <FASTA files...>, or\n\ ",min_intronlength); fprintf(stdout,"\ --max-intronlength-middle=INT Max length for one internal intron (default %d). Note: for backward\n\ - compatibility, the -K flag will set both --max-intronlength-middle\n\ - and --max-intronlength-ends. Also see --split-large-introns below.\n\ + compatibility, the -K or --intronlength flag will set both\n\ + --max-intronlength-middle and --max-intronlength-ends.\n\ + Also see --split-large-introns below.\n\ ",maxintronlen); fprintf(stdout,"\ --max-intronlength-ends=INT Max length for first or last intron (default %d). Note: for backward\n\ - compatibility, the -K flag will set both --max-intronlength-middle\n\ - and --max-intronlength-ends.\n\ + compatibility, the -K or --intronlength flag will set both\n\ + --max-intronlength-middle and --max-intronlength-ends.\n\ ",maxintronlen_ends); fprintf(stdout,"\ --split-large-introns Sometimes GMAP will exceed the value for --max-intronlength-middle,\n\ diff --git a/src/pair.c b/src/pair.c index 83bbc20..1d7fd5e 100644 --- a/src/pair.c +++ b/src/pair.c @@ -1,4 +1,4 @@ -static char rcsid[] = "$Id: pair.c 209124 2017-08-15 19:31:32Z twu $"; +static char rcsid[] = "$Id: pair.c 209799 2017-09-11 21:45:19Z twu $"; #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -2707,12 +2707,13 @@ print_gff3_exons_forward (Filestring_T fp, struct T *pairs, int npairs, int path char *sourcename, char *accession, char *chrstring, int querylength_given, int skiplength, int matches, int mismatches, int qindels, int tindels, int unknowns, bool watsonp, int cdna_direction, - bool gff_introns_p, bool gff_gene_format_p, bool gff_estmatch_format_p) { + bool gff_introns_p, bool gff_gene_format_p, bool gff_estmatch_format_p, + bool cds_p) { bool in_exon = false; struct T *ptr, *this = NULL; - int exon_querystart = -1, exon_queryend; + int exon_querystart = -1, exon_queryend, exon_phase; Chrpos_T exon_genomestart = -1, exon_genomeend, intron_start, intron_end; - int pctidentity, num = 0, den = 0, exonno = 0, i; + int pctidentity, num = 0, den = 0, exonno = 0, cdsno = 0, starti, endi, i; int Mlength = 0, Ilength = 0, Dlength = 0; List_T tokens = NULL; char token[11]; @@ -2723,8 +2724,26 @@ print_gff3_exons_forward (Filestring_T fp, struct T *pairs, int npairs, int path int last_querypos = -1; Chrpos_T last_genomepos = -1U; - ptr = pairs; - for (i = 0; i < npairs; i++) { + if (cds_p == false) { + starti = 0; + endi = npairs; + + } else { + i = 0; + while (i < npairs && (pairs[i].gapp == false && pairs[i].cdna != ' ' && pairs[i].aaphase_e == -1)) { + i++; + } + starti = i; + + while (i < npairs && (pairs[i].gapp == true || pairs[i].cdna == ' ' || pairs[i].aaphase_e != -1)) { + i++; + } + endi = i; + } + + + ptr = &(pairs[starti]); + for (i = starti; i < endi; i++) { /* prev = this; */ this = ptr++; @@ -2732,6 +2751,7 @@ print_gff3_exons_forward (Filestring_T fp, struct T *pairs, int npairs, int path if (in_exon == true) { exon_queryend = last_querypos + 1; exon_genomeend = last_genomepos + 1; + if (watsonp) { intron_start = exon_genomeend + 1; } else { @@ -2744,7 +2764,11 @@ print_gff3_exons_forward (Filestring_T fp, struct T *pairs, int npairs, int path pctidentity = (int) floor(100.0*(double) num/(double) den); } - if (gff_gene_format_p == true) { + if (cds_p == true) { + print_gff3_cds(fp,++cdsno,pathnum,sourcename,accession,chrstring,exon_genomestart,exon_genomeend, + exon_querystart,exon_queryend,watsonp,cdna_direction,pctidentity,exon_phase); + + } else if (gff_gene_format_p == true) { print_gff3_exon(fp,++exonno,pathnum,sourcename,accession,chrstring,exon_genomestart,exon_genomeend, exon_querystart,exon_queryend,watsonp,cdna_direction,pctidentity); } else { @@ -2778,6 +2802,7 @@ print_gff3_exons_forward (Filestring_T fp, struct T *pairs, int npairs, int path if (in_exon == false) { exon_querystart = this->querypos + 1; exon_genomestart = this->genomepos + 1; + exon_phase = this->aaphase_e; if (watsonp) { intron_end = exon_genomestart - 1; } else { @@ -2900,7 +2925,11 @@ print_gff3_exons_forward (Filestring_T fp, struct T *pairs, int npairs, int path pctidentity = (int) floor(100.0*(double) num/(double) den); } - if (gff_gene_format_p == true) { + if (cds_p == true) { + print_gff3_cds(fp,++cdsno,pathnum,sourcename,accession,chrstring,exon_genomestart,exon_genomeend, + exon_querystart,exon_queryend,watsonp,cdna_direction,pctidentity,exon_phase); + + } else if (gff_gene_format_p == true) { print_gff3_exon(fp,++exonno,pathnum,sourcename,accession,chrstring,exon_genomestart,exon_genomeend, exon_querystart,exon_queryend,watsonp,cdna_direction,pctidentity); } else { @@ -2941,12 +2970,12 @@ print_gff3_exons_forward (Filestring_T fp, struct T *pairs, int npairs, int path static void print_gff3_exons_backward (Filestring_T fp, struct T *pairs, int npairs, int pathnum, char *sourcename, char *accession, char *chrstring, - bool watsonp, int cdna_direction, bool gff_introns_p) { + bool watsonp, int cdna_direction, bool gff_introns_p, bool cds_p) { bool in_exon = false; struct T *ptr, *this = NULL; - int exon_querystart = -1, exon_queryend; + int exon_querystart = -1, exon_queryend, exon_phase; Chrpos_T exon_genomestart = -1, exon_genomeend; - int pctidentity, num = 0, den = 0, exonno = 0, i; + int pctidentity, num = 0, den = 0, exonno = 0, cdsno = 0, starti, endi, i; #if 0 int intronno = 0; Chrpos_T intron_start, intron_end; @@ -2954,8 +2983,26 @@ print_gff3_exons_backward (Filestring_T fp, struct T *pairs, int npairs, int pat int last_querypos = -1; Chrpos_T last_genomepos = -1U; - ptr = &(pairs[npairs-1]); - for (i = npairs-1; i >= 0; i--) { + if (cds_p == false) { + starti = 0; + endi = npairs; + + } else { + i = 0; + while (i < npairs && (pairs[i].gapp == false && pairs[i].cdna != ' ' && pairs[i].aaphase_e == -1)) { + i++; + } + starti = i; + + while (i < npairs && (pairs[i].gapp == true || pairs[i].cdna == ' ' || pairs[i].aaphase_e != -1)) { + i++; + } + endi = i; + } + + + ptr = &(pairs[endi-1]); + for (i = endi-1; i >= starti; i--) { /* prev = this; */ this = ptr--; @@ -2970,8 +3017,15 @@ print_gff3_exons_backward (Filestring_T fp, struct T *pairs, int npairs, int pat pctidentity = (int) floor(100.0*(double) num/(double) den); } - print_gff3_exon(fp,++exonno,pathnum,sourcename,accession,chrstring,exon_genomestart,exon_genomeend, - exon_querystart,exon_queryend,watsonp,cdna_direction,pctidentity); + if (cds_p == true) { + print_gff3_cds(fp,++cdsno,pathnum,sourcename,accession,chrstring,exon_genomestart,exon_genomeend, + exon_querystart,exon_queryend,watsonp,cdna_direction,pctidentity,exon_phase); + + } else { + print_gff3_exon(fp,++exonno,pathnum,sourcename,accession,chrstring,exon_genomestart,exon_genomeend, + exon_querystart,exon_queryend,watsonp,cdna_direction,pctidentity); + + } in_exon = false; } @@ -2983,6 +3037,7 @@ print_gff3_exons_backward (Filestring_T fp, struct T *pairs, int npairs, int pat if (in_exon == false) { exon_querystart = this->querypos + 1; exon_genomestart = this->genomepos + 1; + exon_phase = this->aaphase_e; if (gff_introns_p == true) { if (i > 0) { @@ -3036,12 +3091,20 @@ print_gff3_exons_backward (Filestring_T fp, struct T *pairs, int npairs, int pat pctidentity = (int) floor(100.0*(double) num/(double) den); } - print_gff3_exon(fp,++exonno,pathnum,sourcename,accession,chrstring,exon_genomestart,exon_genomeend, - exon_querystart,exon_queryend,watsonp,cdna_direction,pctidentity); + if (cds_p == true) { + print_gff3_cds(fp,++cdsno,pathnum,sourcename,accession,chrstring,exon_genomestart,exon_genomeend, + exon_querystart,exon_queryend,watsonp,cdna_direction,pctidentity,exon_phase); + } else { + print_gff3_exon(fp,++exonno,pathnum,sourcename,accession,chrstring,exon_genomestart,exon_genomeend, + exon_querystart,exon_queryend,watsonp,cdna_direction,pctidentity); + } + return; } +#if 0 +/* Replaced by print_gff3_exons_forward */ static void print_gff3_cdss_forward (Filestring_T fp, struct T *pairs, int npairs, int pathnum, char *sourcename, char *accession, char *chrstring, bool watsonp, int cdna_direction) { @@ -3140,7 +3203,11 @@ print_gff3_cdss_forward (Filestring_T fp, struct T *pairs, int npairs, int pathn return; } +#endif + +#if 0 +/* Replaced by print_gff3_exons_backward */ static void print_gff3_cdss_backward (Filestring_T fp, struct T *pairs, int npairs, int pathnum, char *sourcename, char *accession, char *chrstring, bool watsonp, int cdna_direction) { @@ -3241,6 +3308,7 @@ print_gff3_cdss_backward (Filestring_T fp, struct T *pairs, int npairs, int path return; } +#endif void @@ -3276,17 +3344,29 @@ Pair_print_gff3 (Filestring_T fp, struct T *pairs, int npairs, int pathnum, char print_gff3_exons_forward(fp,pairs,npairs,pathnum,start,end,sourcename,accession,chrstring, querylength_given,skiplength,matches,mismatches,qindels,tindels,unknowns, watsonp,cdna_direction,/*gff_introns_p*/false,/*gff_gene_format_p*/true, - /*gff_estmatch_format_p*/false); + /*gff_estmatch_format_p*/false,/*cds_p*/false); if (translation_end > 0) { +#if 0 print_gff3_cdss_forward(fp,pairs,npairs,pathnum,sourcename,accession,chrstring,watsonp, cdna_direction); +#else + print_gff3_exons_forward(fp,pairs,npairs,pathnum,start,end,sourcename,accession,chrstring, + querylength_given,skiplength,matches,mismatches,qindels,tindels,unknowns, + watsonp,cdna_direction,/*gff_introns_p*/false,/*gff_gene_format_p*/false, + /*gff_estmatch_format_p*/false,/*cds_p*/true); +#endif } } else { print_gff3_exons_backward(fp,pairs,npairs,pathnum,sourcename,accession,chrstring,watsonp, - cdna_direction,/*gff_introns_p*/false); + cdna_direction,/*gff_introns_p*/false,/*cds_p*/false); if (translation_end > 0) { +#if 0 print_gff3_cdss_backward(fp,pairs,npairs,pathnum,sourcename,accession,chrstring,watsonp, cdna_direction); +#else + print_gff3_exons_backward(fp,pairs,npairs,pathnum,sourcename,accession,chrstring,watsonp, + cdna_direction,/*gff_introns_p*/false,/*cds_p*/true); +#endif } } @@ -3294,7 +3374,7 @@ Pair_print_gff3 (Filestring_T fp, struct T *pairs, int npairs, int pathnum, char print_gff3_exons_forward(fp,pairs,npairs,pathnum,start,end,sourcename,accession,chrstring, querylength_given,skiplength,matches,mismatches,qindels,tindels,unknowns, watsonp,cdna_direction,/*gff_introns_p*/false,/*gff_gene_format_p*/false, - gff_estmatch_format_p); + gff_estmatch_format_p,/*cds_p*/false); } if (gff3_separators_p == true) { -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/gmap.git _______________________________________________ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit