Skip to content

Commit

Permalink
Merge pull request #18 from 4dn-dcic/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
SooLee authored Apr 7, 2017
2 parents 1e5be1a + 21f74aa commit 945fd2f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: Rpairix
Title: Rpairix
Version: 0.1.2
Version: 0.1.3
Authors@R: person("Soo", "Lee", email = "duplexa@gmail.com", role = c("aut", "cre"))
Description: R binder for pairix, tool for querying a pair of genomic ranges in a pairs file (pairix-indexed bgzipped text file)
Depends:
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ R --no-site-file --no-environ --no-save --no-restore CMD INSTALL --install-tests
To install a specific version,
```r
library(devtools)
install_url("https://github.com/4dn-dcic/Rpairix/archive/0.1.2.zip")
install_url("https://github.com/4dn-dcic/Rpairix/archive/0.1.3.zip")
```


Expand Down Expand Up @@ -272,6 +272,9 @@ Individual R functions are written and documented in `R/`. The `src/rpairixlib.c
***

## Version history
### 0.1.3
* `px_query`: fixed a new problem (since 0.1.2) with multi-query returning only the last query result.

### 0.1.2
* Function `px_get_column_names` is now added.
* `px_query` now adds column names for the query result if indexing was done with `pairs` preset.
Expand Down
2 changes: 1 addition & 1 deletion Rpairix.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version: 0.1.2
Version: 0.1.3

RestoreWorkspace: No
SaveWorkspace: No
Expand Down
4 changes: 2 additions & 2 deletions src/rpairixlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,11 @@ SEXP get_lines(SEXP _r_pfn, SEXP _r_pquerystr, SEXP _r_pnquery, SEXP _r_pn){
SEXP _r_presultstr_line[*pn];
if(tb){
const ti_conf_t *pconf = ti_get_conf(tb->idx);
int i, ires=0; // i is index for querystr, ires is index for result line
int i, ires=0, k=0; // i is index for querystr, ires is index for result line
for(i=0;i<*pnquery;i++){
ti_iter_t iter = ti_querys_2d(tb, pquerystr[i]);
char *s;
int len=-1,k=0;
int len=-1;
while ((s = ti_read(tb, iter, &len)) != 0) {
int j,start=0,m=0; // j is position on result line, start is start position of the current column, m is the index of the current column
if(ncols==0) for(j=0;j<=len;j++) if(s[j]==pconf->delimiter||s[j]==0) ncols++;
Expand Down

0 comments on commit 945fd2f

Please sign in to comment.