1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
|
%global _empty_manifest_terminate_build 0
Name: python-atropos
Version: 1.1.31
Release: 1
Summary: trim adapters from high-throughput sequencing reads
License: MIT
URL: https://atropos.readthedocs.org/
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/5f/30/17beaa053265f6985825d3deb7e32fe073ff2e077d63dff5cb030dc78fda/atropos-1.1.31.tar.gz
BuildArch: noarch
Requires: python3-cython
Requires: python3-jinja2
Requires: python3-khmer
Requires: python3-progressbar2
Requires: python3-pysam
Requires: python3-srastream
Requires: python3-tqdm
%description
[](https://travis-ci.org/jdidion/atropos)
[](https://pypi.python.org/pypi/atropos)
[](https://zenodo.org/badge/latestdoi/61393086)
# Atropos
Atropos is tool for specific, sensitive, and speedy trimming of NGS reads. It is a fork of the venerable Cutadapt read trimmer (https://github.com/marcelm/cutadapt, [DOI:10.14806/ej.17.1.200](http://dx.doi.org/10.14806/ej.17.1.200)), with the primary improvements being:
1. Multi-threading support, including an extremely fast "parallel write" mode.
2. Implementation of a new insert alignment-based trimming algorithm for paired-end reads that is substantially more sensitive and specific than the original Cutadapt adapter alignment-based algorithm. This algorithm can also correct mismatches between the overlapping portions of the reads.
3. Options for trimming specific types of data (miRNA, bisulfite-seq).
4. A new command ('detect') that will detect adapter sequences and other potential contaminants.
5. A new command ('error') that will estimate the sequencing error rate, which helps to select the appropriate adapter- and quality- trimming parameter values.
6. A new command ('qc') that generates read statistics similar to FastQC. The trim command can also compute read statistics both before and after trimming (using the '--stats' option).
7. Improved summary reports, including support for serialization formats (JSON, YAML, pickle), support for user-defined templates (via the optional Jinja2 dependency), and integration with [MultiQC](http://multiqc.info).
8. The ability to merge overlapping reads (this is experimental and the functionality is limited).
9. The ability to write the summary report and log messages to separate files.
10. The ability to read SAM/BAM files and read/write interleaved FASTQ files.
11. Direct trimming of reads from an SRA accession.
12. A progress bar, and other minor usability enhancements.
## Manual installation
Atropos is available from [pypi](https://pypi.python.org/pypi/atropos) and can be installed using `pip`.
First install dependencies:
* Required
* Python 3.4.5+
* Python 2.x is NOT supported
* Python 3.5.2 has a [bug](https://bugs.python.org/issue28387) that [has been reported to cause random SEGFAULTs](https://github.com/jdidion/atropos/issues/88)
* Cython 0.25.2+ (`pip install Cython`)
* Maybe python libraries
* pytest (for running unit tests)
* progressbar2 or tqdm (progressbar support)
* pysam (SAM/BAM input)
* khmer 2.0+ (for detecting low-frequency adapter contamination)
* jinja2 (for user-defined report formats)
* ngstream (for SRA streaming), which requires [ngs](https://github.com/ncbi/ngs)
Pip can be used to install atropos and optional dependencies, e.g.:
pip install atropos[tqdm,pysam,ngstream]
## Conda
There is an Atropos recipe in [Bioconda](https://anaconda.org/bioconda/atropos).
`conda install -c bioconda atropos`
## Docker
A [Docker image](https://hub.docker.com/r/jdidion/atropos/) is available for Atropos in Docker Hub.
`docker run jdidion/atropos <arguments>`
## Usage
Atropos is almost fully backward-compatible with cutadapt. If you currently use cutadapt, you can simply install Atropos and then substitute the executable name in your command line, with one key difference: you need to use options to specify input file names. For example:
```
atropos -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCACGAGTTA -o trimmed.fq.gz -se reads.fq.gz
```
To take advantage of multi-threading, set the `--threads` option:
```
atropos --threads 8 -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCACGAGTTA -o trimmed.fq.gz -se reads.fq.gz
```
To take advantage of the new aligner (if you have paired-end reads with 3' adapters), set the `--aligner` option to 'insert':
```
atropos --aligner insert -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCACACAGTGATCTCGTATGCCGTCTTCTGCTTG \
-A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT -o trimmed.1.fq.gz -p trimmed.2.fq.gz \
-pe1 reads.1.fq.gz -pe2 reads.2.fq.gz
```
See the [Documentation](https://atropos.readthedocs.org/) for more complete usage information.
## Publications
Atropos is [published](https://peerj.com/articles/3720/) in PeerJ.
Please cite as:
> Didion JP, Martin M, Collins FS. (2017) Atropos: specific, sensitive, and speedy trimming of sequencing reads. PeerJ 5:e3720 https://doi.org/10.7717/peerj.3720
The results in the paper can be fully reproduced using the workflow defined in the [paper](paper/README.md) directory.
The citation for the original Cutadapt paper is:
> Marcel Martin. "Cutadapt removes adapter sequences from high-throughput sequencing reads." EMBnet.Journal, 17(1):10-12, May 2011. http://dx.doi.org/10.14806/ej.17.1.200
## Links
* [Documentation](https://atropos.readthedocs.org/)
* [Source code](https://github.com/jdidion/atropos/)
* [Report an issue](https://github.com/jdidion/atropos/issues)
* [Code of conduct](https://github.com/jdidion/atropos/CODE_OF_CONDUCT.md)
* [Contributing](https://github.com/jdidion/atropos/CONTRIUBTING.md)
## Roadmap
### 1.2
* Migrate to [xphyle](https://github.com/jdidion/xphyle) for file management.
* Migrate to [pokrok](https://github.com/jdidion/pokrok) for progress bar management.
* Accept multiple input files.
* Support SAM output (including #33).
* Direct streaming and trimming of reads from SRA and htsget using [ngstream](https://github.com/jdidion/ngstream).
* Read "cropping" (#50)
* Support for ThruPlex-style adapters (in which barcode is part of query sequence; #55)
* Accessibility:
* Create recipe for homebrew.
* Automatically update conda and homebrew recipes for each release.
* Create Galaxy tool description using [argparse2tool](https://github.com/erasche/argparse2tool#cwl-specific-functionality).
* Improve documentation (#24)
* Port over improvements in latest versions of Cutadapt https://cutadapt.readthedocs.io/en/stable/
* Switch to using entry point instead of Atropos executable.
### 1.3
* Add auto-trimming mode for paired-end reads.
* Support for UMIs.
* Provide PacBio- and nanopore-specific options (https://github.com/marcelm/cutadapt/issues/120).
* Provide option for RNA-seq data that will trim polyA sequence.
* Add formal config file support (#53)
* Automate crash reporting using [sentry](https://github.com/getsentry/raven-python).
* Look at [NGMerge] for improving read merging: https://github.com/harvardinformatics/NGmerge
* Look at replacing pysam with [pybam](https://github.com/JohnLonginotto/pybam)
### 1.4
* Currently, InsertAligner requires a single 3' adapter for each end. Adapter trimming will later be generalized so that A) the InsertAligner can handle multiple matched pairs of adapters and/or B) multiple different aligners can be used for different adapters.
* Integrate with [AdapterBase](https://github.com/NCBI-Hackathons/OnlineAdapterDatabase) for improved matching of detected contaminants to known adapters, automated trimming of datasets with known adapters, and (opt-in) submission of adapter information for novel datasets.
* Migrate to seqio (https://github.com/jdidion/seqio) for reading/writing sequence files.
* Also look at using HTSeq instead: https://github.com/simon-anders/htseq
* General-purpose read filtering based on read ID: https://github.com/marcelm/cutadapt/issues/107.
* Currently, SAM/BAM input files must be name sorted; add an option to 1) pre-sort reads inline using samtools or sambamba, or 2) cache each read in memory until its mate is found.
### 1.5
* Provide more user control over anchoring of adapters: https://github.com/marcelm/cutadapt/issues/53.
* Enable user to define custom read structure: https://github.com/nh13/read-structure-examples
* Support for paired-end demultiplexing
* Demultiplexing based on barcodes: https://github.com/marcelm/cutadapt/issues/118.
* Consider supporting different error rates for read1 vs read2.
* Add a ClipOverlapping modifier that will remove read overlaps (as opposed to merging).
* Look more closely at providing solutions to the Illumina two-color chemistry issue:
* Provide and option to exempt G calls from the assessment of quality
* Trim 3′ Gs from reads
* Also look at addressing any issues with one-color chemistry (iSeq).
* Consider whether to support trimming/QC of raw IonTorrent data.
### 1.6
* Switch to using Click for CLI.
* Implement a public plugin API.
* Add more logging and convert log messages from old-style to new-style format strings.
* Add option to estimate bisulfite conversion rate from filled-in cytosine methylation status in reads that were MspI-digested.
* CPU and memory profiling. Try out:
* https://github.com/nvdv/vprof
* https://github.com/what-studio/profiling
* https://github.com/fabianp/memory_profiler
* https://github.com/rkern/line_profiler#line-profiler
* Look at some new trimming/qc programs; decide whether to add to benchmarks and/or incorporate any of their features
* https://github.com/OpenGene/fastp/issues
* http://tagcleaner.sourceforge.net/
* https://github.com/mdshw5/fastqp/blob/master/README.md
### 2.0
* Simplification of command line options, perhaps by further splitting functionality up into different sub-commands, but also by more intelligent choices for default option values based on context.
* Consider adding additional report formats
* Add fuzzy matching: https://github.com/Daniel-Liu-c0deb0t/Java-Fuzzy-Search
* https://github.com/marcelm/cutadapt/issues/112
* Performance enhancements using
* http://numba.pydata.org/
* https://github.com/undefx/vecpy
* https://github.com/serge-sans-paille/pythran
* https://github.com/IntelLabs/hpat
* https://github.com/cupy/cupy
* >90% test coverage
* Fuzz testing using AFL
* http://lcamtuf.coredump.cx/afl/
* https://github.com/jwilk/python-afl
### Beyond 2.0
* Implement additional alternate alignment algorithms.
* Implement the error detection algorithm in ADEPT: https://github.com/LANL-Bioinformatics/ADEPT
* Explore new quality trimming algorithms
* UrQt: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4450468/
* InfoTrim: github.com/JacobPorter/InfoTrim
* Scythe is an interesting new trimmer. Depending on how the benchmarks look in the forthcoming paper, we will add it to the list of tools we compare against Atropos, and perhaps implement their Bayesian approach for adapter match.
* Experiment with replacing the multicore implementation with an asyncio-based implementation (using ProcessPoolExecutor and uvloop).
* Automatic adaptive tuning of queue sizes to maximize the balance between memory usage and latency.
* FastProNGS has some nice visualizations that could be included, rather than relying on MultiQC: https://github.com/Megagenomics/FastProNGS
While we consider the command-line interface to be stable, the internal code organization of Atropos is likely to change. At this time, we recommend to not directly interface with Atropos as a library (or to be prepared for your code to break). The internal code organization will be stabilized as of version 2.0, which is planned for sometime in 2017.
If you would like to suggest additional enhancements, you can submit issues and/or pull requests at our GitHub page.
%package -n python3-atropos
Summary: trim adapters from high-throughput sequencing reads
Provides: python-atropos
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-atropos
[](https://travis-ci.org/jdidion/atropos)
[](https://pypi.python.org/pypi/atropos)
[](https://zenodo.org/badge/latestdoi/61393086)
# Atropos
Atropos is tool for specific, sensitive, and speedy trimming of NGS reads. It is a fork of the venerable Cutadapt read trimmer (https://github.com/marcelm/cutadapt, [DOI:10.14806/ej.17.1.200](http://dx.doi.org/10.14806/ej.17.1.200)), with the primary improvements being:
1. Multi-threading support, including an extremely fast "parallel write" mode.
2. Implementation of a new insert alignment-based trimming algorithm for paired-end reads that is substantially more sensitive and specific than the original Cutadapt adapter alignment-based algorithm. This algorithm can also correct mismatches between the overlapping portions of the reads.
3. Options for trimming specific types of data (miRNA, bisulfite-seq).
4. A new command ('detect') that will detect adapter sequences and other potential contaminants.
5. A new command ('error') that will estimate the sequencing error rate, which helps to select the appropriate adapter- and quality- trimming parameter values.
6. A new command ('qc') that generates read statistics similar to FastQC. The trim command can also compute read statistics both before and after trimming (using the '--stats' option).
7. Improved summary reports, including support for serialization formats (JSON, YAML, pickle), support for user-defined templates (via the optional Jinja2 dependency), and integration with [MultiQC](http://multiqc.info).
8. The ability to merge overlapping reads (this is experimental and the functionality is limited).
9. The ability to write the summary report and log messages to separate files.
10. The ability to read SAM/BAM files and read/write interleaved FASTQ files.
11. Direct trimming of reads from an SRA accession.
12. A progress bar, and other minor usability enhancements.
## Manual installation
Atropos is available from [pypi](https://pypi.python.org/pypi/atropos) and can be installed using `pip`.
First install dependencies:
* Required
* Python 3.4.5+
* Python 2.x is NOT supported
* Python 3.5.2 has a [bug](https://bugs.python.org/issue28387) that [has been reported to cause random SEGFAULTs](https://github.com/jdidion/atropos/issues/88)
* Cython 0.25.2+ (`pip install Cython`)
* Maybe python libraries
* pytest (for running unit tests)
* progressbar2 or tqdm (progressbar support)
* pysam (SAM/BAM input)
* khmer 2.0+ (for detecting low-frequency adapter contamination)
* jinja2 (for user-defined report formats)
* ngstream (for SRA streaming), which requires [ngs](https://github.com/ncbi/ngs)
Pip can be used to install atropos and optional dependencies, e.g.:
pip install atropos[tqdm,pysam,ngstream]
## Conda
There is an Atropos recipe in [Bioconda](https://anaconda.org/bioconda/atropos).
`conda install -c bioconda atropos`
## Docker
A [Docker image](https://hub.docker.com/r/jdidion/atropos/) is available for Atropos in Docker Hub.
`docker run jdidion/atropos <arguments>`
## Usage
Atropos is almost fully backward-compatible with cutadapt. If you currently use cutadapt, you can simply install Atropos and then substitute the executable name in your command line, with one key difference: you need to use options to specify input file names. For example:
```
atropos -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCACGAGTTA -o trimmed.fq.gz -se reads.fq.gz
```
To take advantage of multi-threading, set the `--threads` option:
```
atropos --threads 8 -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCACGAGTTA -o trimmed.fq.gz -se reads.fq.gz
```
To take advantage of the new aligner (if you have paired-end reads with 3' adapters), set the `--aligner` option to 'insert':
```
atropos --aligner insert -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCACACAGTGATCTCGTATGCCGTCTTCTGCTTG \
-A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT -o trimmed.1.fq.gz -p trimmed.2.fq.gz \
-pe1 reads.1.fq.gz -pe2 reads.2.fq.gz
```
See the [Documentation](https://atropos.readthedocs.org/) for more complete usage information.
## Publications
Atropos is [published](https://peerj.com/articles/3720/) in PeerJ.
Please cite as:
> Didion JP, Martin M, Collins FS. (2017) Atropos: specific, sensitive, and speedy trimming of sequencing reads. PeerJ 5:e3720 https://doi.org/10.7717/peerj.3720
The results in the paper can be fully reproduced using the workflow defined in the [paper](paper/README.md) directory.
The citation for the original Cutadapt paper is:
> Marcel Martin. "Cutadapt removes adapter sequences from high-throughput sequencing reads." EMBnet.Journal, 17(1):10-12, May 2011. http://dx.doi.org/10.14806/ej.17.1.200
## Links
* [Documentation](https://atropos.readthedocs.org/)
* [Source code](https://github.com/jdidion/atropos/)
* [Report an issue](https://github.com/jdidion/atropos/issues)
* [Code of conduct](https://github.com/jdidion/atropos/CODE_OF_CONDUCT.md)
* [Contributing](https://github.com/jdidion/atropos/CONTRIUBTING.md)
## Roadmap
### 1.2
* Migrate to [xphyle](https://github.com/jdidion/xphyle) for file management.
* Migrate to [pokrok](https://github.com/jdidion/pokrok) for progress bar management.
* Accept multiple input files.
* Support SAM output (including #33).
* Direct streaming and trimming of reads from SRA and htsget using [ngstream](https://github.com/jdidion/ngstream).
* Read "cropping" (#50)
* Support for ThruPlex-style adapters (in which barcode is part of query sequence; #55)
* Accessibility:
* Create recipe for homebrew.
* Automatically update conda and homebrew recipes for each release.
* Create Galaxy tool description using [argparse2tool](https://github.com/erasche/argparse2tool#cwl-specific-functionality).
* Improve documentation (#24)
* Port over improvements in latest versions of Cutadapt https://cutadapt.readthedocs.io/en/stable/
* Switch to using entry point instead of Atropos executable.
### 1.3
* Add auto-trimming mode for paired-end reads.
* Support for UMIs.
* Provide PacBio- and nanopore-specific options (https://github.com/marcelm/cutadapt/issues/120).
* Provide option for RNA-seq data that will trim polyA sequence.
* Add formal config file support (#53)
* Automate crash reporting using [sentry](https://github.com/getsentry/raven-python).
* Look at [NGMerge] for improving read merging: https://github.com/harvardinformatics/NGmerge
* Look at replacing pysam with [pybam](https://github.com/JohnLonginotto/pybam)
### 1.4
* Currently, InsertAligner requires a single 3' adapter for each end. Adapter trimming will later be generalized so that A) the InsertAligner can handle multiple matched pairs of adapters and/or B) multiple different aligners can be used for different adapters.
* Integrate with [AdapterBase](https://github.com/NCBI-Hackathons/OnlineAdapterDatabase) for improved matching of detected contaminants to known adapters, automated trimming of datasets with known adapters, and (opt-in) submission of adapter information for novel datasets.
* Migrate to seqio (https://github.com/jdidion/seqio) for reading/writing sequence files.
* Also look at using HTSeq instead: https://github.com/simon-anders/htseq
* General-purpose read filtering based on read ID: https://github.com/marcelm/cutadapt/issues/107.
* Currently, SAM/BAM input files must be name sorted; add an option to 1) pre-sort reads inline using samtools or sambamba, or 2) cache each read in memory until its mate is found.
### 1.5
* Provide more user control over anchoring of adapters: https://github.com/marcelm/cutadapt/issues/53.
* Enable user to define custom read structure: https://github.com/nh13/read-structure-examples
* Support for paired-end demultiplexing
* Demultiplexing based on barcodes: https://github.com/marcelm/cutadapt/issues/118.
* Consider supporting different error rates for read1 vs read2.
* Add a ClipOverlapping modifier that will remove read overlaps (as opposed to merging).
* Look more closely at providing solutions to the Illumina two-color chemistry issue:
* Provide and option to exempt G calls from the assessment of quality
* Trim 3′ Gs from reads
* Also look at addressing any issues with one-color chemistry (iSeq).
* Consider whether to support trimming/QC of raw IonTorrent data.
### 1.6
* Switch to using Click for CLI.
* Implement a public plugin API.
* Add more logging and convert log messages from old-style to new-style format strings.
* Add option to estimate bisulfite conversion rate from filled-in cytosine methylation status in reads that were MspI-digested.
* CPU and memory profiling. Try out:
* https://github.com/nvdv/vprof
* https://github.com/what-studio/profiling
* https://github.com/fabianp/memory_profiler
* https://github.com/rkern/line_profiler#line-profiler
* Look at some new trimming/qc programs; decide whether to add to benchmarks and/or incorporate any of their features
* https://github.com/OpenGene/fastp/issues
* http://tagcleaner.sourceforge.net/
* https://github.com/mdshw5/fastqp/blob/master/README.md
### 2.0
* Simplification of command line options, perhaps by further splitting functionality up into different sub-commands, but also by more intelligent choices for default option values based on context.
* Consider adding additional report formats
* Add fuzzy matching: https://github.com/Daniel-Liu-c0deb0t/Java-Fuzzy-Search
* https://github.com/marcelm/cutadapt/issues/112
* Performance enhancements using
* http://numba.pydata.org/
* https://github.com/undefx/vecpy
* https://github.com/serge-sans-paille/pythran
* https://github.com/IntelLabs/hpat
* https://github.com/cupy/cupy
* >90% test coverage
* Fuzz testing using AFL
* http://lcamtuf.coredump.cx/afl/
* https://github.com/jwilk/python-afl
### Beyond 2.0
* Implement additional alternate alignment algorithms.
* Implement the error detection algorithm in ADEPT: https://github.com/LANL-Bioinformatics/ADEPT
* Explore new quality trimming algorithms
* UrQt: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4450468/
* InfoTrim: github.com/JacobPorter/InfoTrim
* Scythe is an interesting new trimmer. Depending on how the benchmarks look in the forthcoming paper, we will add it to the list of tools we compare against Atropos, and perhaps implement their Bayesian approach for adapter match.
* Experiment with replacing the multicore implementation with an asyncio-based implementation (using ProcessPoolExecutor and uvloop).
* Automatic adaptive tuning of queue sizes to maximize the balance between memory usage and latency.
* FastProNGS has some nice visualizations that could be included, rather than relying on MultiQC: https://github.com/Megagenomics/FastProNGS
While we consider the command-line interface to be stable, the internal code organization of Atropos is likely to change. At this time, we recommend to not directly interface with Atropos as a library (or to be prepared for your code to break). The internal code organization will be stabilized as of version 2.0, which is planned for sometime in 2017.
If you would like to suggest additional enhancements, you can submit issues and/or pull requests at our GitHub page.
%package help
Summary: Development documents and examples for atropos
Provides: python3-atropos-doc
%description help
[](https://travis-ci.org/jdidion/atropos)
[](https://pypi.python.org/pypi/atropos)
[](https://zenodo.org/badge/latestdoi/61393086)
# Atropos
Atropos is tool for specific, sensitive, and speedy trimming of NGS reads. It is a fork of the venerable Cutadapt read trimmer (https://github.com/marcelm/cutadapt, [DOI:10.14806/ej.17.1.200](http://dx.doi.org/10.14806/ej.17.1.200)), with the primary improvements being:
1. Multi-threading support, including an extremely fast "parallel write" mode.
2. Implementation of a new insert alignment-based trimming algorithm for paired-end reads that is substantially more sensitive and specific than the original Cutadapt adapter alignment-based algorithm. This algorithm can also correct mismatches between the overlapping portions of the reads.
3. Options for trimming specific types of data (miRNA, bisulfite-seq).
4. A new command ('detect') that will detect adapter sequences and other potential contaminants.
5. A new command ('error') that will estimate the sequencing error rate, which helps to select the appropriate adapter- and quality- trimming parameter values.
6. A new command ('qc') that generates read statistics similar to FastQC. The trim command can also compute read statistics both before and after trimming (using the '--stats' option).
7. Improved summary reports, including support for serialization formats (JSON, YAML, pickle), support for user-defined templates (via the optional Jinja2 dependency), and integration with [MultiQC](http://multiqc.info).
8. The ability to merge overlapping reads (this is experimental and the functionality is limited).
9. The ability to write the summary report and log messages to separate files.
10. The ability to read SAM/BAM files and read/write interleaved FASTQ files.
11. Direct trimming of reads from an SRA accession.
12. A progress bar, and other minor usability enhancements.
## Manual installation
Atropos is available from [pypi](https://pypi.python.org/pypi/atropos) and can be installed using `pip`.
First install dependencies:
* Required
* Python 3.4.5+
* Python 2.x is NOT supported
* Python 3.5.2 has a [bug](https://bugs.python.org/issue28387) that [has been reported to cause random SEGFAULTs](https://github.com/jdidion/atropos/issues/88)
* Cython 0.25.2+ (`pip install Cython`)
* Maybe python libraries
* pytest (for running unit tests)
* progressbar2 or tqdm (progressbar support)
* pysam (SAM/BAM input)
* khmer 2.0+ (for detecting low-frequency adapter contamination)
* jinja2 (for user-defined report formats)
* ngstream (for SRA streaming), which requires [ngs](https://github.com/ncbi/ngs)
Pip can be used to install atropos and optional dependencies, e.g.:
pip install atropos[tqdm,pysam,ngstream]
## Conda
There is an Atropos recipe in [Bioconda](https://anaconda.org/bioconda/atropos).
`conda install -c bioconda atropos`
## Docker
A [Docker image](https://hub.docker.com/r/jdidion/atropos/) is available for Atropos in Docker Hub.
`docker run jdidion/atropos <arguments>`
## Usage
Atropos is almost fully backward-compatible with cutadapt. If you currently use cutadapt, you can simply install Atropos and then substitute the executable name in your command line, with one key difference: you need to use options to specify input file names. For example:
```
atropos -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCACGAGTTA -o trimmed.fq.gz -se reads.fq.gz
```
To take advantage of multi-threading, set the `--threads` option:
```
atropos --threads 8 -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCACGAGTTA -o trimmed.fq.gz -se reads.fq.gz
```
To take advantage of the new aligner (if you have paired-end reads with 3' adapters), set the `--aligner` option to 'insert':
```
atropos --aligner insert -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCACACAGTGATCTCGTATGCCGTCTTCTGCTTG \
-A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT -o trimmed.1.fq.gz -p trimmed.2.fq.gz \
-pe1 reads.1.fq.gz -pe2 reads.2.fq.gz
```
See the [Documentation](https://atropos.readthedocs.org/) for more complete usage information.
## Publications
Atropos is [published](https://peerj.com/articles/3720/) in PeerJ.
Please cite as:
> Didion JP, Martin M, Collins FS. (2017) Atropos: specific, sensitive, and speedy trimming of sequencing reads. PeerJ 5:e3720 https://doi.org/10.7717/peerj.3720
The results in the paper can be fully reproduced using the workflow defined in the [paper](paper/README.md) directory.
The citation for the original Cutadapt paper is:
> Marcel Martin. "Cutadapt removes adapter sequences from high-throughput sequencing reads." EMBnet.Journal, 17(1):10-12, May 2011. http://dx.doi.org/10.14806/ej.17.1.200
## Links
* [Documentation](https://atropos.readthedocs.org/)
* [Source code](https://github.com/jdidion/atropos/)
* [Report an issue](https://github.com/jdidion/atropos/issues)
* [Code of conduct](https://github.com/jdidion/atropos/CODE_OF_CONDUCT.md)
* [Contributing](https://github.com/jdidion/atropos/CONTRIUBTING.md)
## Roadmap
### 1.2
* Migrate to [xphyle](https://github.com/jdidion/xphyle) for file management.
* Migrate to [pokrok](https://github.com/jdidion/pokrok) for progress bar management.
* Accept multiple input files.
* Support SAM output (including #33).
* Direct streaming and trimming of reads from SRA and htsget using [ngstream](https://github.com/jdidion/ngstream).
* Read "cropping" (#50)
* Support for ThruPlex-style adapters (in which barcode is part of query sequence; #55)
* Accessibility:
* Create recipe for homebrew.
* Automatically update conda and homebrew recipes for each release.
* Create Galaxy tool description using [argparse2tool](https://github.com/erasche/argparse2tool#cwl-specific-functionality).
* Improve documentation (#24)
* Port over improvements in latest versions of Cutadapt https://cutadapt.readthedocs.io/en/stable/
* Switch to using entry point instead of Atropos executable.
### 1.3
* Add auto-trimming mode for paired-end reads.
* Support for UMIs.
* Provide PacBio- and nanopore-specific options (https://github.com/marcelm/cutadapt/issues/120).
* Provide option for RNA-seq data that will trim polyA sequence.
* Add formal config file support (#53)
* Automate crash reporting using [sentry](https://github.com/getsentry/raven-python).
* Look at [NGMerge] for improving read merging: https://github.com/harvardinformatics/NGmerge
* Look at replacing pysam with [pybam](https://github.com/JohnLonginotto/pybam)
### 1.4
* Currently, InsertAligner requires a single 3' adapter for each end. Adapter trimming will later be generalized so that A) the InsertAligner can handle multiple matched pairs of adapters and/or B) multiple different aligners can be used for different adapters.
* Integrate with [AdapterBase](https://github.com/NCBI-Hackathons/OnlineAdapterDatabase) for improved matching of detected contaminants to known adapters, automated trimming of datasets with known adapters, and (opt-in) submission of adapter information for novel datasets.
* Migrate to seqio (https://github.com/jdidion/seqio) for reading/writing sequence files.
* Also look at using HTSeq instead: https://github.com/simon-anders/htseq
* General-purpose read filtering based on read ID: https://github.com/marcelm/cutadapt/issues/107.
* Currently, SAM/BAM input files must be name sorted; add an option to 1) pre-sort reads inline using samtools or sambamba, or 2) cache each read in memory until its mate is found.
### 1.5
* Provide more user control over anchoring of adapters: https://github.com/marcelm/cutadapt/issues/53.
* Enable user to define custom read structure: https://github.com/nh13/read-structure-examples
* Support for paired-end demultiplexing
* Demultiplexing based on barcodes: https://github.com/marcelm/cutadapt/issues/118.
* Consider supporting different error rates for read1 vs read2.
* Add a ClipOverlapping modifier that will remove read overlaps (as opposed to merging).
* Look more closely at providing solutions to the Illumina two-color chemistry issue:
* Provide and option to exempt G calls from the assessment of quality
* Trim 3′ Gs from reads
* Also look at addressing any issues with one-color chemistry (iSeq).
* Consider whether to support trimming/QC of raw IonTorrent data.
### 1.6
* Switch to using Click for CLI.
* Implement a public plugin API.
* Add more logging and convert log messages from old-style to new-style format strings.
* Add option to estimate bisulfite conversion rate from filled-in cytosine methylation status in reads that were MspI-digested.
* CPU and memory profiling. Try out:
* https://github.com/nvdv/vprof
* https://github.com/what-studio/profiling
* https://github.com/fabianp/memory_profiler
* https://github.com/rkern/line_profiler#line-profiler
* Look at some new trimming/qc programs; decide whether to add to benchmarks and/or incorporate any of their features
* https://github.com/OpenGene/fastp/issues
* http://tagcleaner.sourceforge.net/
* https://github.com/mdshw5/fastqp/blob/master/README.md
### 2.0
* Simplification of command line options, perhaps by further splitting functionality up into different sub-commands, but also by more intelligent choices for default option values based on context.
* Consider adding additional report formats
* Add fuzzy matching: https://github.com/Daniel-Liu-c0deb0t/Java-Fuzzy-Search
* https://github.com/marcelm/cutadapt/issues/112
* Performance enhancements using
* http://numba.pydata.org/
* https://github.com/undefx/vecpy
* https://github.com/serge-sans-paille/pythran
* https://github.com/IntelLabs/hpat
* https://github.com/cupy/cupy
* >90% test coverage
* Fuzz testing using AFL
* http://lcamtuf.coredump.cx/afl/
* https://github.com/jwilk/python-afl
### Beyond 2.0
* Implement additional alternate alignment algorithms.
* Implement the error detection algorithm in ADEPT: https://github.com/LANL-Bioinformatics/ADEPT
* Explore new quality trimming algorithms
* UrQt: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4450468/
* InfoTrim: github.com/JacobPorter/InfoTrim
* Scythe is an interesting new trimmer. Depending on how the benchmarks look in the forthcoming paper, we will add it to the list of tools we compare against Atropos, and perhaps implement their Bayesian approach for adapter match.
* Experiment with replacing the multicore implementation with an asyncio-based implementation (using ProcessPoolExecutor and uvloop).
* Automatic adaptive tuning of queue sizes to maximize the balance between memory usage and latency.
* FastProNGS has some nice visualizations that could be included, rather than relying on MultiQC: https://github.com/Megagenomics/FastProNGS
While we consider the command-line interface to be stable, the internal code organization of Atropos is likely to change. At this time, we recommend to not directly interface with Atropos as a library (or to be prepared for your code to break). The internal code organization will be stabilized as of version 2.0, which is planned for sometime in 2017.
If you would like to suggest additional enhancements, you can submit issues and/or pull requests at our GitHub page.
%prep
%autosetup -n atropos-1.1.31
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-atropos -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.31-1
- Package Spec generated
|