mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Patch type mismatch in apat C library
This commit is contained in:
14
pkg/obiapat/obiapat.c
Normal file → Executable file
14
pkg/obiapat/obiapat.c
Normal file → Executable file
@ -149,9 +149,9 @@ char *LowerSequence(char *seq)
|
|||||||
char *cseq;
|
char *cseq;
|
||||||
|
|
||||||
for (cseq = seq ; *cseq ; cseq++)
|
for (cseq = seq ; *cseq ; cseq++)
|
||||||
if (IS_UPPER(*cseq))
|
if (IS_UPPER(*cseq)) {
|
||||||
*cseq = TO_LOWER(*cseq);
|
*cseq = TO_LOWER(*cseq);
|
||||||
|
}
|
||||||
return seq;
|
return seq;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -299,14 +299,14 @@ int32_t delete_apatseq(SeqPtr pseq,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
PatternPtr buildPattern(const char *pat, int32_t error_max, uint8_t hasIndel,
|
Pattern *buildPattern(const char *pat, int32_t error_max, uint8_t hasIndel,
|
||||||
int *errno, char **errmsg)
|
int *errno, char **errmsg)
|
||||||
{
|
{
|
||||||
PatternPtr pattern;
|
Pattern *pattern;
|
||||||
int32_t patlen;
|
int32_t patlen;
|
||||||
int32_t patlen2;
|
int32_t patlen2;
|
||||||
|
|
||||||
patlen = strlen(pat);
|
patlen = (int32_t)strlen(pat);
|
||||||
patlen2 = lenPattern(pat);
|
patlen2 = lenPattern(pat);
|
||||||
|
|
||||||
pattern = ECOMALLOC(sizeof(Pattern) + // Space for struct Pattern
|
pattern = ECOMALLOC(sizeof(Pattern) + // Space for struct Pattern
|
||||||
@ -341,10 +341,10 @@ PatternPtr buildPattern(const char *pat, int32_t error_max, uint8_t hasIndel,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PatternPtr complementPattern(PatternPtr pat, int *errno,
|
Pattern *complementPattern(Pattern *pat, int *errno,
|
||||||
char **errmsg)
|
char **errmsg)
|
||||||
{
|
{
|
||||||
PatternPtr pattern;
|
Pattern *pattern;
|
||||||
|
|
||||||
pattern = ECOMALLOC(sizeof(Pattern) +
|
pattern = ECOMALLOC(sizeof(Pattern) +
|
||||||
sizeof(char) * strlen(pat->cpat) + 1 +
|
sizeof(char) * strlen(pat->cpat) + 1 +
|
||||||
|
10
pkg/obiapat/obiapat.h
Normal file → Executable file
10
pkg/obiapat/obiapat.h
Normal file → Executable file
@ -116,13 +116,13 @@ ecoseq_t *new_ecoseq_with_data( char *AC,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int32_t delete_apatseq(SeqPtr pseq,
|
int32_t delete_apatseq(Seq *pseq,
|
||||||
int *errno, char **errmsg);
|
int *errno, char **errmsg);
|
||||||
PatternPtr buildPattern(const char *pat, int32_t error_max, uint8_t hasIndel, int *errno, char **errmsg);
|
Pattern *buildPattern(const char *pat, int32_t error_max, uint8_t hasIndel, int *errno, char **errmsg);
|
||||||
PatternPtr complementPattern(PatternPtr pat, int *errno, char **errmsg);
|
Pattern *complementPattern(Pattern *pat, int *errno, char **errmsg);
|
||||||
|
|
||||||
SeqPtr new_apatseq(const char *in,int32_t circular, int32_t seqlen,
|
Seq *new_apatseq(const char *in,int32_t circular, int32_t seqlen,
|
||||||
SeqPtr out,
|
Seq *out,
|
||||||
int *errno, char **errmsg);
|
int *errno, char **errmsg);
|
||||||
|
|
||||||
char *ecoComplementPattern(char *nucAcSeq);
|
char *ecoComplementPattern(char *nucAcSeq);
|
||||||
|
4
pkg/obiapat/pattern.go
Normal file → Executable file
4
pkg/obiapat/pattern.go
Normal file → Executable file
@ -26,7 +26,7 @@ var _AllocatedApaPattern = 0
|
|||||||
// ApatPattern stores a regular pattern usable by the
|
// ApatPattern stores a regular pattern usable by the
|
||||||
// Apat algorithm functions and methods
|
// Apat algorithm functions and methods
|
||||||
type _ApatPattern struct {
|
type _ApatPattern struct {
|
||||||
pointer *C.Pattern
|
pointer C.PatternPtr
|
||||||
pattern string
|
pattern string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,7 +159,7 @@ func (pattern ApatPattern) Free() {
|
|||||||
// Print method prints the ApatPattern to the standard output.
|
// Print method prints the ApatPattern to the standard output.
|
||||||
// This is mainly a debug method.
|
// This is mainly a debug method.
|
||||||
func (pattern ApatPattern) Print() {
|
func (pattern ApatPattern) Print() {
|
||||||
C.PrintDebugPattern(C.PatternPtr(pattern.pointer.pointer))
|
C.PrintDebugPattern((*C.Pattern)(pattern.pointer.pointer))
|
||||||
}
|
}
|
||||||
|
|
||||||
// MakeApatSequence casts an obiseq.BioSequence to an ApatSequence.
|
// MakeApatSequence casts an obiseq.BioSequence to an ApatSequence.
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
// corresponds to the last commit, and not the one when the file will be
|
// corresponds to the last commit, and not the one when the file will be
|
||||||
// commited
|
// commited
|
||||||
|
|
||||||
var _Commit = "a57cfda"
|
var _Commit = "c0ecaf9"
|
||||||
var _Version = "Release 4.4.0"
|
var _Version = "Release 4.4.0"
|
||||||
|
|
||||||
// Version returns the version of the obitools package.
|
// Version returns the version of the obitools package.
|
||||||
|
Reference in New Issue
Block a user