makeCoverageTracksWrapper: Make Coverage Tracks Wrapper

Description Usage Arguments Value Author(s) See Also Examples

Description

A wrapper callingconvertBamToBigWig() to make bigWig (.bw) coverage files of RNA-seq data and save them to a designated destination.

Usage

1
2
3
4
5
makeCoverageTracksWrapper(bamFiles, bwDir, singleEnded = TRUE,
                    NH.weight = FALSE, cores = 1, trackName,
		    TrackFileName = NULL, col = c(102, 194, 165),
		    pattern = "\.bw$", shortLabel = NULL,
		    longLabel = NULL)

Arguments

bamFiles

charactor strings of the bam files subject to be converted to coverage bigWig files.

bwDir

a character string specifying the destination of the bigWig files to be saved. For Tapscott lab, it HAS to be "/fh/fast/tapscott_s/pub/tapscott/ucsc/bigWig/..."

singleEnded

logical indicating whether the reads are single ended.

NH.weight

logical specifying whether the coverage should be weighted by the number of reported multiple alignments (NH column in bam files).

cores

a numerical indicating how many cores is available.

trackName

a character string specifying the name of the track to be appeared on UCSC genome browser.

TrackFileName

a character string specifying the track line txt file. Default to trackName_HubTrackLines.txt

col

a vector of three numerics indicating the rgb color.

pattern

a character string specifing the default to "\.bw$". The patter

shortLabel

a character string indicating the short label attribute of the track.

longLabel

a character string indicating the long label attribute of the track

Value

No value returns. The .bw files and a track line txt file will be saved to a designated destination indicated by bwDir parameter.

Author(s)

Chao-Jen Wong <cwon2@fredhutch.org>

See Also

convertBamToBigWig

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## The following case is Ashlee's canine RNA-seq samples. 
## Not run: 
pkgDir <- "/fh/fast/tapscott_s/R/RNA-Seq/canFam3.DuxFamily"
dataDir <- file.path(pkgDir, "data")
ngsDir <- "/shared/ngs/illumina/atyler/170208_SN367_0857_AHF37NBCXY"
bamDir <- file.path(ngsDir, "tophat", "bam")
bamFiles <- list.files(bamDir, pattern="\.bam$", full.names=TRUE)

bamFiles <- bamFiles[c(1, 5, 6)]

ucscDir <- "/fh/fast/tapscott_s/pub/tapscott/ucsc/bigWig"
bwDir <- file.path(ucscDir, "canFam3_CnMb_luciferase")
trackName <- "CnMb_luciferase_RNAseq"

library(RColorBrewer)
col <- col2rgb(brewer.pal(4, "Set2"))[, 1]
makeCoverageTracksWrapper(bamFiles=bamFiles,
                          bwDir=bwDir, #only one character
                          cores=1L, trackName=trackName,
                          col=col)
			  
setwd(bwDir)
dir()

## End(Not run)

TapscottLab/UCSCTrackTools documentation built on May 16, 2019, 2:28 a.m.