Skip to content

Commit 95623b2

Browse files
Added -l 0 to goalign subseq to extract subsequence from -s to the end (with the file...)
1 parent cd404d7 commit 95623b2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cmd/subseq.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ It takes an alignment and extracts sub-sequences from it, given
2828
a start position (0-based inclusive) and a length.
2929
If the length (l) is after the end of the alignment, will stop at the
3030
end of the alignment.
31+
If the length == 0 , then the extracted sequences will be [start,alilength[
3132
If the length l <0 , then the extracted sequences will be [start,alilength-l[
3233
If the length l <0 and a reference sequence is given, the sub alignment will span [start,reflength-l[
3334
of the ref sequence
@@ -133,7 +134,7 @@ If several alignments are present in the input file and the output is a file
133134
}
134135
}
135136
if refseq {
136-
if leng < 0 {
137+
if leng <= 0 {
137138
if ref, found := al.GetSequenceChar(subseqrefseq); !found {
138139
err = fmt.Errorf("reference sequence %s not found in the alignment", subseqrefseq)
139140
io.LogError(err)
@@ -147,7 +148,7 @@ If several alignments are present in the input file and the output is a file
147148
return
148149
}
149150
} else {
150-
if leng < 0 {
151+
if leng <= 0 {
151152
leng = (al.Length() + leng) - start
152153
}
153154
}

0 commit comments

Comments
 (0)