zhanxw / seqminer

Query sequence data (VCF/BCF1/BCF2, Tabix, BGEN, PLINK) in R
http://zhanxw.github.io/seqminer/
Other
30 stars 12 forks source link

Fix bug where only the first range would be checked #6

Closed timoast closed 5 years ago

timoast commented 5 years ago

Hi! I came across a small bug in isTabixRange today which has a very simple fix. This fixes an issue where only the first range would be checked if a vector was supplied.

Current version:

isTabixRange(c("chr1:1-200", "X:1", "1:100-100", "chr1", "1:1-20,1:30-40"))
chr1:1-200 
      TRUE 

After change:

isTabixRange(c("chr1:1-200", "X:1", "1:100-100", "chr1", "1:1-20,1:30-40"))
chr1:1-200        X:1  1:100-100       chr1     1:1-20    1:30-40 
      TRUE       TRUE       TRUE       TRUE       TRUE       TRUE
zhanxw commented 5 years ago

Thanks. Looks good. Will accept.

Sent from my iPhone

On May 15, 2019, at 12:12 PM, Tim Stuart notifications@github.com wrote:

Hi! I came across a small bug in isTabixRange today which has a very simple fix. This fixes an issue where only the first range would be checked if a vector was supplied.

Current version:

isTabixRange(c("chr1:1-200", "X:1", "1:100-100", "chr1", "1:1-20,1:30-40")) chr1:1-200 TRUE After change:

isTabixRange(c("chr1:1-200", "X:1", "1:100-100", "chr1", "1:1-20,1:30-40")) chr1:1-200 X:1 1:100-100 chr1 1:1-20 1:30-40 TRUE TRUE TRUE TRUE TRUE TRUE You can view, comment on, or merge this pull request online at:

https://github.com/zhanxw/seqminer/pull/6

Commit Summary

Fix bug where only the first range would be checked File Changes

M R/seqminer.R (2) Patch Links:

https://github.com/zhanxw/seqminer/pull/6.patch https://github.com/zhanxw/seqminer/pull/6.diff — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.