Add seqio 1.2.2, a set of C functions which can read/write

biological sequence files.

PR:		29922
Submitted by:	Tony Maher <tonym@biolateral.com.au>
This commit is contained in:
Johann Visagie 2001-08-22 12:07:26 +00:00
parent c4322da6d8
commit 8aff3a669c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=46640
10 changed files with 400 additions and 0 deletions

View file

@ -37,6 +37,7 @@
SUBDIR += rasmol
SUBDIR += recombine
SUBDIR += seaview
SUBDIR += seqio
SUBDIR += sim4
SUBDIR += tinker
SUBDIR += treeviewx

48
biology/seqio/Makefile Normal file
View file

@ -0,0 +1,48 @@
# New ports collection makefile for: seqio
# Date created: 17 August 2001
# Whom: Tony Maher
#
# $FreeBSD$
#
PORTNAME= seqio
PORTVERSION= 1.2.2
CATEGORIES= biology
MASTER_SITES= http://www.cs.ucdavis.edu/~gusfield/
DISTNAME= ${PORTNAME}
MAINTAINER= tonym@biolateral.com.au
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
EXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME}
EXAMPLES= example1.c example2.c example3.c example4.c seqio.c \
seqio.h Makefile
PROGRAMS= fmtseq grepseq idxseq typeseq wcseq
do-install:
${MKDIR} ${DOCSDIR}
${MKDIR} ${DOCSDIR}/html
${MKDIR} ${EXAMPLESDIR}
cd ${WRKSRC}; \
for file in ${PROGRAMS}; do \
${INSTALL_PROGRAM} $$file ${PREFIX}/bin; \
done
post-install:
.if !defined(NOPORTDOCS)
cd ${WRKSRC}; \
for file in ${EXAMPLES}; do \
${INSTALL_DATA} $$file ${EXAMPLESDIR}; \
done
${INSTALL_DATA} ${WRKSRC}/bioseq.txt ${DOCSDIR}
cd ${WRKSRC}/doc; \
for file in *.doc; do \
${INSTALL_DATA} $$file ${DOCSDIR}; \
done
cd ${WRKSRC}/html; \
for file in *.html; do \
${INSTALL_DATA} $$file ${DOCSDIR}/html; \
done
.endif
.include <bsd.port.mk>

1
biology/seqio/distinfo Normal file
View file

@ -0,0 +1 @@
MD5 (seqio.tar.gz) = c8e5d44485c8202082d4cfa516f9e0db

View file

@ -0,0 +1,11 @@
--- Makefile.orig Tue Aug 21 12:50:44 2001
+++ Makefile Tue Aug 21 12:51:13 2001
@@ -12,7 +12,7 @@
CFLAGS= -g -O2 -Wall -Wshadow
-all: grepseq fmtseq idxseq typeseq wcseq examples
+all: grepseq fmtseq idxseq typeseq wcseq
grepseq: grepseq.o seqio.o
$(CC) $(CFLAGS) -o grepseq grepseq.o seqio.o

View file

@ -0,0 +1,117 @@
--- fmtseq.c.orig Wed Jul 10 12:58:39 1996
+++ fmtseq.c Tue Aug 21 13:17:23 2001
@@ -37,7 +37,6 @@
#include <sys/stat.h>
#include "seqio.h"
-extern char *sys_errlist[];
#ifdef WIN32
@@ -70,6 +69,7 @@
#define ASK 2
#define ITEMLIST 3
+#define MAXLINE 128
int pretty_flag, pretty_count;
FILE *fpout;
@@ -81,7 +81,7 @@
} pretty;
-char dna_complement[128], rna_complement[128];
+char dna_complement[MAXLINE], rna_complement[MAXLINE];
/*
@@ -222,7 +222,7 @@
void print_options(int flag)
{
int i, j;
- char line[128];
+ char line[MAXLINE];
printf("Program Options (text in [...] is optional):\n");
printf(" -al[l] select all sequences\n");
@@ -249,7 +249,7 @@
if (flag) {
printf("More? ");
- gets(line);
+ fgets(line,MAXLINE-1,stdin);
if (line[0] == 'q' || line[0] == 'Q')
return;
}
@@ -264,7 +264,7 @@
if (flag) {
printf("More? ");
- gets(line);
+ fgets(line,MAXLINE-1,stdin);
if (line[0] == 'q' || line[0] == 'Q')
return;
}
@@ -1646,7 +1646,7 @@
s = line;
while (*s == '\0') {
printf("Enter: ");
- gets(line);
+ fgets(line,MAXLINE-1,stdin);
for (s=line; *s && isspace(*s); s++) ;
}
printf("----------------------\n\n");
@@ -1701,7 +1701,7 @@
{
static char defch = 'y';
int init_print, count;
- char *s, *entry, *eptr, line[128];
+ char *s, *entry, *eptr, line[MAXLINE];
putchar('\n');
if (seqcount == 1) {
@@ -1717,7 +1717,7 @@
eptr = entry = NULL;
while (1) {
printf("Select? [%c] ", defch);
- gets(line);
+ fgets(line,MAXLINE-1,stdin);
if (line[0] == '\0')
line[0] = defch;
@@ -1771,7 +1771,7 @@
SEQINFO *info, int mode)
{
int len;
- char *temp, tempbuffer[128];
+ char *temp, tempbuffer[MAXLINE];
if (buf != NULL)
temp = buf;
@@ -1803,7 +1803,7 @@
int pretty_store(char *seq, int seqlen, SEQINFO *info)
{
- char buffer[128];
+ char buffer[MAXLINE];
if (pretty_count == psize) {
if (psize == 0) {
@@ -2582,7 +2582,7 @@
void blastout_store(SEQFILE *sfp, char *seq, int seqlen, SEQINFO *info)
{
- static otherstrand = 0;
+ static int otherstrand = 0;
int pos, al_start, ingap, len;
char *s, *t1, *entry, *end, *line1, *line2;
ALIGN newalign;
@@ -3017,7 +3017,7 @@
{
int i;
- for (i=0; i < 128; i++)
+ for (i=0; i < MAXLINE; i++)
dna_complement[i] = dna_complement[i] = i;
dna_complement['a'] = 't'; dna_complement['A'] = 'T';

View file

@ -0,0 +1,155 @@
--- grepseq.c.orig Sat Aug 18 16:19:15 2001
+++ grepseq.c Sat Aug 18 16:37:58 2001
@@ -18,7 +18,6 @@
#include <string.h>
#include "seqio.h"
-extern char *sys_errlist[];
#define ASCII 4
@@ -475,7 +474,7 @@
ascii_alpha_mask[num] |= mask;
}
else
- ascii_alpha_mask[*s] |= mask;
+ ascii_alpha_mask[(int) *s] |= mask;
break;
case '.':
@@ -518,7 +517,7 @@
ascii_alpha_mask[num] |= mask;
}
else
- ascii_alpha_mask[*s] |= mask;
+ ascii_alpha_mask[(int) *s] |= mask;
}
else {
if (dna_flag) {
@@ -526,17 +525,17 @@
dna_flag = 0;
else
for ( ; *t; t++)
- dna_alpha_mask[*t] |= mask;
+ dna_alpha_mask[(int) *t] |= mask;
}
if (prt_flag) {
if ((t = prt_expand(*s)) == NULL)
prt_flag = 0;
else
for ( ; *t; t++)
- prt_alpha_mask[*t] |= mask;
+ prt_alpha_mask[(int) *t] |= mask;
}
- ascii_alpha_mask[*s] |= mask;
+ ascii_alpha_mask[(int) *s] |= mask;
}
}
@@ -557,17 +556,17 @@
dna_flag = 0;
else
for ( ; *t; t++)
- dna_alpha_mask[*t] |= mask;
+ dna_alpha_mask[(int) *t] |= mask;
}
if (prt_flag) {
if ((t = prt_expand(*s)) == NULL)
prt_flag = 0;
else
for ( ; *t; t++)
- prt_alpha_mask[*t] |= mask;
+ prt_alpha_mask[(int) *t] |= mask;
}
- ascii_alpha_mask[*s] |= mask;
+ ascii_alpha_mask[(int) *s] |= mask;
}
/*
@@ -677,16 +676,16 @@
*/
if (num_errors == 0) {
score = 0;
- while ((ch = *s) && table[ch] &&
- !((masklist0 = ((masklist0 << 1) & alpha_mask[*s]) + 1) &
+ while ((ch = *s) && table[(int) ch] &&
+ !((masklist0 = ((masklist0 << 1) & alpha_mask[(int) *s]) + 1) &
accept_mask))
s++;
}
else if (num_errors == 1) {
score = -1;
if (misonly_flag) {
- while ((ch = *s) && table[ch]) {
- chmask = alpha_mask[ch];
+ while ((ch = *s) && table[(int) ch]) {
+ chmask = alpha_mask[(int) ch];
last_mask = masklist0;
masklist0 = ((masklist0 << 1) & chmask) + 1;
masklist1 = ((masklist1 << 1) & chmask) | (last_mask << 1);
@@ -703,8 +702,8 @@
}
}
else {
- while ((ch = *s) && table[ch]) {
- chmask = alpha_mask[ch];
+ while ((ch = *s) && table[(int) ch]) {
+ chmask = alpha_mask[(int) ch];
last_mask = masklist0;
masklist0 = ((masklist0 << 1) & chmask) + 1;
masklist1 = ((masklist1 << 1) & chmask) | /* match */
@@ -727,8 +726,8 @@
else if (num_errors == 2) {
score = -1;
if (misonly_flag) {
- while ((ch = *s) && table[ch]) {
- chmask = alpha_mask[ch];
+ while ((ch = *s) && table[(int) ch]) {
+ chmask = alpha_mask[(int) ch];
last_mask = masklist0;
masklist0 = ((masklist0 << 1) & chmask) + 1;
newmask = ((masklist1 << 1) & chmask) | (last_mask << 1);
@@ -752,8 +751,8 @@
}
}
else {
- while ((ch = *s) && table[ch]) {
- chmask = alpha_mask[ch];
+ while ((ch = *s) && table[(int) ch]) {
+ chmask = alpha_mask[(int) ch];
last_mask = masklist0;
masklist0 = ((masklist0 << 1) & chmask) + 1;
newmask = ((masklist1 << 1) & chmask) | /* match */
@@ -785,8 +784,8 @@
}
else if (misonly_flag) {
score = -1;
- while ((ch = *s) && table[ch]) {
- chmask = alpha_mask[ch];
+ while ((ch = *s) && table[(int) ch]) {
+ chmask = alpha_mask[(int) ch];
last_mask = masklist[0];
masklist[0] = ((masklist[0] << 1) & chmask) + 1;
@@ -808,8 +807,8 @@
}
else {
score = -1;
- while ((ch = *s) && table[ch]) {
- chmask = alpha_mask[ch];
+ while ((ch = *s) && table[(int) ch]) {
+ chmask = alpha_mask[(int) ch];
last_mask = masklist[0];
masklist[0] = ((masklist[0] << 1) & chmask) + 1;
@@ -835,7 +834,7 @@
if (!ch)
break;
- else if (!table[ch]) {
+ else if (!table[(int) ch]) {
fprintf(stderr, "%s, entry %d: Sequence contains invalid characters.\n",
seqffilename(sfp, 0), seqfentryno(sfp));
return NULL;

View file

@ -0,0 +1,18 @@
--- seqio.c.orig Sat Aug 18 16:20:53 2001
+++ seqio.c Sat Aug 18 16:21:23 2001
@@ -147,7 +147,6 @@
* files, and replacement functions for system calls that don't exist on
* one or more machines.
*/
-extern char *sys_errlist[];
#if defined(__sun) && !defined(FILENAME_MAX)
#include <sys/param.h>
@@ -158,7 +157,6 @@
static int ctype_initflag = 0;
static char tubuf[384], *tuary;
-#define toupper(chr) tuary[(int) (chr)]
static void init_ctype(void)
{

View file

@ -0,0 +1 @@
A set of C functions which can read/write biological sequence files

9
biology/seqio/pkg-descr Normal file
View file

@ -0,0 +1,9 @@
"The SEQIO package is a set of C functions which can read and write
biological sequence files formatted using various file formats and which
can be used to perform database searches on biological databases."
- from the README file
WWW: http://www.cs.ucdavis.edu/~gusfield/seqio.html
--
Tony Maher <tonym@biolateral.com.au>

39
biology/seqio/pkg-plist Normal file
View file

@ -0,0 +1,39 @@
bin/fmtseq
bin/grepseq
bin/idxseq
bin/typeseq
bin/wcseq
%%PORTDOCS%%share/doc/seqio/html/bigaln_example.html
%%PORTDOCS%%share/doc/seqio/html/examples_doc.html
%%PORTDOCS%%share/doc/seqio/html/fmtseq_doc.html
%%PORTDOCS%%share/doc/seqio/html/idxseq_doc.html
%%PORTDOCS%%share/doc/seqio/html/seqio.html
%%PORTDOCS%%share/doc/seqio/html/seqio_bioseq.html
%%PORTDOCS%%share/doc/seqio/html/seqio_changes.html
%%PORTDOCS%%share/doc/seqio/html/seqio_doc.html
%%PORTDOCS%%share/doc/seqio/html/seqio_format.html
%%PORTDOCS%%share/doc/seqio/html/seqio_progr.html
%%PORTDOCS%%share/doc/seqio/html/seqio_qref.html
%%PORTDOCS%%share/doc/seqio/html/seqio_readme.html
%%PORTDOCS%%share/doc/seqio/html/seqio_toc.html
%%PORTDOCS%%share/doc/seqio/html/seqio_todo.html
%%PORTDOCS%%share/doc/seqio/html/seqio_user.html
%%PORTDOCS%%share/doc/seqio/bioseq.txt
%%PORTDOCS%%share/doc/seqio/examples.doc
%%PORTDOCS%%share/doc/seqio/fmtseq.doc
%%PORTDOCS%%share/doc/seqio/format.doc
%%PORTDOCS%%share/doc/seqio/idxseq.doc
%%PORTDOCS%%share/doc/seqio/programr.doc
%%PORTDOCS%%share/doc/seqio/quickref.doc
%%PORTDOCS%%share/doc/seqio/seqio.doc
%%PORTDOCS%%share/doc/seqio/user.doc
%%PORTDOCS%%share/examples/seqio/example1.c
%%PORTDOCS%%share/examples/seqio/example2.c
%%PORTDOCS%%share/examples/seqio/example3.c
%%PORTDOCS%%share/examples/seqio/example4.c
%%PORTDOCS%%share/examples/seqio/seqio.c
%%PORTDOCS%%share/examples/seqio/seqio.h
%%PORTDOCS%%share/examples/seqio/Makefile
%%PORTDOCS%%@dirrm share/doc/seqio/html
%%PORTDOCS%%@dirrm share/doc/seqio
%%PORTDOCS%%@dirrm share/examples/seqio