03-11-2007
thank you for your prompt response. This is exactly what I was looking for. Thank you.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Is it possible to create a dynamic array in shell script. I am trying to get the list of logfiles that created that day and put it in a dynamic array. I am not sure about it. help me
New to scripting
Gundu (3 Replies)
Discussion started by: gundu
3 Replies
2. Programming
Hi all,
I'm getting segmentation fault errors when I try to send/receive 2 rows of a matrix as a block, and I can't figure out why.
Basically, I have a 4x5 matrix with an extra top row and an extra leftmost column, making it a (4+1)x(5+1) matrix stored in P0. I'm trying to send the 2nd and 3rd... (1 Reply)
Discussion started by: lancer6238
1 Replies
3. Shell Programming and Scripting
i want to create an array
the array elements are populated depending upon the number of entries present in a data file
The data file is created dynamically
how to achieve the same
thanks (1 Reply)
Discussion started by: trichyselva
1 Replies
4. Programming
I am facing a strange error while creating posix threads:
Given below are two snippets of code, the first one works whereas the second one gives a garbage value in the output.
Snippet 1
This works:
--------------
int *threadids;
threadids = (int *) malloc (num_threads * sizeof(int));
... (4 Replies)
Discussion started by: kmehta
4 Replies
5. Programming
Hi,
I have the following problem: i must allocate a dynamic array from a subroutine which should return such array to main function. The subroutine has already a return parameter so i thought of pass the array as I/O parameter. I tried the following program but it doesn't work (segmentation... (11 Replies)
Discussion started by: littleboyblu
11 Replies
6. Shell Programming and Scripting
Hi,
I'm just trying to use a dynamic index for some array elements that I'm accessing within a loop. Specifically, I want to access an array at variable position $counter and then also at location $counter + 1 and $counter + 2 (the second and third array positions after it) but I keep getting... (0 Replies)
Discussion started by: weak_code-fu
0 Replies
7. Shell Programming and Scripting
Hello,
Can somebody please give me a snippet for the below requirement.
I want to assign the values separeted by a comma to be assigned to a dynamic array.
If I give an input (read statement) like abc1,abc2,abc3,abc4,abc5, all these strings abc* should be assigned to an array like below... (2 Replies)
Discussion started by: suneelj
2 Replies
8. Programming
Hi everyone
I am developing an utility.
At some part of it I read directory entries to a dynamic array: struct list
It stores pointers to items: list.entries,
which are structures: struct entry
If a number of files in a directory is greater then number of elements an array was initially... (11 Replies)
Discussion started by: torbium
11 Replies
9. Shell Programming and Scripting
First of I would just like to state that I am not looking for you guys to just do my work for me, I do want to learn and actually understand everything that is happening.
Hey all, I am having trouble on this. What I need to do is... Write an executable C file that will take a text file (not a... (8 Replies)
Discussion started by: innvert
8 Replies
10. Programming
I put together a C function to add strings to a dynamic array of strings (mostly for educational purpose to explain pointers to my kid). It works, but sometimes one or two strings in the array becomes corrupted. Running example on 64 bit Ubuntu, gcc ver. 4.8.4
Hope my code is self-explanatory:
... (2 Replies)
Discussion started by: migurus
2 Replies
LEARN ABOUT DEBIAN
fread_reading
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)