Cody

# Problem 811. Genome Sequence 004: Long 3rd Generation Segment Correction

Solution 288621

Submitted on 24 Jul 2013 by Frequency Domain
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
%% feval(@assignin,'caller','score',0);

2   Pass
%% M=[]; flag=0; w=100; [M_fix,N]=PacBio_fix(M,w,flag); M_truth=randi(4,1,w,'uint8')-1; M=repmat(M_truth,N,1); % Apply 15% substitution error qerr=floor(.15*N*w); errvec=randi(N*w,qerr,1); errval=randi(4,qerr,1)-1; M(errvec)=errval; flag=1; tic [M_fix,N]=PacBio_fix(M,w,flag); toc assert(isequal(M_fix,M_truth),sprintf('Error Count=%i',sum(M_fix~=M_truth)))

N = 100 N = 100 Elapsed time is 0.031517 seconds.

3   Pass
%% M=[]; flag=0; w=6144; [M_fix,N]=PacBio_fix(M,w,flag); M_truth=randi(4,1,w,'uint8')-1; M=repmat(M_truth,N,1); % Apply 15% substitution error qerr=floor(.15*N*w); errvec=randi(N*w,qerr,1); errval=randi(4,qerr,1)-1; M(errvec)=errval; flag=1; tic [M_fix,N]=PacBio_fix(M,w,flag); toc assert(isequal(M_fix,M_truth),sprintf('Error Count=%i',sum(M_fix~=M_truth)))

N = 100 N = 100 Elapsed time is 0.012001 seconds.

4   Pass
%% % Size Performance is based on w=1024 case M=[]; flag=0; w=1024; [M_fix,N]=PacBio_fix(M,w,flag); M_truth=randi(4,1,w,'uint8')-1; M=repmat(M_truth,N,1); % Apply 15% substitution error qerr=floor(.15*N*w); errvec=randi(N*w,qerr,1); errval=randi(4,qerr,1)-1; M(errvec)=errval; flag=1; tic [M_fix,not_N]=PacBio_fix(M,w,flag); toc assert(isequal(M_fix,M_truth),sprintf('Error Count=%i',sum(M_fix~=M_truth))) feval(@assignin,'caller','score',min(20,N));

N = 100 N = 100 Elapsed time is 0.000374 seconds.