Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

scf2read(3) [debian man page]

scf2read(3)							  Staden Package						       scf2read(3)

NAME
scf2read, read2scf, exp2read, read2exp - Translate to and from the Read structure. SYNOPSIS
#include <Read.h> Read *scf2read( Scf *scf); Scf *read2scf( Read *read); Exp_info *read2exp( Read *read, char *EN); Read *exp2read( Exp_info *e); DESCRIPTION
These functions are used internally by the io library for converting between the in memory representations of the supported file formats. The Read structure is the central format so only conversion to and from this structure is available. Conversions consist of to and from the SCF format and to and from the Experiment File format. scf2read() converts an Scf structure into a Read structure. The Read structure is allocated by the function. The Scf structure is left unchanged. read2scf() converts a Read structure into an Scf structure. The Scf structure is allocated by the function. The Read structure is left unchanged. exp2read() converts an Exp_info structure into a Read structure. The entryname to use in the EN line type of the Experiment File must be specified. The Read structure is allocated by the function. The Exp_info structure is left unchanged. read2exp() converts a Read structure into an Exp_info structure. The Exp_info structure is allocated by the function. The Read structure is left unchanged. RETURN VALUES
On successful completion, the scf2read() and exp2read functions return a pointer to an allocated Read structure. Otherwise these functions return NULLRead. On successful completion, the read2scf function returns a pointer to an allocated Scf structure. Otherwise this function returns a null pointer. On successful completion, the read2exp function returns a pointer to an allocated Exp_info structure. Otherwise this function returns a null pointer. SEE ALSO
read_reading(3), fread_reading(3), write_reading(3), fwrite_reading(3), scf(4), ExperimentFile(4) scf2read(3)

Check Out this Related Man Page

read_reading(3) 						  Staden Package						   read_reading(3)

NAME
read_reading, fread_reading - Read a trace file into a Read structure. SYNOPSIS
#include <Read.h> Read *read_reading( char *filename, int format); Read *fread_reading( FILE *fp, char *filename, int format); DESCRIPTION
These functions read trace files into a Read structure. A variety of formats are supported including ABI, ALF and SCF. (Note that the first two are only supported when the library is used as part of the Staden Package.) Additionally, support for reading the plain (old) staden format files and Experiment files is included. Compressed trace files may also be read. Decompression is performed using either gzip -d or uncompress and is written to a temporary file for further processing. The temporary file is then read and removed. When reading an experiment file the trace file referenced by the LN and LT line types is read. The QL, QR (left and right quality clips), SL and SR (left and right vector clips) are taken from the Experiment file to produce the cutoff information held within the Read struc- ture. The orig_trace field of the Read structure will then contain the pointer to the experiment file structure and the orig_trace_format field will be set to TT_EXP. The functions allocate a Read structure which is returned. To deallocate this structure use the read_deallocate() function. read_reading() reads a trace from the specified filename and format. Formats available are TT_SCF, TT_ABI, TT_ALF, TT_PLN, TT_EXPand TT_ANY. Specifying format TT_ANY will attempt to automatically detect the corret format type by analysing the trace file for magic numbers and composition. The format field of the structure can then be used to determine the real trace type. fread_reading() reads a trace from the specified file pointer. The filename argument is used for setting the trace_name field of the resulting structure, and for error messages. Otherwise the function is identical to the read_reading() function. The Read structure itself is as follows. typedef uint_2 TRACE; /* for trace heights */ typedef struct { int format; /* Trace file format */ char *trace_name; /* Trace file name */ int NPoints; /* No. of points of data */ int NBases; /* No. of bases */ /* Traces */ TRACE *traceA; /* Array of length `NPoints' */ TRACE *traceC; /* Array of length `NPoints' */ TRACE *traceG; /* Array of length `NPoints' */ TRACE *traceT; /* Array of length `NPoints' */ TRACE maxTraceVal; /* The maximal value in any trace */ /* Bases */ char *base; /* Array of length `NBases' */ uint_2 *basePos; /* Array of length `NBases' */ /* Cutoffs */ int leftCutoff; /* Number of unwanted bases */ int rightCutoff; /* Number of unwanted bases */ /* Miscellaneous Sequence Information */ char *info; /* misc seq info, eg comments */ /* Probability information */ char *prob_A; /* Array of length 'NBases' */ char *prob_C; /* Array of length 'NBases' */ char *prob_G; /* Array of length 'NBases' */ char *prob_T; /* Array of length 'NBases' */ /* The original input format data, or NULL if inapplicable */ int orig_trace_format; void *orig_trace; } Read; RETURN VALUES
On successful completion, the read_reading() and fread_reading() functions return a pointer to a Read structure. Otherwise these functions return NULLRead (which is a null pointer). SEE ALSO
write_reading(3), fwrite_reading(3), deallocate_reading(3), scf(4), ExperimentFile(4) read_reading(3)
Man Page