<commit_before>sampleData = importdata(binFile);
ref = importdata(refFile);

chromX = chromNum - 1;
chromY = chromNum;

chroms = zeros(length(ref.textdata)-1, 1);



for i = 1:length(ref.textdata)-1
	chrom = textscan(ref.textdata{i+1},'%s %s','delimiter','r');
	chromName = chrom{2}{1};
	switch chromName
		case 'X'
			chroms(i) = chromX;
		case 'Y'
			chroms(i) = chromY;
		otherwise
			chroms(i) = str2double(chromName);
	end
end

bins = ref.data(:, 2);
logLowess = sampleData.data(:,4);
clear ref sampleData





cbsInput = [chroms, bins, logLowess];
cbsOutput = cghcbs(cbsInput, 'ALPHA', alpha, 'PERMUTATIONS', 10000, 'STOPPINGRULE', false, 'SHOWPLOT', false);

numOfSegments = 0;
for i = 1:length(cbsOutput.SegmentData)
	for j = 1:length(cbsOutput.SegmentData(1, i).Mean)
		numOfSegments = numOfSegments + 1;
	end
end



segments = zeros(length(numOfSegments), 3);
k = 0;
for i = 1:length(cbsOutput.SegmentData)
	for j = 1:length(cbsOutput.SegmentData(1, i).Mean)
		k = k + 1;
		segments(k, 1) = cbsOutput.SegmentData(1, i).Start(j);
		segments(k, 2) = cbsOutput.SegmentData(1, i).End(j);
		segments(k, 3) = cbsOutput.SegmentData(1, i).Mean(j);
	end
end<commit_msg>Update matlab.base.txt<commit_after>sampleData = importdata(binFile);
ref = importdata(refFile);

chromX = chromNum - 1;
chromY = chromNum;

chroms = zeros(length(ref.textdata), 1);



for i = 1:length(ref.textdata)-1
	chrom = textscan(ref.textdata{i+1},'%s %s','delimiter','r');
	chromName = chrom{2}{1};
	switch chromName
		case 'X'
			chroms(i) = chromX;
		case 'Y'
			chroms(i) = chromY;
		otherwise
			chroms(i) = str2double(chromName);
	end
end

bins = ref.data(:, 2);
logLowess = sampleData;
clear ref sampleData





cbsInput = [chroms, bins, logLowess];
cbsOutput = cghcbs(cbsInput, 'ALPHA', alpha, 'PERMUTATIONS', 10000, 'STOPPINGRULE', false, 'SHOWPLOT', false);

numOfSegments = 0;
for i = 1:length(cbsOutput.SegmentData)
	for j = 1:length(cbsOutput.SegmentData(1, i).Mean)
		numOfSegments = numOfSegments + 1;
	end
end



segments = zeros(length(numOfSegments), 3);
k = 0;
for i = 1:length(cbsOutput.SegmentData)
	for j = 1:length(cbsOutput.SegmentData(1, i).Mean)
		k = k + 1;
		segments(k, 1) = cbsOutput.SegmentData(1, i).Start(j);
		segments(k, 2) = cbsOutput.SegmentData(1, i).End(j);
		segments(k, 3) = cbsOutput.SegmentData(1, i).Mean(j);
	end
end
{'fraction_non_alphanumeric': 0.16516902011125376, 'fraction_numerical': 0.02738553701326487, 'mean_word_length': 4.904040404040404, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2948441', 'n_tokens_mistral': 1080, 'n_tokens_neox': 951, 'n_words': 200}