Description Usage Arguments Details Value See Also Examples
View source: R/dataImportsoGGi.R
This function imports the data from .bam files directly. It will
return a matrix with one column per .bam file and the respective counts per
postion in the rows. It uses the function regionPlot
from the package
soGGi
.
1 2 | importData_soGGi(bam_paths, TSS, fragment_lengths, sample_ids,
distanceUp = 1000, distanceDown = 1500, ...)
|
bam_paths |
a character vector of paths to the bam file(s) to be imported. |
TSS |
a GRanges (GenomicRanges-class) (or a class that inherets from it) object containing the TSS of interest. |
fragment_lengths |
an integer vector of fragment lengths, |
sample_ids |
a character vector of sample ids for the .bam files. This can also be a factor. |
distanceUp |
Distance upstream from centre of the TSS provided. |
distanceDown |
Distance downstream from centre of the TSS provided. |
... |
additional arguments passed to regionPlot. |
In the example below, we use a subsampled .bam file (0.1 % of the reads) from the Galonska et. al. WCE (whole cell extract) H3Kme3 data and associated TSS near identified peaks. For additional details on the data, see input_galonska and TSS_galonska.
a matrix that contains the postion-wise profiles per .bam file in the colmuns.
regionPlot
input_galonska TSS_galonska sample_table_galonska
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
data(sample_table_galonska)
data(TSS_galonska)
bam_dir <- file.path(system.file("extdata", package="DChIPRep"))
wce_bam <- "subsampled_0001_pc_SRR2144628_WCE_bowtie2_mapped-only_XS-filt_no-dups.bam"
mat_wce <- importData_soGGi(bam_paths = file.path(bam_dir, wce_bam),
TSS = TSS_galonska,
fragment_lengths = sample_table_galonska$input_fragment_length[1],
sample_ids = sample_table_galonska$input[1],
paired = FALSE,
removeDup=FALSE
)
head(mat_wce)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.