rbbt-marq 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/R/CustomDS.R +8 -13
- data/bin/marq_config +0 -1
- metadata +1 -1
data/R/CustomDS.R
CHANGED
@@ -4,32 +4,27 @@ CustomDS.process <- function(prefix, cross_platform, conditions, description, tw
|
|
4
4
|
# Read data
|
5
5
|
genes = scan(file=paste(prefix,'codes',sep = "/"), what=character(),sep="\n",quiet=T);
|
6
6
|
m = matrix(scan(file=paste(prefix,'values',sep = "/"), sep="\t",quiet=T),length(genes),byrow=T);
|
7
|
-
|
8
|
-
str(genes);
|
9
|
-
rownames(m) <- genes
|
7
|
+
rownames(m) <- genes;
|
10
8
|
|
11
9
|
|
12
10
|
# Read conditions
|
13
11
|
conditions.list = vector();
|
14
12
|
names = vector();
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
str(values)
|
21
|
-
conditions.list = cbind(conditions.list, values)
|
13
|
+
for (file in conditions) {
|
14
|
+
filename = paste(prefix,file,sep="/");
|
15
|
+
values = scan(file=filename, what=character(), sep = "\n");
|
16
|
+
names = c(names, file);
|
17
|
+
conditions.list = cbind(conditions.list, values);
|
22
18
|
}
|
23
19
|
|
24
20
|
colnames(conditions.list) <- names;
|
25
|
-
str(conditions.list)
|
26
21
|
|
27
22
|
|
28
23
|
|
29
24
|
|
30
25
|
# Do log2 if needed
|
31
26
|
if (is.null(do.log2)){
|
32
|
-
do.log2 = MA.guess.do.log2(m, two.channel)
|
27
|
+
do.log2 = MA.guess.do.log2(m, two.channel);
|
33
28
|
}
|
34
29
|
if (do.log2){
|
35
30
|
m <- log2(m);
|
@@ -46,7 +41,7 @@ CustomDS.process <- function(prefix, cross_platform, conditions, description, tw
|
|
46
41
|
|
47
42
|
# Once the data is read, change the prefix for cross_platform ids
|
48
43
|
if (cross_platform){
|
49
|
-
prefix = paste(prefix,'cross_platform', sep="_")
|
44
|
+
prefix = paste(prefix,'cross_platform', sep="_");
|
50
45
|
}
|
51
46
|
|
52
47
|
values <- MA.process(m, conditions.list, two.channel);
|
data/bin/marq_config
CHANGED