git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/MotifDb@107917 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -12,7 +12,7 @@ run = function (dataDir) |
12 | 12 |
raw.metadata.filename="md-raw.tsv") |
13 | 13 |
matrices <- normalizeMatrices (matrices) |
14 | 14 |
matrices <- renameMatrices (matrices, tbl.md) |
15 |
- |
|
15 |
+ |
|
16 | 16 |
serializedFile <- file.path(dataDir, "demo.RData") |
17 | 17 |
printf("writing %s to %s", "demo.RData", dataDir) |
18 | 18 |
|
... | ... |
@@ -35,7 +35,6 @@ readRawMatrices = function (dataDir) |
35 | 35 |
filename <- file.path(dataDir, "sample.pcm") |
36 | 36 |
printf("checking for readable matrix file:") |
37 | 37 |
printf(" %s", filename) |
38 |
- browser() |
|
39 | 38 |
stopifnot(file.exists(filename)) |
40 | 39 |
|
41 | 40 |
all.lines = scan (filename, what=character(0), sep='\n', quiet=TRUE) |
... | ... |
@@ -77,7 +76,7 @@ createMetadataTable = function (dataDir, matrices, raw.metadata.filename) |
77 | 76 |
|
78 | 77 |
tbl.raw <- read.table(filename, sep="\t", header=TRUE, as.is=TRUE) |
79 | 78 |
tbl.md = data.frame () |
80 |
- matrix.ids = names (matrices) |
|
79 |
+ matrix.ids = names(matrices) |
|
81 | 80 |
|
82 | 81 |
for (matrix.id in matrix.ids) { |
83 | 82 |
matrix <- matrices[[matrix.id]] |
... | ... |
@@ -102,7 +101,7 @@ createMetadataTable = function (dataDir, matrices, raw.metadata.filename) |
102 | 101 |
experimentType=md$type, |
103 | 102 |
pubmedID="24194598") |
104 | 103 |
tbl.md = rbind (tbl.md, data.frame (new.row, stringsAsFactors=FALSE)) |
105 |
- full.name = sprintf ('%s-%s-%s', organism, dataSource, matrix.id) |
|
104 |
+ full.name = sprintf ('%s-%s-%s-%s', organism, dataSource, md$gene.symbol, short.matrix.name) |
|
106 | 105 |
rownames (tbl.md) [nrow (tbl.md)] = full.name |
107 | 106 |
} # for i |
108 | 107 |
|
... | ... |
@@ -153,7 +152,6 @@ normalizeMatrices = function (matrices) |
153 | 152 |
parsePwm = function (text) |
154 | 153 |
{ |
155 | 154 |
lines = strsplit (text, '\t') |
156 |
- #browser() |
|
157 | 155 |
stopifnot(length(lines)==5) # title line, one line for each base |
158 | 156 |
title = lines [[1]][1] |
159 | 157 |
line.count = length(lines) |