polyribosomeAnalysis.m 693 Bytes
Newer Older
Georgi Tushev's avatar
Georgi Tushev committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
% polyribosomeAnalysis
clc
clear variables
close all

%% read stats file
stats = readCountTable('countTable_UTRPolysomes_Stats_21Nov2017.txt');

%% read ercc file
ercc = readCountTable('countTable_UTRPolysomes_ERCC_21Nov2017.txt');

%% read UTRs file
fh = fopen('countTable_UTRPolysomes_UTRs_21Nov2017.txt', 'r');
header = fgetl(fh);
header = regexp(header, '\t', 'split');
fmt = repmat({'%n'}, length(header), 1);
fmt(1:3) = {'%s'};
fmt = sprintf('%s ', fmt{:});
fmt(end) = [];
txt = textscan(fh, fmt, 'delimiter', '\t');
fclose(fh);
data.passid = txt{1};
data.symbol = txt{2};
data.feature = txt{3};
data.window = txt{4};
data.span = txt{5};
data.reads = txt{6};
data.counts = [txt{7:end}];