Skip to content

Commit 005c9a1

Browse files
committed
exoneval may skip terminal exons in aa mode
1 parent 1fd85be commit 005c9a1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

misc/paftools.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2613,7 +2613,8 @@ function paf_junceval(args)
26132613
function paf_exoneval(args) // adapted from paf_junceval()
26142614
{
26152615
var c, l_fuzzy = 0, print_ovlp = false, print_err_only = false, first_only = false, chr_only = false, aa = false, is_bed = false, use_cds = false, eval_base = false;
2616-
while ((c = getopt(args, "l:epcab1ds")) != null) {
2616+
var skip_start = false, skip_last = false;
2617+
while ((c = getopt(args, "l:epcab1dsft")) != null) {
26172618
if (c == 'l') l_fuzzy = parseInt(getopt.arg);
26182619
else if (c == 'e') print_err_only = print_ovlp = true;
26192620
else if (c == 'p') print_ovlp = true;
@@ -2623,6 +2624,8 @@ function paf_exoneval(args) // adapted from paf_junceval()
26232624
else if (c == '1') first_only = true;
26242625
else if (c == 'd') use_cds = true;
26252626
else if (c == 's') eval_base = true;
2627+
else if (c == 'f') skip_start = true;
2628+
else if (c == 't') skip_last = skip_start = true;
26262629
}
26272630

26282631
if (args.length - getopt.ind < 1) {
@@ -2635,6 +2638,8 @@ function paf_exoneval(args) // adapted from paf_junceval()
26352638
print(" -e print erroreous overlapping exons");
26362639
print(" -c only consider alignments to /^(chr)?([0-9]+|X|Y)$/");
26372640
print(" -1 only process the first alignment of each query");
2641+
print(" -f skip the first exon in the miniprot mode");
2642+
print(" -t skip the first and the last exons");
26382643
print(" -b BED as input");
26392644
print(" -s compute base Sn and Sp (more memory)");
26402645
exit(1);
@@ -2764,6 +2769,8 @@ function paf_exoneval(args) // adapted from paf_junceval()
27642769
for (var i = tmp_exon.length - 1; i >= 0; --i)
27652770
exon.push([pos + (glen - tmp_exon[i][1]), pos + (glen - tmp_exon[i][0])]);
27662771
}
2772+
if (skip_start) exon.shift();
2773+
if (skip_last) exon.pop();
27672774
} else {
27682775
var tmp_st = pos;
27692776
while ((m = re_cigar.exec(cigar)) != null) {

0 commit comments

Comments
 (0)