Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ Seqtk Examples

* Find telomere (TTAGGG)n repeats:

seqtk telo seq.fa > telo.bed 2> telo.count
seqtk telo seq.fa > telo.fasta
In this folk, the origin sequences will be output
13 changes: 11 additions & 2 deletions seqtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2010,7 +2010,10 @@ int stk_telo(int argc, char *argv[])
else if (max - score > max_drop) break;
}
if (max >= min_score) {
if (!show_profile) printf("%s\t0\t%ld\t%ld\n", seq->name.s, max_i + 1, seq->seq.l);
if (!show_profile) printf(">%s\t0\t%ld\t%ld\n", seq->name.s, max_i + 1, seq->seq.l);
printf("%s\n", seq->seq.s);
if (!show_profile) printf(">%s_remove\t%ld\t%ld\t%ld\n", seq->name.s, max_i, seq->seq.l, seq->seq.l);
printf("%s\n", seq->seq.s + max_i + 1);
sum_telo += max_i + 1;
st = max_i + 1;
}
Expand All @@ -2028,7 +2031,13 @@ int stk_telo(int argc, char *argv[])
else if (max - score > max_drop) break;
}
if (max >= min_score) {
if (!show_profile) printf("%s\t%ld\t%ld\t%ld\n", seq->name.s, max_i, seq->seq.l, seq->seq.l);
if (!show_profile) printf(">%s\t%ld\t%ld\t%ld\n", seq->name.s, max_i, seq->seq.l, seq->seq.l);
printf("%s\n", seq->seq.s);
if (!show_profile) printf(">%s_remove\t%ld\t%ld\t%ld\n", seq->name.s, max_i, seq->seq.l, seq->seq.l);
char temp_char = seq->seq.s[max_i];
seq->seq.s[max_i] = '\0';
printf("%s\n", seq->seq.s);
seq->seq.s[max_i] = temp_char;
sum_telo += seq->seq.l - max_i;
}
}
Expand Down