comparison csaw.R @ 3:ce3ad612a104 draft

Uploaded
author dktanwar
date Mon, 18 Dec 2017 11:20:06 -0500
parents 66356a1014b1
children aa29b20bbb45
comparison
equal deleted inserted replaced
2:ed929b85b051 3:ce3ad612a104
13 13
14 library("csaw") 14 library("csaw")
15 library("stringr") 15 library("stringr")
16 library("data.table") 16 library("data.table")
17 library("getopt") 17 library("getopt")
18 library("Rsamtools")
18 19
19 20
20 options(stringAsfactors = FALSE, useFancyQuotes = FALSE) 21 options(stringAsfactors = FALSE, useFancyQuotes = FALSE)
21 # Take in trailing command line arguments 22 # Take in trailing command line arguments
22 23
26 print(output) 27 print(output)
27 print(inputs) 28 print(inputs)
28 29
29 # Separate multiple input files into a list of individual files 30 # Separate multiple input files into a list of individual files
30 files <- unlist(strsplit(inputs, ',')) 31 files <- unlist(strsplit(inputs, ','))
32
33 # Index bamfiles
34 indexBam(files = files)
31 35
32 # Create windows and count reads in them ---- 36 # Create windows and count reads in them ----
33 Sys.time() 37 Sys.time()
34 windows <- windowCounts(files, spacing=150, width=200, bin=F) 38 windows <- windowCounts(files, spacing=150, width=200, bin=F)
35 Sys.time() 39 Sys.time()