You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* check for min consecutive repeats of motif in clipped segments
* Use fuzzy motifs and format arg names correctly
* create and search with regex motifs
* search with min repeats of regex patterns
* Update args and use fuzzy
* Pythonic arg names.
@@ -40,7 +40,7 @@ In most eukaryotic species, chromosomes terminate in repetitive [telomeric](http
40
40
41
41
Teloclip is designed to recover long-reads that can be used to extend draft contigs and resolve missing telomeres (short-read alignments may also be processed with teloclip). It does this by searching alignments of raw long-read data (i.e. Pacbio or ONT reads mapped with Minimap2) for 'clipped' alignments that occur at the ends of draft contigs. A 'clipped' alignment is produced where the *end* of a read is not part of its best alignment. This can occur when a read extends past the end of an assembled contig.
42
42
43
-
Information about segments of a read that were aligned or clipped are stored in [SAM formatted](https://en.wikipedia.org/wiki/SAM_(file_format)) alignments as a [CIGAR string](https://www.drive5.com/usearch/manual/cigar.html). Teloclip parses these strings to determine if a read has been clipped at one or both ends of a contig.
43
+
Information about segments of a read that were aligned or clipped are stored in [SAM formatted](https://en.wikipedia.org/wiki/SAM_(file_format)) alignments as a [CIGAR string](https://www.drive5.com/usearch/manual/cigar.html). Teloclip parses these strings to determine if a read has been clipped at one or both ends of a contig.
44
44
45
45
Optionally, teloclip can screen overhanging reads for telomere-associated motifs (i.e. 'TTAGGG' / 'CCCTAA') and report only those containing a match.
There are 4 options available for installing Teloclip locally:
56
56
57
-
1) Install from PyPi.
57
+
1) Install from PyPi.
58
58
This or Bioconda will get you the latest stable release.
59
59
60
60
```bash
@@ -94,10 +94,6 @@ teloclip --version
94
94
teloclip --help
95
95
```
96
96
97
-
### Run with Gitpod
98
-
99
-
Alternatively, [launch a Gitpod Workspace](https://gitpod.io/#https://github.com/adamtaranto/teloclip) with `teloclip`, `samtools`, and `minimap2` pre-installed.
100
-
101
97
## Example Usage
102
98
103
99
Basic use case:
@@ -117,10 +113,10 @@ samtools faidx ref.fa
117
113
118
114
```bash
119
115
# Read alignment input from sam file and write overhang-reads to stout
120
-
teloclip --ref ref.fa.fai in.sam
116
+
teloclip --ref-idx ref.fa.fai in.sam
121
117
122
118
# Read alignment input from stdin and write stdout to file
123
-
teloclip --ref ref.fa.fai < in.sam > out.sam
119
+
teloclip --ref-idx ref.fa.fai < in.sam > out.sam
124
120
```
125
121
126
122
**Reading and writing BAM alignments**
@@ -130,7 +126,7 @@ You can use bam files with teloclip like this:
130
126
131
127
```bash
132
128
# Read alignments from bam file, pipe sam lines to teloclip, sort overhang-read alignments and wite to bam file
Raw long-reads can contain errors in the length of homopolymer tracks. If the `--fuzzy` option is set, motifs will be converted to regex patterns that allow the number of repeated bases to vary by +/- 1.
165
+
Raw long-reads can contain errors in the length of homopolymer tracks. If the `--fuzzy` option is set, motifs will be converted to regex patterns that allow the number of repeated bases to vary by +/- 1.
171
166
i.e. "TTAGGG" -> "T{1,3}AG{2,4}". This pattern will match TTAGG TTAGGGG TAGG TTTAGGG etc.
172
167
173
-
To reduce off target matching you can increase to minimum required number of motif matches with "--min_repeats".
168
+
To reduce off target matching you can increase the minimum required number of sequential motif matches with "--min-repeats".
174
169
175
170
```bash
176
-
# Compress homopolymers in query motifs and clipped regions to compensate for errors in raw PacBio or ONP data.
177
-
# i.e. The motif 'TTAGGGTTAGGG' becomes 'TAGTAG' and will match 'TTTTTAAAGGTTTAAGGG'.
@@ -208,118 +201,88 @@ Some assembly tools, such as [Canu](https://github.com/marbl/canu), preform pre-
208
201
209
202
This trimming step can result in loss of distal telomeric sequences and so these reads should **NOT** be used with Teloclip.
210
203
211
-
212
204
However, long-reads that have been error-corrected using Illumina data with tools such as [LoRDEC](https://github.com/lanl001/halc) or [HALC](http://www.atgc-montpellier.fr/lordec/) should be fine.
213
205
214
206
Generally speaking, raw long-reads will be fine for extending your contigs. Any errors in the extended region can be corrected with a round of polishing with short-read data using [Pilon](https://github.com/broadinstitute/pilon).
215
207
216
208
### Extending contigs
217
209
218
-
Before using terminal alignments identified by Teloclip to extend contigs you should inspect the alignments in a genome browser that displays information about clipped reads, such as [IGV](https://github.com/igvteam/igv).
210
+
Before using terminal alignments identified by Teloclip to extend contigs you should inspect the alignments in a genome browser that displays information about clipped reads, such as [IGV](https://github.com/igvteam/igv).
219
211
220
212
Check for conflicting soft-clipped sequences. These indicate non-specific read alignments. You may need to tighten your alignment criteria or manually remove low-confidence alignments.
221
213
222
214
After manually extending contigs the revised assembly should be re-polished using available long and short read data to correct indels present in the raw long-reads.
223
215
224
216
Finally, validate the updated assembly by re-mapping long-read data and checking for alignments that extend into revised contig ends.
225
217
226
-
227
-
### Alternative use cases
228
-
229
-
**Illumina data**
230
-
231
-
Teloclip will also work fine with aligned short read data, which has a far lower error rate than single-molecule long-read data.
232
-
233
-
However, there are obvious limits to the distance that a contig may be extended with shorter reads.
234
-
235
-
Teloclip does not use information from paired-reads.
236
-
237
-
**Merging existing assemblies**
238
-
239
-
You may have assemblies for your genome generated with different assemblers/configurations or data types (i.e. Illumina, PacBio, ONT) which vary in their success in assembling individual telomeres.
240
-
241
-
These alternative assemblies can be treated as pseudo-long-reads and aligned to a reference using [Minimap2](https://github.com/lh3/minimap2).
242
-
243
-
Teloclip can identify aligned contigs that can be used to extend those in the reference set.
244
-
245
-
Be cautious of short contigs that may align to may repetative sub-telomeric regions and result non-specific extension of contigs.
246
-
247
-
Also beware of low-complexity telomeric regions on different chromosomes aligning to each other and resulting in end-to-end fusions.
248
-
249
-
250
-
```bash
251
-
# Align alternative assembly contigs to reference and report overhang alignments. Ignore secondary alignments.
Using default settings, teloclip will report alignments with clipped regions extending past linear contig ends.
258
-
259
-
Reads can be extracted from these alignments using [circlator's bam2reads](https://github.com/sanger-pathogens/circlator/wiki/Task%3A-bam2reads) and re-aligned to an assembly graph in [Bandage](https://github.com/rrwick/Bandage) to help identify uncircularised contigs.
260
-
261
218
## Options
262
219
263
220
### Teloclip Options
264
221
265
222
Run `teloclip --help` to view the programs' most commonly used options:
Extract overhanging reads for each end of each reference contig. Write to fasta.
270
+
308
271
positional arguments:
309
-
samfile If not set, will read sam from stdin.
310
-
311
-
optional arguments:
312
-
-h, --help Show this help message and exit
313
-
--refIdx Path to fai index for reference fasta. Index fasta
314
-
using `samtools faidx FASTA`
315
-
--prefix Use this prefix for output files. Default: None.
316
-
--extractReads If set, write overhang reads to fasta by contig.
317
-
--extractDir
272
+
samfile
273
+
274
+
options:
275
+
-h, --help show this help message and exit
276
+
--ref-idx REF_IDX Path to fai index for reference fasta. Index fasta using `samtools
277
+
faidx FASTA`
278
+
--prefix PREFIX Use this prefix for output files. Default: None.
279
+
--extract-reads If set, write overhang reads to fasta by contig.
280
+
--extract-dir EXTRACT_DIR
318
281
Write extracted reads to this directory. Default: cwd.
319
-
--minClip Require clip to extend past ref contig end by at least
320
-
N bases.
321
-
--maxBreak Tolerate max N unaligned bases at contig ends.
322
-
--version Show program's version number and exit
282
+
--min-clip MIN_CLIP Require clip to extend past ref contig end by at least N bases.
283
+
--max-break MAX_BREAK
284
+
Tolerate max N unaligned bases before contig end.
285
+
-v, --version show program's version number and exit
323
286
```
324
287
325
288
## Citing Teloclip
@@ -354,7 +317,6 @@ Xu, Z., Wang, G., Zhu, X. et al. Genome assembly of two allotetraploid cotton ge
354
317
355
318
Yang, H.P., Wenzel, M., Hauser, D.A., Nelson, J.M., Xu, X., Eliáš, M. and Li, F.W., 2021. Monodopsis and Vischeria genomes shed new light on the biology of eustigmatophyte algae. Genome biology and evolution, 13(11), p.evab233.
356
319
357
-
358
320
## Issues
359
321
360
322
Submit feedback to the [Issue Tracker](https://github.com/Adamtaranto/teloclip/issues)
0 commit comments