git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@85509 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -137,9 +137,9 @@ gmapGenomeDirectory <- GmapGenomeDirectory(gmapGenomePath, create = TRUE) |
137 | 137 |
##path: /reshpcfs/home/coryba/projects/gmapR2/testGenome |
138 | 138 |
|
139 | 139 |
gmapGenome <- GmapGenome(genome=Dmelanogaster, |
140 |
- directory = gmapGenomeDirectory, |
|
141 |
- name = "dm3", |
|
142 |
- create = TRUE, |
|
140 |
+ directory=gmapGenomeDirectory, |
|
141 |
+ name="dm3", |
|
142 |
+ create=TRUE, |
|
143 | 143 |
k = 12L) |
144 | 144 |
##> gmapGenome |
145 | 145 |
##GmapGenome object |
... | ... |
@@ -167,6 +167,7 @@ eg <- org.Hs.eg.db::org.Hs.egSYMBOL2EG[["TP53"]] |
167 | 167 |
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene |
168 | 168 |
tx <- transcripts(txdb, vals = list(gene_id = eg)) |
169 | 169 |
roi <- range(tx) + 1e6 |
170 |
+strand(roi) <- "*" |
|
170 | 171 |
@ |
171 | 172 |
|
172 | 173 |
Next we get the genetic sequence and use it to create a GmapGenome |
... | ... |
@@ -181,7 +182,14 @@ library("gmapR") |
181 | 182 |
p53Seq <- getSeq(BSgenome.Hsapiens.UCSC.hg19::Hsapiens, roi, |
182 | 183 |
as.character = FALSE) |
183 | 184 |
names(p53Seq) <- "TP53" |
184 |
-gmapGenome <- GmapGenome(genome = p53Seq, name = "TP53_demo", create = TRUE, k = 12L) |
|
185 |
+gmapGenome <- GmapGenome(genome = p53Seq, name = "TP53_demo", create = TRUE, |
|
186 |
+ k = 12L) |
|
187 |
+@ |
|
188 |
+ |
|
189 |
+We add the known transcripts (splice sites) to the genome index: |
|
190 |
+<<set_TP53_splicesites>>= |
|
191 |
+exons <- gmapR:::subsetRegion(exonsBy(txdb), roi, "TP53") |
|
192 |
+spliceSites(gmapGenome, "knownGene") <- exons |
|
185 | 193 |
@ |
186 | 194 |
|
187 | 195 |
The data package \software{LungCancerLines} contains fastqs of reads |
... | ... |
@@ -199,15 +207,15 @@ behavior. |
199 | 207 |
|
200 | 208 |
<<create_gsnapParam>>= |
201 | 209 |
##specify how GSNAP should behave using a GsnapParam object |
202 |
-gsnapParam <- GsnapParam(genome = gmapGenome, |
|
203 |
- unique_only = FALSE, |
|
204 |
- max_mismatches = NULL, |
|
205 |
- suboptimal_levels = 0, mode = "standard", |
|
206 |
- npaths = 10, |
|
207 |
- novelsplicing = FALSE, splicing = NULL, |
|
208 |
- nthreads = 1, |
|
209 |
- batch = 2L, |
|
210 |
- gunzip=TRUE) |
|
210 |
+gsnapParam <- GsnapParam(genome=gmapGenome, |
|
211 |
+ unique_only=FALSE, |
|
212 |
+ suboptimal_levels=2L, |
|
213 |
+ npaths=10L, |
|
214 |
+ novelsplicing=TRUE, |
|
215 |
+ splicing="knownGene", |
|
216 |
+ indel_penalty=1L, |
|
217 |
+ distant_splice_penalty=1L, |
|
218 |
+ clip_overlaps=TRUE) |
|
211 | 219 |
@ |
212 | 220 |
|
213 | 221 |
Now we are ready to align. |
... | ... |
@@ -216,6 +224,7 @@ Now we are ready to align. |
216 | 224 |
gsnapOutput <- gsnap(input_a=fastqs["H1993.first"], |
217 | 225 |
input_b=fastqs["H1993.last"], |
218 | 226 |
params=gsnapParam) |
227 |
+ |
|
219 | 228 |
##gsnapOutput |
220 | 229 |
##An object of class "GsnapOutput" |
221 | 230 |
##Slot "path": |