Azzera filtri
Azzera filtri

increase buffer limit of dataread

1 visualizzazione (ultimi 30 giorni)
Rory
Rory il 31 Ott 2012
I am trying to use the function affygcrma() in the bioinformatics toolbox. I have the proper input arguments and followed the error in the debugger to find the culprit function.
affygcrma calls affyprobeseqread
affyprobeseqread calls fastaread, makes seq_struct
affyprobeseqread calls handlefastatext(seq_struct)
handlefastatext makes large cell arrays: probe_headers, probe_seqs, probe_ids, probe_xs
for my sequence of interest, the cell array probe_headers size is 1x39070 handlefastatext loops through cell array index and calls strread(i)
inside strread, numel(probe_header) exceeds buffer limit of dataread(), which is 4095
function crashes:
*Error using dataread
Trouble reading integer from file (row 1, field 4) ==> NM_005505.2 /DB_XREF=gi:21361199 /GEN=SCARB1
Error in strread (line 51)
[varargout{1:nlhs}]=dataread('string',varargin{:});
Error in handlefastatext (line 13)
[chip_type, probe_ids(i), probe_xs(i)]= strread(probe_headers{i},...*
It looks like I cannot proceed unless I can change the buffer limit to 39071
Please help!!

Risposta accettata

Walter Roberson
Walter Roberson il 31 Ott 2012
dataread() is an undocumented mex file.
Although the comment in strread() implies that the 'bufsize' parameter to dataread is limited to 4095, my experiments do not seem to find that limit being enforced. Perhaps though it is the limit on the number of output values; I did not test that.
Anyhow, you could experiment by copying strread and editing the limit.
  1 Commento
Jan
Jan il 31 Ott 2012
The source file dataread.c has been included in older Matlab versions. If you have access to one these versions, you can modify the source accordingly and recompile the function under a new name.

Accedi per commentare.

Più risposte (1)

Rory
Rory il 8 Nov 2012
thanks walter
i bet you are right. it turned out that my bug was not actually due to this function after all.

Categorie

Scopri di più su Programming in Help Center e File Exchange

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by