ga4gh-schemas
ga4gh-schemas copied to clipboard
Negative intervals in queries
What is the result of a query requesting reads with start = n and end < n?
Shouldn't that be an error?
The definition of a closed-open range [a..b)
is {x | a <= x < b}
.
I assume it's an error, but what the error is / how it's reported isn't included in the specs. I think it should be defined some where.
This should be an error surely, and it should definitely be defined in the specs. Perhaps we should open a general issue on how to deal with errors and develop a convention for specifying them?
This is a very confused thread. Certainly [a,b) is the sequence of bases x such that a <= x < b.
This means that [3,3) is an example of [a,a) which is empty. It has zero length. As David Haussler says, it is not intrinsically an error - an empty set is a perfectly good set and there are good reasons for treating a 0-length sequence as a perfectly good sequence. Just as 0 is a perfectly good integer. Note that [3,3) and [4,4), although both empty, are not the same thing. This is because a sequence has both a literal string of bases and a location. For example in sequence AGGCGT, both [1,2) and [4,5) have literal string "G", but are different because they are different G's.
I would say that there is an error if a > b, e.g. [3,2).
Richard
It may be that fro
On 9 Apr 2015, at 09:29, Jerome Kelleher [email protected] wrote:
This should be an error surely, and it should definitely be defined in the specs. Perhaps we should open a general issue on how to deal with errors and develop a convention for specifying them?
— Reply to this email directly or view it on GitHub https://github.com/ga4gh/schemas/issues/272#issuecomment-91148982.
The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.