diff --git a/DESCRIPTION b/DESCRIPTION index fbf4040..2174922 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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: diff --git a/README.md b/README.md index bc8e9b8..9620152 100644 --- a/README.md +++ b/README.md @@ -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") ``` @@ -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. diff --git a/Rpairix.Rproj b/Rpairix.Rproj index 5309c96..6c20695 100644 --- a/Rpairix.Rproj +++ b/Rpairix.Rproj @@ -1,4 +1,4 @@ -Version: 0.1.2 +Version: 0.1.3 RestoreWorkspace: No SaveWorkspace: No diff --git a/src/rpairixlib.c b/src/rpairixlib.c index 119d5fa..fe0344a 100644 --- a/src/rpairixlib.c +++ b/src/rpairixlib.c @@ -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++;