@@ -153,24 +153,24 @@ let getRG (a:Assembly) (rgs:GenomeDefs) (pr:PragmaCollection) =
153
153
| Bad( msgs) -> failwith msgs.[ 0 ]
154
154
155
155
/// Take a genepart and slices and get the actual DNA sequence.
156
- let realizeSequence verbose ( pragmas : PragmaCollection ) fwd ( rg : GenomeDef ) ( gp : GenePartWithLinker ) =
156
+ let realizeSequence verbose ( pragmas : PragmaCollection ) fwd ( rg : GenomeDef ) ( gp : GenePart ) =
157
157
158
158
if verbose then
159
159
printf " realizeSequence: fetch fwd=%s %s \n "
160
- ( if fwd then " y" else " n" ) gp.part. gene
160
+ ( if fwd then " y" else " n" ) gp.gene
161
161
162
162
// Inspect prefix of gene e.g g,t,o,p and see what type of gene part we are starting with
163
163
// Description of part to give in case of error
164
- let errorDesc = gp.part. gene
165
- let genePart = lookupGenePart errorDesc ( gp.part. gene.[ 0 ]) ( gp.part .mods)
164
+ let errorDesc = gp.gene
165
+ let genePart = lookupGenePart errorDesc ( gp.gene.[ 0 ]) ( gp.mods)
166
166
167
167
// Lookup gene location
168
- let feat = rg.get( gp.part. gene.[ 1 ..])
168
+ let feat = rg.get( gp.gene.[ 1 ..])
169
169
170
170
// Come up with an initial slice based on the gene prefix type
171
171
let s = translateGenePrefix pragmas rg genePart
172
172
173
- let finalSlice = applySlices verbose gp.part. mods s
173
+ let finalSlice = applySlices verbose gp.mods s
174
174
let left = adjustToPhysical feat finalSlice.left
175
175
let right = adjustToPhysical feat finalSlice.right
176
176
@@ -241,11 +241,7 @@ let expandGenePart
241
241
( a : Assembly )
242
242
specifiedDnaSource
243
243
( ppp : PPP )
244
- ( gp : GenePartWithLinker ) =
245
-
246
- match gp.linker with
247
- | None -> () // No linkers were present
248
- | Some( l) -> checkLinker l // Test the linkers
244
+ ( gp : GenePart ) =
249
245
250
246
// If the dna source is empty, then we are going to pull the DNA
251
247
// part from the default reference genome, so we should make the
@@ -256,7 +252,7 @@ let expandGenePart
256
252
257
253
// Check the genes are legal
258
254
//let prefix = gp.part.gene.[0]
259
- let g = gp.part. gene.[ 1 ..]. ToUpper()
255
+ let g = gp.gene.[ 1 ..]. ToUpper()
260
256
let rg ' = getRG a rgs ppp.pr
261
257
262
258
if not ( rg'.IsValid( g)) then
@@ -268,21 +264,21 @@ let expandGenePart
268
264
// Need to adjust for any slicing carefully since the DNA island is small
269
265
// Validate mods to gene
270
266
let errorRef = match a.name with | None -> sprintf " %A " a | Some( x) -> x
271
- validateMods errorRef gp.part. where gp.part .mods
267
+ validateMods errorRef gp.where gp.mods
272
268
273
269
// Come up with an initial slice based on the gene prefix type
274
270
275
271
// Get standard slice range for a gene
276
272
let s = translateGenePrefix a.pragmas rg' GENE
277
- let finalSlice = applySlices verbose gp.part. mods s
273
+ let finalSlice = applySlices verbose gp.mods s
278
274
279
275
// Ban approx slices to stay sane for now
280
276
if finalSlice.lApprox || finalSlice.rApprox then
281
277
failwithf
282
278
" sorry, approximate slices of library genes not supported yet in %A \n "
283
279
( prettyPrintAssembly a)
284
280
285
- let sliceContext = Library( gp.part. gene)
281
+ let sliceContext = Library( gp.gene)
286
282
287
283
let x , y =
288
284
getBoundsFromSlice finalSlice dna.Length sliceContext
@@ -295,8 +291,8 @@ let expandGenePart
295
291
let orfAnnotation = orfAnnotationFromSlice finalSlice finalDNA.Length ppp.fwd sliceContext
296
292
297
293
let name1 =
298
- if gp.part. mods.Length = 0 then gp.part .gene
299
- else ( gp.part. gene + ( printSlice finalSlice))
294
+ if gp.mods.Length = 0 then gp.gene
295
+ else ( gp.gene + ( printSlice finalSlice))
300
296
let name2 = if ppp.fwd then name1 else " !" + name1
301
297
302
298
{ id = None;
@@ -325,11 +321,11 @@ let expandGenePart
325
321
materializedFrom = Some( ppp);
326
322
annotations = [ Orf( orfAnnotation)]}
327
323
else // no :( - wasn't in genome or library
328
- failwithf " undefined gene '%s ' %O \n " g gp.part. where
324
+ failwithf " undefined gene '%s ' %O \n " g gp.where
329
325
else
330
326
// Inspect prefix of gene e.g g,t,o,p and see what type of gene part we are starting with
331
- let errorDesc = gp.part. gene
332
- let genePart = lookupGenePart errorDesc ( gp.part. gene.[ 0 ]) ( gp.part. mods)
327
+ let errorDesc = gp.gene
328
+ let genePart = lookupGenePart errorDesc gp.gene.[ 0 ] gp.mods
333
329
// Lookup gene location
334
330
let rg ' = getRG a rgs ppp.pr
335
331
@@ -354,13 +350,13 @@ let expandGenePart
354
350
// Validate mods to gene
355
351
let errorRef = match a.name with | None -> sprintf " %A " a | Some( x) -> x
356
352
357
- validateMods errorRef gp.part. where gp.part .mods
353
+ validateMods errorRef gp.where gp.mods
358
354
// Come up with an initial slice based on the gene prefix type
359
355
let s = translateGenePrefix a.pragmas rg' genePart
360
356
if verbose then printf " log: processing %A \n " a
361
357
362
358
// finalSlice is the consolidated gene relative coordinate of desired piece
363
- let finalSlice = applySlices verbose gp.part. mods s
359
+ let finalSlice = applySlices verbose gp.mods s
364
360
365
361
// Gene relative coordinates for the gene slice we want
366
362
let finalSliceWithApprox =
@@ -409,7 +405,7 @@ let expandGenePart
409
405
if ( left > right && feat.fwd) || ( right> left && ( not feat.fwd)) then
410
406
failwithf
411
407
" slice results in negatively lengthed DNA piece for %s \n "
412
- ( gp.part. gene + ( printSlice finalSlice))
408
+ ( gp.gene + ( printSlice finalSlice))
413
409
414
410
/// left' is the genomic coordinate of the start of the element (i.e gene upstream)
415
411
let left ' , right' = if feat.fwd then left, right else right, left
@@ -431,15 +427,15 @@ let expandGenePart
431
427
|> DnaOps.revCompIf ( not ppp.fwd)
432
428
433
429
let description1 =
434
- match gp.part. mods with
435
- | [] -> gp.part. gene
430
+ match gp.mods with
431
+ | [] -> gp.gene
436
432
| [ DOTMOD( d)] ->
437
433
match d with
438
- | " up" -> " u" + gp.part. gene.[ 1 ..]
439
- | " down" -> " d" + gp.part. gene.[ 1 ..]
440
- | " mrna" -> " m" + gp.part. gene.[ 1 ..]
434
+ | " up" -> " u" + gp.gene.[ 1 ..]
435
+ | " down" -> " d" + gp.gene.[ 1 ..]
436
+ | " mrna" -> " m" + gp.gene.[ 1 ..]
441
437
| x -> failwithf " unimplemented DOTMOD %s " x
442
- | _ -> " g" + gp.part. gene.[ 1 ..] + ( printSlice finalSlice)
438
+ | _ -> " g" + gp.gene.[ 1 ..] + ( printSlice finalSlice)
443
439
let description2 = if ppp.fwd then description1 else " !" + description1
444
440
445
441
let promStart = { x = - 300 < OneOffset>; relTo = FivePrime}
0 commit comments