function matched_i = approximate_string_match(target_seqs, query_seq, n_chunks, n_chunks_threshold)

n_targets = length(target_seqs);
lseq = length(query_seq);
chunk_size = floor(lseq/n_chunks);
chunk_found = zeros(n_targets, n_chunks);

query_chunks = arrayfun(@(c) query_seq( (c-1)*chunk_size + [1:chunk_size]), 1:n_chunks,'uni',false);

for c=1:n_chunks
    chunk_found(:,c) = ~cellfun(@isempty, strfind(target_seqs, query_chunks{c}));

end


matched_i = sum(chunk_found,2) >=n_chunks - n_chunks_threshold;


end