필터 지우기
필터 지우기

increase buffer limit of dataread

조회 수: 1 (최근 30일)
Rory
Rory 2012년 10월 31일
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!!

채택된 답변

Walter Roberson
Walter Roberson 2012년 10월 31일
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
Jan
Jan 2012년 10월 31일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

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

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by