Effacer les filtres
Effacer les filtres

increase buffer limit of dataread

1 vue (au cours des 30 derniers jours)
Rory
Rory le 31 Oct 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!!

Réponse acceptée

Walter Roberson
Walter Roberson le 31 Oct 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 commentaire
Jan
Jan le 31 Oct 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.

Connectez-vous pour commenter.

Plus de réponses (1)

Rory
Rory le 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.
  1 commentaire
Walter Roberson
Walter Roberson le 8 Nov 2012
Ah? What was the cause?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by