Skip to content

Commit f0b8eec

Browse files
author
Dominik Schneider
committed
oops, wrong order for strsplit
1 parent a044524 commit f0b8eec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/makeVideos.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# Get command line arguments
99
args = commandArgs(trailingOnly = T)
10-
# args = c('output/from_diy_data', 'diy_data')
10+
# args = c('output/from_diy_data', 'diy_data/genotype_map.csv')
1111

1212
# test if there are two arguments: if not, return an error
1313
if (length(args)<2) {
@@ -89,6 +89,7 @@ arrange_gif = function(il, parameter_string) {
8989
sampleid_c = uil[2]
9090
gtype_treatment_label_t = get_treatment(sampleid_t)
9191
print(paste(sampleid_c, sampleid_t, sep = ' x '))
92+
print(gtype_treatment_label_t)
9293
print(parameter_string)
9394

9495
# get images
@@ -243,7 +244,7 @@ arrange_gif = function(il, parameter_string) {
243244
}
244245
}
245246
# newgif
246-
treatmentlabel = strsplit(' ',gtype_treatment_label_t)[[1]][2]
247+
treatmentlabel = strsplit(gtype_treatment_label_t,' ')[[1]][2]
247248
outfn = paste0(parameter_string, '_', sampleid_c, '_x_', sampleid_t, '_',treatmentlabel,'.gif')
248249
image_write_video(newgif, file.path(outdir, outfn), framerate = 2)
249250
# image_write_gif(newgif,file.path(outdir, outfn), delay=0.5)

0 commit comments

Comments
 (0)