diff csaw.R @ 3:ce3ad612a104 draft

Uploaded
author dktanwar
date Mon, 18 Dec 2017 11:20:06 -0500
parents 66356a1014b1
children aa29b20bbb45
line wrap: on
line diff
--- a/csaw.R	Mon Dec 18 10:58:39 2017 -0500
+++ b/csaw.R	Mon Dec 18 11:20:06 2017 -0500
@@ -15,6 +15,7 @@
 library("stringr")
 library("data.table")
 library("getopt")
+library("Rsamtools")
 
 
 options(stringAsfactors = FALSE, useFancyQuotes = FALSE)
@@ -29,6 +30,9 @@
 # Separate multiple input files into a list of individual files
 files <- unlist(strsplit(inputs, ','))
 
+# Index bamfiles
+indexBam(files = files)
+
 # Create windows and count reads in them ----
 Sys.time()
 windows <- windowCounts(files, spacing=150, width=200, bin=F)