[med-svn] [Git][med-team/python-pairix][upstream] New upstream version 0.3.8
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Thu Aug 22 22:05:17 BST 2024
Étienne Mollier pushed to branch upstream at Debian Med / python-pairix
Commits:
f26204b6 by Étienne Mollier at 2024-08-22T21:42:35+02:00
New upstream version 0.3.8
- - - - -
9 changed files:
- README.md
- VERSION.txt
- + pairix_index_spec.pdf
- + pairix_index_spec.xlsx
- samples/test.regions2
- src/main.c
- src/pairix.h
- src/pairs_merger.c
- src/streamer_1d.c
Changes:
=====================================
README.md
=====================================
@@ -327,13 +327,14 @@ chr2:1-20000|*
cat samples/test.regions2
chrX:100000000-110000000|chrY
-chr19:1-100000|chr19
+chr19:1-300000|chr19
bin/pairix -L samples/test_4dn.pairs.gz samples/test.regions samples/test.regions2
SRR1658581.49364897 chr1 36379 chr20 62713042 + +
SRR1658581.31672330 chr1 12627 chr9 23963238 + -
SRR1658581.22713561 chr1 14377 chrX 107423076 - +
SRR1658581.31992022 chrX 108223782 chrY 5017118 - -
+SRR1658581.55524746 chr19 105058 chr19 105558 + -
```
=====================================
VERSION.txt
=====================================
@@ -1 +1 @@
-0.3.7
+0.3.8
=====================================
pairix_index_spec.pdf
=====================================
Binary files /dev/null and b/pairix_index_spec.pdf differ
=====================================
pairix_index_spec.xlsx
=====================================
Binary files /dev/null and b/pairix_index_spec.xlsx differ
=====================================
samples/test.regions2
=====================================
@@ -1,2 +1,2 @@
chrX:100000000-110000000|chrY
-chr19:1-100000|chr19
+chr19:1-300000|chr19
=====================================
src/main.c
=====================================
@@ -165,7 +165,7 @@ int main(int argc, char *argv[])
if(conf.bc2 && !conf.ec2) conf.ec2=conf.bc2;
if (optind == argc || help_flag) {
fprintf(stderr, "\n");
- fprintf(stderr, "Program: pairix (PAIRs file InderXer)\n");
+ fprintf(stderr, "Program: pairix (PAIRs file IndeXer)\n");
fprintf(stderr, "Version: %s\n\n", PACKAGE_VERSION);
fprintf(stderr, "Usage: pairix <in.pairs.gz> [region1 [region2 [...]]]\n\n");
fprintf(stderr, "Options: -p STR preset: pairs, merged_nodups, old_merged_nodups, gff, bed, sam, vcf, psltbl [gff]\n");
=====================================
src/pairix.h
=====================================
@@ -28,7 +28,7 @@
#ifndef __TABIDX_H
#define __TABIDX_H
-#define PACKAGE_VERSION "0.3.7"
+#define PACKAGE_VERSION "0.3.8"
#include <stdint.h>
#include "kstring.h"
=====================================
src/pairs_merger.c
=====================================
@@ -10,47 +10,6 @@
#define FILENAMEMAX 2000
-int main(int argc, char *argv[])
-{
- int num_fn = argc -1;
- int i;
- //BGZF *bzfp;
- //int f_dst;
-
- if(argc==1){
- fprintf(stderr, "\n");
- fprintf(stderr, "Program: pairs_merger\n");
- fprintf(stderr, "Version: %s\n\n", PACKAGE_VERSION);
- //fprintf(stderr, "Usage: pairs_merger <in1.pairs.gz> <in2.pairs.gz> <in3.pairs.gz> ... > out.pairs.gz\n\n");
- fprintf(stderr, "Usage: pairs_merger <in1.pairs.gz> <in2.pairs.gz> <in3.pairs.gz> ... | bgzip -c > out.pairs.gz\n\n");
- return(1);
- }
-
- char *fn_list[num_fn];
- for(i=0;i<num_fn;i++) {
- fn_list[i]=malloc(FILENAMEMAX*sizeof(char));
- strcpy(fn_list[i],argv[i+1]);
- }
-
- // write to stdout bgzip
- //f_dst = fileno(stdout);
- //bzfp = bgzf_dopen(f_dst, "w");
-
- // actually write merged pairs to bzfp stdout
- //int res = pairs_merger(fn_list, num_fn, bzfp);
- int res = pairs_merger(fn_list, num_fn, NULL);
-
- // close bgzf stream
- //if (bgzf_close(bzfp) < 0) fail(bzfp);
- //if (bgzf_close(bzfp) < 0){ fprintf(stderr,"Error: %d\n",bzfp->errcode); return(1); }
-
-
- for(i=0;i<num_fn;i++) {
- free(fn_list[i]);
- }
- return(res);
-}
-
int pairs_merger(char **fn, int n, BGZF *bzfp) // pass bgfp if the result should be bgzipped. or pass NULL.
{
pairix_t *tbs[n];
@@ -91,6 +50,47 @@ int pairs_merger(char **fn, int n, BGZF *bzfp) // pass bgfp if the result shoul
for(i=0;i<n;i++) ti_close(tbs[i]);
for(i=0;i<n_uniq_seq;i++) free(uniq_seq_list[i]);
free(uniq_seq_list);
- return(NULL);
- } else { fprintf(stderr,"Null unique seq list\n"); return(NULL); }
+ return(0);
+ } else { fprintf(stderr,"Null unique seq list\n"); return(0); }
+}
+
+int main(int argc, char *argv[])
+{
+ int num_fn = argc -1;
+ int i;
+ //BGZF *bzfp;
+ //int f_dst;
+
+ if(argc==1){
+ fprintf(stderr, "\n");
+ fprintf(stderr, "Program: pairs_merger\n");
+ fprintf(stderr, "Version: %s\n\n", PACKAGE_VERSION);
+ //fprintf(stderr, "Usage: pairs_merger <in1.pairs.gz> <in2.pairs.gz> <in3.pairs.gz> ... > out.pairs.gz\n\n");
+ fprintf(stderr, "Usage: pairs_merger <in1.pairs.gz> <in2.pairs.gz> <in3.pairs.gz> ... | bgzip -c > out.pairs.gz\n\n");
+ return(1);
+ }
+
+ char *fn_list[num_fn];
+ for(i=0;i<num_fn;i++) {
+ fn_list[i]=malloc(FILENAMEMAX*sizeof(char));
+ strcpy(fn_list[i],argv[i+1]);
+ }
+
+ // write to stdout bgzip
+ //f_dst = fileno(stdout);
+ //bzfp = bgzf_dopen(f_dst, "w");
+
+ // actually write merged pairs to bzfp stdout
+ //int res = pairs_merger(fn_list, num_fn, bzfp);
+ int res = pairs_merger(fn_list, num_fn, NULL);
+
+ // close bgzf stream
+ //if (bgzf_close(bzfp) < 0) fail(bzfp);
+ //if (bgzf_close(bzfp) < 0){ fprintf(stderr,"Error: %d\n",bzfp->errcode); return(1); }
+
+
+ for(i=0;i<num_fn;i++) {
+ free(fn_list[i]);
+ }
+ return(res);
}
=====================================
src/streamer_1d.c
=====================================
@@ -10,41 +10,6 @@
#define FILENAMEMAX 2000
-int main(int argc, char *argv[])
-{
- //BGZF *bzfp;
- //int f_dst;
-
- if(argc==1){
- fprintf(stderr, "\n");
- fprintf(stderr, "Program: streamer_1d\n");
- fprintf(stderr, "Version: %s\n\n", PACKAGE_VERSION);
- fprintf(stderr, "Resorter (convert a file sorted by chr1-chr2-pos1-pos2 to a stream sorted by chr1-pos1)\n\n");
- fprintf(stderr, "Usage: streamer_1d in.2d.pairs.gz > out.1d.pairs\n");
- fprintf(stderr, "Usage: streamer_1d in.2d.pairs.gz | bgzip -c > out.1d.pairs.gz\n\n");
- return(1);
- }
-
- char *fn;
- fn=malloc(FILENAMEMAX*sizeof(char));
- strcpy(fn,argv[1]);
-
- // write to stdout bgzip (This is slower, so don't use it)
- //f_dst = fileno(stdout);
- //bzfp = bgzf_dopen(f_dst, "w");
-
- // actually write merged pairs to bzfp stdout
- //int res = stream_1d(fn, bzfp);
- int res = stream_1d(fn);
-
- // close bgzf stream
- //if (bgzf_close(bzfp) < 0) fail(bzfp);
- //if (bgzf_close(bzfp) < 0){ fprintf(stderr,"Error: %d\n",bzfp->errcode); return(1); }
-
- free(fn);
- return(res);
-}
-
// Uc->Up converter - convert a single 2D-sorted file into a 1D-sorted stream.
int stream_1d(char *fn)
@@ -91,3 +56,39 @@ int stream_1d(char *fn)
return (0);
}
+
+int main(int argc, char *argv[])
+{
+ //BGZF *bzfp;
+ //int f_dst;
+
+ if(argc==1){
+ fprintf(stderr, "\n");
+ fprintf(stderr, "Program: streamer_1d\n");
+ fprintf(stderr, "Version: %s\n\n", PACKAGE_VERSION);
+ fprintf(stderr, "Resorter (convert a file sorted by chr1-chr2-pos1-pos2 to a stream sorted by chr1-pos1)\n\n");
+ fprintf(stderr, "Usage: streamer_1d in.2d.pairs.gz > out.1d.pairs\n");
+ fprintf(stderr, "Usage: streamer_1d in.2d.pairs.gz | bgzip -c > out.1d.pairs.gz\n\n");
+ return(1);
+ }
+
+ char *fn;
+ fn=malloc(FILENAMEMAX*sizeof(char));
+ strcpy(fn,argv[1]);
+
+ // write to stdout bgzip (This is slower, so don't use it)
+ //f_dst = fileno(stdout);
+ //bzfp = bgzf_dopen(f_dst, "w");
+
+ // actually write merged pairs to bzfp stdout
+ //int res = stream_1d(fn, bzfp);
+ int res = stream_1d(fn);
+
+ // close bgzf stream
+ //if (bgzf_close(bzfp) < 0) fail(bzfp);
+ //if (bgzf_close(bzfp) < 0){ fprintf(stderr,"Error: %d\n",bzfp->errcode); return(1); }
+
+ free(fn);
+ return(res);
+}
+
View it on GitLab: https://salsa.debian.org/med-team/python-pairix/-/commit/f26204b6cfa25a9ffb3a1b92b33934aaad39cd28
--
View it on GitLab: https://salsa.debian.org/med-team/python-pairix/-/commit/f26204b6cfa25a9ffb3a1b92b33934aaad39cd28
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240822/bf508a78/attachment-0001.htm>
More information about the debian-med-commit
mailing list