comparison build_matrix.R @ 18:54ec2ba55b87 draft

Uploaded
author greg
date Thu, 10 Aug 2017 14:53:46 -0400
parents e8dd7b5e4e95
children 50f64f662726
comparison
equal deleted inserted replaced
17:e8dd7b5e4e95 18:54ec2ba55b87
14 14
15 r_matrix <- as.matrix(read.table(opt$input)); 15 r_matrix <- as.matrix(read.table(opt$input));
16 status <- match(r_matrix[,3], missing); 16 status <- match(r_matrix[,3], missing);
17 r_matrix[,3] <- paste(opt$work_dir, r_matrix[,1], ".", r_matrix[,2], ".bed.gz", sep=""); 17 r_matrix[,3] <- paste(opt$work_dir, r_matrix[,1], ".", r_matrix[,2], ".bed.gz", sep="");
18 r_matrix <- r_matrix[is.na(status)==TRUE,]; 18 r_matrix <- r_matrix[is.na(status)==TRUE,];
19 write.table(array(r_matrix, dim=c(length(r_matrix)/3, 3)), opt$output, quote=FALSE, row.names=FALSE, col.names=FALSE); 19 write.table(array(r_matrix, dim=c(length(r_matrix)/3, 3)), file=opt$output, quote=FALSE, row.names=FALSE, col.names=FALSE);