...
Now, let's take a closer look at what we just did. Check out the "ripseeker_script.R" file by using cat or less:
Code Block |
---|
sourceinstall.packages(lib="http://bioconductor.org/biocLite.Rlib"), biocLite(pkgs="./RIPSeeker_1.4.0.tar.gz", repos=NULL) library(RIPSeeker, lib.loc="./lib") bamFiles = list.files(".", "\\.bam$", recursive=TRUE, full.names=TRUE) ripGal=combineAlignGals(bamFiles[2], genomeBuild="hg19") ctlGal=combineAlignGals(bamFiles[1], genomeBuild="hg19") cNAME="input" binSize=200 genomeBuild = "hg19" outDir <- file.path(getwd()) reverseComplement = FALSE uniqueHit = FALSE assignMultihits = FALSE rerunWithDisambiguatedMultihits = FALSE seekOut.AGO2 <- ripSeek(bamPath = bamFiles, cNAME = cNAME, reverseComplement = FALSE, genomeBuild = "hg19", \ uniqueHit = FALSE, assignMultihits = FALSE, rerunWithDisambiguatedMultihits = FALSE, binSize=binSize, outDir=outDir) |
Let's go through this section by section. First, we need to get the RIPSeeker packages from Bioconductor and load them into R.
Code Block |
---|
> sourceinstall.packages(lib="http://bioconductor.org/biocLite.Rlib") > biocLite("RIPSeeker", pkgs="./RIPSeeker_1.4.0.tar.gz", repos=NULL) > library(RIPSeeker, lib.loc="./lib") |
Then, we need to read in the BAM files we're going to use with their paths and use the RIPSeeker (or rather GenomicRanges) function "combineAlignGals" to generate a "gapped alignment" object in R using hg19 genomic and contig coordinates.
...