cutseq 0.0.26__tar.gz → 0.0.28__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -179,11 +179,15 @@ class CutadaptConfig:
|
|
|
179
179
|
|
|
180
180
|
|
|
181
181
|
BUILDIN_ADAPTERS = {
|
|
182
|
-
|
|
182
|
+
# dsDNA ligation, A tailing method, do ot need to trim
|
|
183
|
+
"dsLIGATION": "AGTTCTACAGTCCGACGATCT>AGATCGGAAGAGCACACGTC",
|
|
183
184
|
# Small RNA, double ligation method, without barcode
|
|
184
185
|
# p5 - insert - p7
|
|
185
186
|
# (Optional) trim 2nt on both end to increase quality
|
|
186
187
|
"SMALLRNA": "CACGACGCTCTTCCGATCT>AGATCGGAAGAGCACACGTC",
|
|
188
|
+
# inline barcode method
|
|
189
|
+
# ref: https://www.nature.com/articles/nmeth0318-226c/figures/1
|
|
190
|
+
"INLINE": "AGTTCTACAGTCCGACGATCNNNNN>NNNNN(ATCACG)AGATCGGAAGAGCACACGTC",
|
|
187
191
|
# p5 - (random rt tail in TSO) - reverse insert - (random primer start?) - p7
|
|
188
192
|
"TAKARAV2": "ACACGACGCTCTTCCGATCTXXX<XXXAGATCGGAAGAGCACACGTC",
|
|
189
193
|
# p5 - (random rt tail in ligation) - reverse insert - (random primer start?) - p7
|
|
@@ -197,11 +201,25 @@ BUILDIN_ADAPTERS = {
|
|
|
197
201
|
# 6nt of polyG in 5' of R1 might from random RT primer
|
|
198
202
|
# adaptase tail can be as long as 15bp at the 5' of R2 of polyG)
|
|
199
203
|
# no UMI, but try to use random polyC tail as UMI
|
|
200
|
-
|
|
204
|
+
# legacy name: "SWIFT"
|
|
205
|
+
"xGenRNA": "ACACGACGCTCTTCCGATCTXXXXXX<XXXXXXXXXXXXXXXAGATCGGAAGAGCACACGTC",
|
|
206
|
+
# https://www.idtdna.com/pages/products/next-generation-sequencing/workflow/xgen-ngs-library-preparation/methyl-seq-dna-library-kit#product-details
|
|
207
|
+
# https://sfvideo.blob.core.windows.net/sitefinity/docs/default-source/technical-report/tail-trimming-for-better-data-technical-note.pdf?sfvrsn=135efe07_4
|
|
208
|
+
# 10 bases from END of R1 10 bases from START of R2
|
|
209
|
+
"xGenMethy": "ACACGACGCTCTTCCGATCTXXXXXX>XXXXXXXXXXAGATCGGAAGAGCACACGTC",
|
|
210
|
+
# for snmC-seq, trim 15 bases
|
|
211
|
+
"xGenSNMC": "ACACGACGCTCTTCCGATCTXXXXXX>XXXXXXXXXXXXXXXAGATCGGAAGAGCACACGTC",
|
|
212
|
+
# The general method for xGen / Swift kit, might be better than hard clip, TODO
|
|
213
|
+
# '-a "C{20};e=0.5;o=1" -G "G{20};e=0.5;o=1"' might be better
|
|
214
|
+
# "xGenDNA": "ACACGACGCTCTTCCGATCTXXX>(CCCCCCCCCCCCCCCCCCCC;noninternal;e=0.5;o=1)AGATCGGAAGAGCACACGTC",
|
|
215
|
+
# PBAT: method use random primer to add both p5 and p7,
|
|
216
|
+
# and there might be random tail at the 5' end of both reads
|
|
217
|
+
"PBAT": "ACACGACGCTCTTCCGATCTXXXXXX<XXXXXXAGATCGGAAGAGCACACGTC",
|
|
201
218
|
}
|
|
202
219
|
|
|
203
220
|
|
|
204
221
|
def pipeline_single(input1, output1, short1, untrimmed1, barcode, settings):
|
|
222
|
+
max_errors = 0.2
|
|
205
223
|
modifiers = []
|
|
206
224
|
# step 1: remove suffix in the read name
|
|
207
225
|
modifiers.extend([SuffixRemover(".1"), SuffixRemover("/1")])
|
|
@@ -210,7 +228,7 @@ def pipeline_single(input1, output1, short1, untrimmed1, barcode, settings):
|
|
|
210
228
|
AdapterCutter(
|
|
211
229
|
[
|
|
212
230
|
RightmostFrontAdapter(
|
|
213
|
-
sequence=barcode.p5.fw, max_errors=
|
|
231
|
+
sequence=barcode.p5.fw, max_errors=max_errors, min_overlap=10
|
|
214
232
|
)
|
|
215
233
|
],
|
|
216
234
|
times=1,
|
|
@@ -219,18 +237,22 @@ def pipeline_single(input1, output1, short1, untrimmed1, barcode, settings):
|
|
|
219
237
|
# step 3: remove adapter on the 3' end, read though in the sequencing
|
|
220
238
|
modifiers.append(
|
|
221
239
|
AdapterCutter(
|
|
222
|
-
[BackAdapter(sequence=barcode.p7.fw, max_errors=
|
|
240
|
+
[BackAdapter(sequence=barcode.p7.fw, max_errors=max_errors, min_overlap=3)],
|
|
223
241
|
times=2,
|
|
224
242
|
),
|
|
225
243
|
)
|
|
226
244
|
# step 4: trim inline barcode
|
|
227
245
|
if barcode.inline5.len > 0:
|
|
228
|
-
adapter_inline5 = PrefixAdapter(
|
|
246
|
+
adapter_inline5 = PrefixAdapter(
|
|
247
|
+
sequence=barcode.inline5.fw, max_errors=max_errors
|
|
248
|
+
)
|
|
229
249
|
modifiers.append(AdapterCutter([adapter_inline5], times=1))
|
|
230
250
|
else:
|
|
231
251
|
adapter_inline5 = None
|
|
232
252
|
if barcode.inline3.len > 0:
|
|
233
|
-
adapter_inline3 = SuffixAdapter(
|
|
253
|
+
adapter_inline3 = SuffixAdapter(
|
|
254
|
+
sequence=barcode.inline3.fw, max_errors=max_errors
|
|
255
|
+
)
|
|
234
256
|
modifiers.append(AdapterCutter([adapter_inline3], times=1))
|
|
235
257
|
else:
|
|
236
258
|
adapter_inline3 = None
|
|
@@ -252,16 +274,25 @@ def pipeline_single(input1, output1, short1, untrimmed1, barcode, settings):
|
|
|
252
274
|
modifiers.append(UnconditionalCutter(-barcode.mask3.len))
|
|
253
275
|
# step 7: trim polyA
|
|
254
276
|
if settings.trim_polyA:
|
|
277
|
+
pA_max_errors = 0.15
|
|
255
278
|
if barcode.strand == "+":
|
|
256
279
|
modifiers.append(
|
|
257
280
|
AdapterCutter(
|
|
258
|
-
[
|
|
281
|
+
[
|
|
282
|
+
NonInternalBackAdapter(
|
|
283
|
+
sequence="A" * 100, max_errors=pA_max_errors
|
|
284
|
+
)
|
|
285
|
+
]
|
|
259
286
|
)
|
|
260
287
|
)
|
|
261
288
|
elif barcode.strand == "-":
|
|
262
289
|
modifiers.append(
|
|
263
290
|
AdapterCutter(
|
|
264
|
-
[
|
|
291
|
+
[
|
|
292
|
+
NonInternalFrontAdapter(
|
|
293
|
+
sequence="T" * 100, max_errors=pA_max_errors
|
|
294
|
+
)
|
|
295
|
+
]
|
|
265
296
|
)
|
|
266
297
|
)
|
|
267
298
|
else:
|
|
@@ -345,6 +376,7 @@ def pipeline_paired(
|
|
|
345
376
|
barcode,
|
|
346
377
|
settings,
|
|
347
378
|
):
|
|
379
|
+
max_errors = 0.2
|
|
348
380
|
modifiers = []
|
|
349
381
|
# step 1: remove suffix in the read name
|
|
350
382
|
modifiers.extend(
|
|
@@ -359,7 +391,7 @@ def pipeline_paired(
|
|
|
359
391
|
AdapterCutter(
|
|
360
392
|
[
|
|
361
393
|
RightmostFrontAdapter(
|
|
362
|
-
sequence=barcode.p5.fw, max_errors=
|
|
394
|
+
sequence=barcode.p5.fw, max_errors=max_errors, min_overlap=10
|
|
363
395
|
)
|
|
364
396
|
],
|
|
365
397
|
times=1,
|
|
@@ -367,7 +399,7 @@ def pipeline_paired(
|
|
|
367
399
|
AdapterCutter(
|
|
368
400
|
[
|
|
369
401
|
RightmostFrontAdapter(
|
|
370
|
-
sequence=barcode.p7.rc, max_errors=
|
|
402
|
+
sequence=barcode.p7.rc, max_errors=max_errors, min_overlap=10
|
|
371
403
|
)
|
|
372
404
|
],
|
|
373
405
|
times=1,
|
|
@@ -378,18 +410,28 @@ def pipeline_paired(
|
|
|
378
410
|
modifiers.append(
|
|
379
411
|
(
|
|
380
412
|
AdapterCutter(
|
|
381
|
-
[
|
|
413
|
+
[
|
|
414
|
+
BackAdapter(
|
|
415
|
+
sequence=barcode.p7.fw, max_errors=max_errors, min_overlap=3
|
|
416
|
+
)
|
|
417
|
+
],
|
|
382
418
|
times=2,
|
|
383
419
|
),
|
|
384
420
|
AdapterCutter(
|
|
385
|
-
[
|
|
421
|
+
[
|
|
422
|
+
BackAdapter(
|
|
423
|
+
sequence=barcode.p5.rc, max_errors=max_errors, min_overlap=3
|
|
424
|
+
)
|
|
425
|
+
],
|
|
386
426
|
times=2,
|
|
387
427
|
),
|
|
388
428
|
),
|
|
389
429
|
)
|
|
390
430
|
# step 4: trim inline barcode
|
|
391
431
|
if barcode.inline5.len > 0:
|
|
392
|
-
adapter_inline5 = PrefixAdapter(
|
|
432
|
+
adapter_inline5 = PrefixAdapter(
|
|
433
|
+
sequence=barcode.inline5.fw, max_errors=max_errors
|
|
434
|
+
)
|
|
393
435
|
modifiers.append(
|
|
394
436
|
(
|
|
395
437
|
AdapterCutter([adapter_inline5], times=1),
|
|
@@ -399,7 +441,9 @@ def pipeline_paired(
|
|
|
399
441
|
else:
|
|
400
442
|
adapter_inline5 = None
|
|
401
443
|
if barcode.inline3.len > 0:
|
|
402
|
-
adapter_inline3 = PrefixAdapter(
|
|
444
|
+
adapter_inline3 = PrefixAdapter(
|
|
445
|
+
sequence=barcode.inline3.rc, max_errors=max_errors
|
|
446
|
+
)
|
|
403
447
|
modifiers.append(
|
|
404
448
|
(
|
|
405
449
|
UnconditionalCutter(-barcode.inline3.len),
|
|
@@ -446,14 +490,23 @@ def pipeline_paired(
|
|
|
446
490
|
)
|
|
447
491
|
# step 7: trim polyA
|
|
448
492
|
if settings.trim_polyA:
|
|
493
|
+
pA_max_errors = 0.15
|
|
449
494
|
if barcode.strand == "+":
|
|
450
495
|
modifiers.append(
|
|
451
496
|
(
|
|
452
497
|
AdapterCutter(
|
|
453
|
-
[
|
|
498
|
+
[
|
|
499
|
+
NonInternalBackAdapter(
|
|
500
|
+
sequence="A" * 100, max_errors=pA_max_errors
|
|
501
|
+
)
|
|
502
|
+
]
|
|
454
503
|
),
|
|
455
504
|
AdapterCutter(
|
|
456
|
-
[
|
|
505
|
+
[
|
|
506
|
+
NonInternalFrontAdapter(
|
|
507
|
+
sequence="T" * 100, max_errors=pA_max_errors
|
|
508
|
+
)
|
|
509
|
+
]
|
|
457
510
|
),
|
|
458
511
|
)
|
|
459
512
|
)
|
|
@@ -461,10 +514,18 @@ def pipeline_paired(
|
|
|
461
514
|
modifiers.append(
|
|
462
515
|
(
|
|
463
516
|
AdapterCutter(
|
|
464
|
-
[
|
|
517
|
+
[
|
|
518
|
+
NonInternalFrontAdapter(
|
|
519
|
+
sequence="T" * 100, max_errors=pA_max_errors
|
|
520
|
+
)
|
|
521
|
+
]
|
|
465
522
|
),
|
|
466
523
|
AdapterCutter(
|
|
467
|
-
[
|
|
524
|
+
[
|
|
525
|
+
NonInternalBackAdapter(
|
|
526
|
+
sequence="A" * 100, max_errors=pA_max_errors
|
|
527
|
+
)
|
|
528
|
+
]
|
|
468
529
|
),
|
|
469
530
|
)
|
|
470
531
|
)
|
|
File without changes
|
|
File without changes
|