Compare commits
3 Commits
ed56cb1d6b
...
sumalib_v1
Author | SHA1 | Date | |
---|---|---|---|
9f08b85eaf | |||
d7cd7e2677 | |||
b11748eac8 |
10
Makefile
10
Makefile
@ -1,3 +1,4 @@
|
|||||||
|
PREFIX=/usr/local
|
||||||
|
|
||||||
SOURCES = libfasta/fasta_header_parser.c \
|
SOURCES = libfasta/fasta_header_parser.c \
|
||||||
libfasta/fasta_seq_writer.c \
|
libfasta/fasta_seq_writer.c \
|
||||||
@ -44,3 +45,12 @@ $(LIBFILE): $(OBJECTS)
|
|||||||
ar -cr $@ $?
|
ar -cr $@ $?
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
|
install: all
|
||||||
|
install -d $(DESTDIR)$(PREFIX)/lib/
|
||||||
|
install -m 644 $(LIBFILE) $(DESTDIR)$(PREFIX)/lib/
|
||||||
|
install -d $(DESTDIR)$(PREFIX)/include/
|
||||||
|
for lib in libfasta liblcs libsse libutils libfile ; do \
|
||||||
|
install -d $(DESTDIR)$(PREFIX)/include/$$lib ; \
|
||||||
|
cp $$lib/*.h $(DESTDIR)$(PREFIX)/include/$$lib ; \
|
||||||
|
done
|
||||||
|
|
||||||
|
@ -162,19 +162,24 @@ void seq_fillSeqOnlyATGC(char *seq, fastaSeqPtr seqElem, int seqLen)
|
|||||||
{
|
{
|
||||||
char* seqTemp;
|
char* seqTemp;
|
||||||
char c;
|
char c;
|
||||||
int32_t index = 0, seqIndex = 0, len = strlen(seq);
|
int32_t index = 1, seqIndex = 0, len = strlen(seq);
|
||||||
char* seqAlphabets = "acgtACGT";
|
char* seqAlphabets = "acgtACGT";
|
||||||
int notAllATGC = 0;
|
int notAllATGC = 0;
|
||||||
|
int goOnParsing = 1;
|
||||||
|
|
||||||
seqTemp = (char*) util_malloc(seqLen*sizeof(char), __FILE__, __LINE__);
|
seqTemp = (char*) util_malloc(seqLen*sizeof(char), __FILE__, __LINE__);
|
||||||
|
|
||||||
while (index < len)
|
while (goOnParsing)
|
||||||
{
|
{
|
||||||
c = seq[index++];
|
c = seq[index++];
|
||||||
if (strchr(seqAlphabets, c) != NULL)
|
if (strchr(seqAlphabets, c) != NULL)
|
||||||
seqTemp[seqIndex++] = tolower(c);
|
seqTemp[seqIndex++] = tolower(c);
|
||||||
|
else if (seq[index+1]=='\0')
|
||||||
|
goOnParsing = 0; // end of the sequence has been reached.
|
||||||
else if (c != '\n')
|
else if (c != '\n')
|
||||||
notAllATGC = 1;
|
notAllATGC = 1;
|
||||||
|
if (index == len)
|
||||||
|
goOnParsing = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (notAllATGC)
|
if (notAllATGC)
|
||||||
|
Reference in New Issue
Block a user