data loaded with loadMappedReads or an AlignedRead object from the ShortRead package
file
Name of the file where the results will be saved. If NA the results will not be saved in a file.
chr
Character vector containing the chromosome names as identified on input.
chrL
Numeric vector containing the length (bp) of the chromosomes. It should be in the same order than chr
w
Integer corresponding to the desired length of the extended reads. An advised value will be the average fragment length of the DNA submitted to sequence (usually 300 bp).
considerStrand
Character value.
"Minimum"=>Default value. Report the minimum number of hits at each nucleotide position for both strands.
"Foward"=> Report the number of hits at each nucleotide position for the "foward" strands (the one denoted as "+" in q).
"Reverse"=>Report the number of hits at each nucleotide position for the "reverse" strands (the one denoted as "-" in q).
"Sum"=>Report the sum of number of hits at each nucleotide position for both strands.
uniquelyMapped
Logic value, If TRUE, only consider uniquely mapped reads.
uniquePosition
Logic value. If TRUE, only consider reads mapped in different positions.
Value
A list to be used for other functions of the CSAR package
chr
Chromosme names
chrL
Chromosme length (bp)
chrL_0
Number of nucleotide positions with at least one extended read
chrL_0
Number of nucleotide positions with at least one extended read
filenames
Name of the files where the Nhits values are storaged
c1
Sum of all the Nhits values for each chromosome
c2
Sum of all the Nhits square values for each chromosome
Muino et al. (submitted). Plant ChIP-seq Analyzer: An R package for the statistical detection of protein-bound genomic regions. Kaufmann et al.(2009).Target genes of the MADS transcription factor SEPALLATA3: integration of developmental and hormonal pathways in the Arabidopsis flower. PLoS Biology; 7(4):e1000090.
See Also
CSAR-package
Examples
#For this example we will use the a subset of the SEP3 ChIP-seq data (Kaufmann, 2009)
data("CSAR-dataset");
#We calculate the number of hits for each nucleotide posotion for the sample. We do that just for chromosome chr1, and for positions from 1 bp to 10kb
nhitsS<-mappedReads2Nhits(sampleSEP3_test,file="sampleSEP3_test",chr=c("CHR1v01212004"),chrL=c(10000))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(CSAR)
Loading required package: S4Vectors
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: GenomicRanges
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/CSAR/mappedReads2Nhits.Rd_%03d_medium.png", width=480, height=480)
> ### Name: mappedReads2Nhits
> ### Title: Calculate number of overlapped extended reads per nucleotide
> ### position
> ### Aliases: mappedReads2Nhits mappedReads2Nhits_chr pos2Nhits
> ### pos2Nhits_old
>
> ### ** Examples
>
>
> #For this example we will use the a subset of the SEP3 ChIP-seq data (Kaufmann, 2009)
> data("CSAR-dataset");
> #We calculate the number of hits for each nucleotide posotion for the sample. We do that just for chromosome chr1, and for positions from 1 bp to 10kb
> nhitsS<-mappedReads2Nhits(sampleSEP3_test,file="sampleSEP3_test",chr=c("CHR1v01212004"),chrL=c(10000))
mappedReads2Nhits has just finished CHR1v01212004 ...
>
>
>
>
>
>
>
> dev.off()
null device
1
>