Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpibr
schu
UTRPolyribosomes
Commits
eaf4d2a5
Commit
eaf4d2a5
authored
Nov 21, 2017
by
Georgi Tushev
⚽
Browse files
add analysis
parent
1e70bd49
Changes
2
Show whitespace changes
Inline
Side-by-side
polyribosomeAnalysis.m
0 → 100644
View file @
eaf4d2a5
% 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
}];
readCountTable.m
0 → 100644
View file @
eaf4d2a5
function
data
=
readCountTable
(
fileName
)
% READCOUNTTABLE
fh
=
fopen
(
fileName
,
'r'
);
header
=
fgetl
(
fh
);
data
.
header
=
regexp
(
header
,
'\t'
,
'split'
);
fmt
=
repmat
({
'%n'
},
length
(
data
.
header
),
1
);
fmt
(
1
)
=
{
'%s'
};
fmt
=
sprintf
(
'%s '
,
fmt
{:});
fmt
(
end
)
=
[];
txt
=
textscan
(
fh
,
fmt
,
'delimiter'
,
'\t'
);
fclose
(
fh
);
data
.
label
=
txt
{
1
};
data
.
counts
=
[
txt
{
2
:
end
}];
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment