📄 readseq.c
字号:
/* * $Id: readseq.c 1339 2006-09-21 19:46:28Z tbailey $ * * $Log$ * Revision 1.1 2005/07/29 17:18:51 nadya * Initial revision * *//* File: readseq.c * main() program for ureadseq.c, ureadseq.h * * Reads and writes nucleic/protein sequence in various * formats. Data files may have multiple sequences. * * Copyright 1990 by d.g.gilbert * biology dept., indiana university, bloomington, in 47405 * e-mail: gilbertd@bio.indiana.edu * * This program may be freely copied and used by anyone. * Developers are encourged to incorporate parts in their * programs, rather than devise their own private sequence * format. * * This should compile and run with any ANSI C compiler. * Please advise me of any bugs, additions or corrections. * */const char *title = "readSeq (1Feb93), multi-format molbio sequence reader.\n"; /* History 27 Feb 90. 1st release to public. 4 Mar 90. + Gary Olsen format + case change * minor corrections to NBRF,EMBL,others * output 1 file per sequence for gcg, unknown * define -DNOSTR for c-libraries w/o strstr - readseq.p, pascal version, becomes out-of-date 24 May 90. + Phylip 3.2 output format (no input) 20 Jul 90. + Phylip 3.3 output (no input yet) + interactive output re-direction + verbose progress info * interactive help output * dropped line no.s on NBRF output * patched in HyperGCG XCMD corrections, - except for seq. documentation handling * dropped the IG special nuc codes, as IG has adopted the standard IUB codes (now if only everyone would adopt a standard format !) 11 Oct 90. * corrected bug in reading/writing of EMBL format 17 Oct 91. * corrected bug in reading Olsen format (serious-deletion) 10 Nov 91. * corrected bug in reading some GCG format files (serious-last line duplicated) + add format name parsing (-fgb, -ffasta, ...) + Phylip v3.4 output format (== v3.2, sequential) + add checksum output to all forms that have document + skip mail headers in seq file + add pipe for standard input == seq file (with -p) * fold in parts of MacApp Seq object * strengthen format detection * clarify program structure * remove fixed sequence size limit (now dynamic, sizeof memory) * check and fold in accumulated bug reports: * Now ANSI-C fopen(..,"w") & check open failure * Define -DFIXTOUPPER for nonANSI C libraries that mess up toupper/tolower = No command-line changes; callers of readseq main() should be okay - ureadseq.h functions have changed; client programs need to note. + added Unix and VMS Make scripts, including validation tests 4 May 92. + added 32 bit CRC checksum as alternative to GCG 6.5bit checksum (-DBIGCHECKSUM) Aug 92 = fixed Olsen format input to handle files w/ more sequences, not to mess up when more than one seq has same identifier, and to convert number masks to symbols. = IG format fix to understand ^L 25-30 Dec 92 * revised command-line & interactive interface. Suggested form is now readseq infile -format=genbank -output=outfile -item=1,3,4 ... but remains compatible with prior commandlines: readseq infile -f2 -ooutfile -i3 ... + added GCG MSF multi sequence file format + added PIR/CODATA format + added NCBI ASN.1 sequence file format + added Pretty, multi sequence pretty output (only) + added PAUP multi seq format + added degap option + added Gary Williams (GWW, G.Williams@CRC.AC.UK) reverse-complement option. + added support for reading Phylip formats (interleave & sequential) * string fixes, dropped need for compiler flags NOSTR, FIXTOUPPER, NEEDSTRCASECMP * changed 32bit checksum to default, -DSMALLCHECKSUM for GCG version 1Feb93 = revert GenBank output to a fixed left number width which other software depends on. = fix for MSF input to handle symbols in names = fix bug for possible memory overrun when truncating seqs for Phylip or Paup formats (thanks Anthony Persechini) *//* Readseq has been tested with: Macintosh MPW C GNU gcc SGI cc VAX-VMS cc Any ANSI C compiler should be able to handle this. Old-style C compilers barf all over the source.How do I build the readseq program if I have an Ansi C compiler?#--------------------# Unix ANSI C# Use the supplied Makefile this way:% make CC=name-of-c-compiler# OR do this...% gcc readseq.c ureadseq.c -o readseq#--------------------$!VAX-VMS cc$! Use the supplied Make.Com this way:$ @make$! OR, do this:$ cc readseq, ureadseq$ link readseq, ureadseq, sys$library:vaxcrtl/lib$ readseq :== $ MyDisk:[myacct]readseq#--------------------# Macintosh Simple Input/Output Window application# requires MPW-C and SIOW library (from APDA)# also uses files macinit.c, macinit.r, readseqSIOW.make#Buildprogram readseqSIOW#--------------------#MPW-C v3 toolC ureadseq.cC readseq.clink -w -o readseq -t MPST -c 'MPS '
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -