scbi_fqbin 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.DS_Store +0 -0
- data/.gitignore +14 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/{README.rdoc → README.md} +0 -0
- data/Rakefile +8 -28
- data/lib/scbi_fqbin.rb +3 -5
- data/lib/scbi_fqbin/fastabin.rb +411 -0
- data/lib/scbi_fqbin/fastq_file_c.rb +373 -0
- data/lib/scbi_fqbin/fbin_file.rb +1 -1
- data/lib/scbi_fqbin/t.rb +9 -0
- data/lib/scbi_fqbin/t2.rb +12 -0
- data/lib/scbi_fqbin/version.rb +3 -0
- data/lib_fqbin_src.zip +0 -0
- data/lib_fqbin_src/Makefile +66 -0
- data/lib_fqbin_src/fq +0 -0
- data/lib_fqbin_src/fq.c +165 -0
- data/lib_fqbin_src/hash_fqbin +0 -0
- data/lib_fqbin_src/hash_fqbin.c +212 -0
- data/lib_fqbin_src/idx_fqbin +21 -0
- data/lib_fqbin_src/iterate_fqbin +0 -0
- data/lib_fqbin_src/iterate_fqbin.c +136 -0
- data/lib_fqbin_src/lib_fqbin.c +1748 -0
- data/lib_fqbin_src/lib_fqbin.h +194 -0
- data/lib_fqbin_src/mk_fqbin +0 -0
- data/lib_fqbin_src/mk_fqbin.c +138 -0
- data/lib_fqbin_src/other/bwxform.c +915 -0
- data/lib_fqbin_src/other/bwxform.h +74 -0
- data/lib_fqbin_src/other/find_in_index.c +130 -0
- data/lib_fqbin_src/other/hash_fbin_nogzchunks.c +164 -0
- data/lib_fqbin_src/other/idx_fqbin +0 -0
- data/lib_fqbin_src/other/idx_fqbin.c +67 -0
- data/lib_fqbin_src/other/make_hsh.sh +14 -0
- data/lib_fqbin_src/other/rd_extras_fbin.c +45 -0
- data/lib_fqbin_src/read_fq +0 -0
- data/lib_fqbin_src/read_fq.c +143 -0
- data/lib_fqbin_src/read_fqbin +0 -0
- data/lib_fqbin_src/read_fqbin.c +101 -0
- data/lib_fqbin_src/sort_index +9 -0
- data/lib_fqbin_src/test.rb +13 -0
- data/scbi_fqbin.gemspec +25 -0
- data/test/build.rake +15 -0
- data/test/fbinfile +0 -0
- data/test/fbinfile.index +0 -0
- data/test/no_test_fill_file.rb +66 -0
- data/test/old/app.rb +43 -0
- data/test/old/bin/iterate_fastabin.rb +54 -0
- data/test/old/bin/mk_fastabin.rb +22 -0
- data/test/old/bin/rd_fastabin.rb +36 -0
- data/test/old/bin/rd_fq.rb +20 -0
- data/test/old/bioruby.rb +27 -0
- data/test/old/c/Makefile +34 -0
- data/test/old/c/fbin_lib.zip +0 -0
- data/test/old/c/iterate_fbin.c +54 -0
- data/test/old/c/libreria_gz.c +707 -0
- data/test/old/c/libreria_gz.h +127 -0
- data/test/old/c/main.c +86 -0
- data/test/old/c/mk_fbin.c +24 -0
- data/test/old/c/rd_seq_fbin.c +44 -0
- data/test/old/c/test_ffi/a.out +0 -0
- data/test/old/c/test_ffi/app.c +26 -0
- data/test/old/c/test_ffi/app.rb +19 -0
- data/test/old/c/test_ffi/liblibreria_gz.dylib +0 -0
- data/test/old/c/test_ffi/libmylibrary.dylib +0 -0
- data/test/old/c/test_ffi/my_library.rb +23 -0
- data/test/old/c/test_ffi/mylibrary.c +22 -0
- data/test/old/c/test_ffi/mylibrary.h +6 -0
- data/test/old/c/usage_instructions.txt +62 -0
- data/test/old/ext/Makefile +187 -0
- data/test/old/ext/Makefile.dario +34 -0
- data/test/old/ext/extconf.rb +8 -0
- data/test/old/ext/mk_fbin.c +24 -0
- data/test/old/ext/sample/extras.txt +4 -0
- data/{.gemtest → test/old/ext/sample/extras2.txt} +0 -0
- data/test/old/ext/sample/f1.fasta +10 -0
- data/test/old/ext/sample/f1.fasta.qual +10 -0
- data/test/old/ext/sample/f1.fbin +0 -0
- data/test/old/ext/sample/f1.fbin.index +0 -0
- data/test/old/ext/sample/main.c +86 -0
- data/test/old/ext/usage_instructions.txt +62 -0
- data/test/old/t_scbi_fastabin.rb +140 -0
- data/test/read_tests/10-original_sizes.sh +16 -0
- data/test/read_tests/20-fq_time.sh +23 -0
- data/test/read_tests/30-fbin_read_time.sh +23 -0
- data/test/read_tests/40-bsc_read_time.sh +21 -0
- data/test/read_tests/50-fq_time_x4.sh +25 -0
- data/test/read_tests/60-fbin_read_time_x4.sh +24 -0
- data/test/read_tests/70-bsc_read_time_x4.sh +32 -0
- data/test/results_bio_scbi_fasta.txt +11 -0
- data/test/{test_scbi_fbin_file.rb → scbi_fbin_file_test.rb} +0 -0
- data/test/speed.txt +81 -0
- data/test/t_scbi_fasta.rb +12 -0
- data/test/write_tests/10-original_sizes.sh +16 -0
- data/test/write_tests/20-zip_time.sh +17 -0
- data/test/write_tests/30-mk_fbin_time.sh +23 -0
- data/test/write_tests/31-mk_fbin_time_f30.sh +21 -0
- data/test/write_tests/40-gzip_time.sh +16 -0
- data/test/write_tests/41-bsc_time.sh +16 -0
- data/test/write_tests/50-zip_sizes.sh +16 -0
- data/test/write_tests/60-fbin_sizes.sh +17 -0
- data/test/write_tests/61-fbin_sizes_f30.sh +16 -0
- data/test/write_tests/70-gzip_sizes.sh +17 -0
- data/test/write_tests/80-bsc_sizes.sh +17 -0
- data/website/index.html +87 -0
- data/website/index.txt +81 -0
- data/website/javascripts/rounded_corners_lite.inc.js +285 -0
- data/website/stylesheets/screen.css +159 -0
- data/website/template.html.erb +50 -0
- metadata +208 -95
- data/History.txt +0 -19
- data/Manifest.txt +0 -12
- data/PostInstall.txt +0 -7
- data/script/console +0 -10
- data/script/destroy +0 -14
- data/script/generate +0 -14
@@ -0,0 +1,187 @@
|
|
1
|
+
|
2
|
+
SHELL = /bin/sh
|
3
|
+
|
4
|
+
#### Start of system configuration section. ####
|
5
|
+
|
6
|
+
srcdir = .
|
7
|
+
topdir = /Users/dariogf/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1
|
8
|
+
hdrdir = /Users/dariogf/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1
|
9
|
+
arch_hdrdir = /Users/dariogf/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1/$(arch)
|
10
|
+
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
|
11
|
+
prefix = $(DESTDIR)/Users/dariogf/.rvm/rubies/ruby-1.9.2-p0
|
12
|
+
rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
|
13
|
+
exec_prefix = $(prefix)
|
14
|
+
vendorhdrdir = $(rubyhdrdir)/vendor_ruby
|
15
|
+
sitehdrdir = $(rubyhdrdir)/site_ruby
|
16
|
+
rubyhdrdir = $(includedir)/$(RUBY_BASE_NAME)-$(ruby_version)
|
17
|
+
vendordir = $(rubylibprefix)/vendor_ruby
|
18
|
+
sitedir = $(rubylibprefix)/site_ruby
|
19
|
+
ridir = $(datarootdir)/$(RI_BASE_NAME)
|
20
|
+
mandir = $(datarootdir)/man
|
21
|
+
localedir = $(datarootdir)/locale
|
22
|
+
libdir = $(exec_prefix)/lib
|
23
|
+
psdir = $(docdir)
|
24
|
+
pdfdir = $(docdir)
|
25
|
+
dvidir = $(docdir)
|
26
|
+
htmldir = $(docdir)
|
27
|
+
infodir = $(datarootdir)/info
|
28
|
+
docdir = $(datarootdir)/doc/$(PACKAGE)
|
29
|
+
oldincludedir = $(DESTDIR)/usr/include
|
30
|
+
includedir = $(prefix)/include
|
31
|
+
localstatedir = $(prefix)/var
|
32
|
+
sharedstatedir = $(prefix)/com
|
33
|
+
sysconfdir = $(prefix)/etc
|
34
|
+
datadir = $(datarootdir)
|
35
|
+
datarootdir = $(prefix)/share
|
36
|
+
libexecdir = $(exec_prefix)/libexec
|
37
|
+
sbindir = $(exec_prefix)/sbin
|
38
|
+
bindir = $(exec_prefix)/bin
|
39
|
+
rubylibdir = $(rubylibprefix)/$(ruby_version)
|
40
|
+
archdir = $(rubylibdir)/$(arch)
|
41
|
+
sitelibdir = $(sitedir)/$(ruby_version)
|
42
|
+
sitearchdir = $(sitelibdir)/$(sitearch)
|
43
|
+
vendorlibdir = $(vendordir)/$(ruby_version)
|
44
|
+
vendorarchdir = $(vendorlibdir)/$(sitearch)
|
45
|
+
|
46
|
+
CC = gcc
|
47
|
+
CXX = g++
|
48
|
+
LIBRUBY = $(LIBRUBY_SO)
|
49
|
+
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
50
|
+
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
|
51
|
+
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
|
52
|
+
OUTFLAG = -o
|
53
|
+
COUTFLAG = -o
|
54
|
+
|
55
|
+
RUBY_EXTCONF_H =
|
56
|
+
cflags = $(optflags) $(debugflags) $(warnflags)
|
57
|
+
optflags = -O3
|
58
|
+
debugflags = -ggdb
|
59
|
+
warnflags = -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long
|
60
|
+
CFLAGS = -fno-common $(cflags) -fno-common -pipe
|
61
|
+
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
|
62
|
+
DEFS =
|
63
|
+
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE $(DEFS) $(cppflags)
|
64
|
+
CXXFLAGS = $(CFLAGS) $(cxxflags)
|
65
|
+
ldflags = -L.
|
66
|
+
dldflags = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace
|
67
|
+
ARCH_FLAG =
|
68
|
+
DLDFLAGS = $(ldflags) $(dldflags)
|
69
|
+
LDSHARED = $(CC) -dynamic -bundle
|
70
|
+
LDSHAREDXX = $(CXX) -dynamic -bundle
|
71
|
+
AR = ar
|
72
|
+
EXEEXT =
|
73
|
+
|
74
|
+
RUBY_BASE_NAME = ruby
|
75
|
+
RUBY_INSTALL_NAME = ruby
|
76
|
+
RUBY_SO_NAME = ruby.1.9.1
|
77
|
+
arch = x86_64-darwin10.5.0
|
78
|
+
sitearch = $(arch)
|
79
|
+
ruby_version = 1.9.1
|
80
|
+
ruby = /Users/dariogf/.rvm/rubies/ruby-1.9.2-p0/bin/ruby
|
81
|
+
RUBY = $(ruby)
|
82
|
+
RM = rm -f
|
83
|
+
RM_RF = $(RUBY) -run -e rm -- -rf
|
84
|
+
RMDIRS = $(RUBY) -run -e rmdir -- -p
|
85
|
+
MAKEDIRS = mkdir -p
|
86
|
+
INSTALL = /usr/bin/install -c
|
87
|
+
INSTALL_PROG = $(INSTALL) -m 0755
|
88
|
+
INSTALL_DATA = $(INSTALL) -m 644
|
89
|
+
COPY = cp
|
90
|
+
|
91
|
+
#### End of system configuration section. ####
|
92
|
+
|
93
|
+
preload =
|
94
|
+
|
95
|
+
libpath = . $(libdir)
|
96
|
+
LIBPATH = -L. -L$(libdir)
|
97
|
+
DEFFILE =
|
98
|
+
|
99
|
+
CLEANFILES = mkmf.log
|
100
|
+
DISTCLEANFILES =
|
101
|
+
DISTCLEANDIRS =
|
102
|
+
|
103
|
+
extout =
|
104
|
+
extout_prefix =
|
105
|
+
target_prefix =
|
106
|
+
LOCAL_LIBS =
|
107
|
+
LIBS = $(LIBRUBYARG_SHARED) -lpthread -ldl -lobjc
|
108
|
+
SRCS = mk_fbin.c
|
109
|
+
OBJS = mk_fbin.o
|
110
|
+
TARGET = bin
|
111
|
+
DLLIB = $(TARGET).bundle
|
112
|
+
EXTSTATIC =
|
113
|
+
STATIC_LIB =
|
114
|
+
|
115
|
+
BINDIR = $(bindir)
|
116
|
+
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
117
|
+
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
118
|
+
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
119
|
+
HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
|
120
|
+
ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
|
121
|
+
|
122
|
+
TARGET_SO = $(DLLIB)
|
123
|
+
CLEANLIBS = $(TARGET).bundle
|
124
|
+
CLEANOBJS = *.o *.bak
|
125
|
+
|
126
|
+
all: $(DLLIB)
|
127
|
+
static: $(STATIC_LIB)
|
128
|
+
.PHONY: all install static install-so install-rb
|
129
|
+
.PHONY: clean clean-so clean-rb
|
130
|
+
|
131
|
+
clean-rb-default::
|
132
|
+
clean-rb::
|
133
|
+
clean-so::
|
134
|
+
clean: clean-so clean-rb-default clean-rb
|
135
|
+
@-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
|
136
|
+
|
137
|
+
distclean-rb-default::
|
138
|
+
distclean-rb::
|
139
|
+
distclean-so::
|
140
|
+
distclean: clean distclean-so distclean-rb-default distclean-rb
|
141
|
+
@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
142
|
+
@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
143
|
+
@-$(RMDIRS) $(DISTCLEANDIRS)
|
144
|
+
|
145
|
+
realclean: distclean
|
146
|
+
install: install-so install-rb
|
147
|
+
|
148
|
+
install-so: $(RUBYARCHDIR)
|
149
|
+
install-so: $(RUBYARCHDIR)/$(DLLIB)
|
150
|
+
$(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
|
151
|
+
@-$(MAKEDIRS) $(@D)
|
152
|
+
$(INSTALL_PROG) $(DLLIB) $(@D)
|
153
|
+
install-rb: pre-install-rb install-rb-default
|
154
|
+
install-rb-default: pre-install-rb-default
|
155
|
+
pre-install-rb: Makefile
|
156
|
+
pre-install-rb-default: Makefile
|
157
|
+
$(RUBYARCHDIR):
|
158
|
+
$(MAKEDIRS) $@
|
159
|
+
|
160
|
+
site-install: site-install-so site-install-rb
|
161
|
+
site-install-so: install-so
|
162
|
+
site-install-rb: install-rb
|
163
|
+
|
164
|
+
.SUFFIXES: .c .m .cc .cxx .cpp .C .o
|
165
|
+
|
166
|
+
.cc.o:
|
167
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
168
|
+
|
169
|
+
.cxx.o:
|
170
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
171
|
+
|
172
|
+
.cpp.o:
|
173
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
174
|
+
|
175
|
+
.C.o:
|
176
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
177
|
+
|
178
|
+
.c.o:
|
179
|
+
$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
|
180
|
+
|
181
|
+
$(DLLIB): $(OBJS) Makefile
|
182
|
+
@-$(RM) $(@)
|
183
|
+
$(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
$(OBJS): $(hdrdir)/ruby.h $(hdrdir)/ruby/defines.h $(arch_hdrdir)/ruby/config.h
|
@@ -0,0 +1,34 @@
|
|
1
|
+
OS := $(shell uname)
|
2
|
+
|
3
|
+
CFLAGS=
|
4
|
+
|
5
|
+
ifeq ($(OS), Linux)
|
6
|
+
CFLAGS=-fPIC -O3
|
7
|
+
endif
|
8
|
+
|
9
|
+
CC=gcc
|
10
|
+
DEPFILE=.depend
|
11
|
+
PROGS=mk_fbin rd_seq_fbin iterate_fbin
|
12
|
+
OBJS=libreria_gz.o
|
13
|
+
LIBS=-lz
|
14
|
+
LIB_NAME=liblibreria_gz
|
15
|
+
|
16
|
+
all: $(OBJS) $(PROGS) lib
|
17
|
+
|
18
|
+
$(PROGS):
|
19
|
+
$(CC) $(CFLAGS) $(OBJS) $(LIBS) $@.c -o $@
|
20
|
+
|
21
|
+
.c.o:
|
22
|
+
$(CC) $(CFLAGS) -c -o $@ $<
|
23
|
+
|
24
|
+
lib:
|
25
|
+
ifeq ($(OS), Linux)
|
26
|
+
$(CC) -shared -Wl,-soname,$(LIB_NAME).so.1 -o $(LIB_NAME).so $(OBJS) $(LIBS)
|
27
|
+
endif
|
28
|
+
|
29
|
+
ifeq ($(OS), Darwin)
|
30
|
+
$(CC) $(LIBS) -dynamiclib -o $(LIB_NAME).dylib -dylib $(OBJS)
|
31
|
+
endif
|
32
|
+
|
33
|
+
clean:
|
34
|
+
rm -f *.o $(PROGS) *.dylib *.so*
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#include "libfbin.h"
|
2
|
+
#include <stdio.h>
|
3
|
+
#include <ctype.h>
|
4
|
+
|
5
|
+
|
6
|
+
/*******************************************************/
|
7
|
+
/* main */
|
8
|
+
/*******************************************************/
|
9
|
+
int main(int argc, char *argv[])
|
10
|
+
{
|
11
|
+
// check params
|
12
|
+
if (argc!=5)
|
13
|
+
{
|
14
|
+
printf("Usage %s fasta_file qual_file extras_file output_file\n\n",argv[0]);
|
15
|
+
return -1;
|
16
|
+
}
|
17
|
+
|
18
|
+
// process file
|
19
|
+
// int res=process_biofile(argv[1],argv[2],argv[3],argv[4]);
|
20
|
+
int res=process_biofile(argv[1],argv[2],argv[3] ,argv[4]);
|
21
|
+
|
22
|
+
return res;
|
23
|
+
}
|
24
|
+
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
>FX9YN3P05C1ZOQ
|
2
|
+
TTTAGTAATTGAGACACCACCATGATTCAATGTGTGTATTTAGTTCTCATAGTAGTGTTCTATATCAAGGCCAATGCACCATGGTGCTCAAACCCAATAGTCAATCTTCTCTTCAATCCATGGGAAGAATAATTATGGGTGCTTGTATGAAGTTTCATGATCAAAATGGTGCCAATATGGTGACATGGAATGCATACATATTCTATAAAACATGCATGTG
|
3
|
+
>FX9YN3P05C1QG2
|
4
|
+
AATGGTGGAATTGGAGGATCTAATGCATTGAGGAGCTGAGGTCAGAGACTTTGATGCAGGATGGGGTGCATTCTTTCCAGTACATGTATGGGTGTGGCTTGGAAGAGTGACTTGATGTGCTGAGCGGGC
|
5
|
+
>FX9YN3P05C43XJ
|
6
|
+
CCCTCATATTTGTAGATTTCATATTTTTAAGTATATTATATCAGATATATTGTGTCGAACTATACAATGGAATATCCATGGTTGTTTACATATCACTTCTTCCATGCAACTAAAATTGGAATAACCCTTACTTCAAATCAATAAACAAGCTCTGATGTCATAGCTCAATAAACAATCATGAAGCATCATTAAGCAATCCTCCAAGCATTAGATCACTGAGCGGGCTGG
|
7
|
+
>FX9YN3P05C9OK8_I_IZQ
|
8
|
+
CAGAGAGGGCTGTGCAGGGCAATACCTGTACAGTAAAATGGAATTCATGATGAAAAGTACCAAGGTACTCTGCTACCTCTTTGGCAGCCTTTAAATCTGGCGATCCCTGCTCAGA
|
9
|
+
>FX9YN3P05C9OK8_I_DER
|
10
|
+
CACAAAGAAACAGATTATAGAAGAGGTTTGTTTCAACCATTTTAATGGGTGGATTTTTCGTGGTCTACTTGTAGAAATATACTCTAATGTATTTTTTTTTTTCAATAAATTAATCTGGGACTAATCGTCAATGAGCCTGCA
|
@@ -0,0 +1,10 @@
|
|
1
|
+
>FX9YN3P05C1ZOQ
|
2
|
+
21 21 21 31 34 29 34 34 34 34 34 34 35 35 35 35 28 27 27 30 34 34 34 34 34 36 35 35 34 34 36 36 36 36 36 34 34 34 34 34 34 34 34 34 34 32 26 27 27 31 34 34 34 34 30 30 30 30 30 34 34 34 34 34 34 32 32 32 32 32 32 32 34 34 31 31 31 31 30 30 30 26 26 26 30 30 31 32 34 34 34 34 34 34 34 34 30 31 30 32 34 34 31 31 31 34 30 30 30 32 26 20 20 20 31 31 26 26 26 32 32 32 31 31 31 31 27 30 30 31 24 24 18 18 15 22 18 18 18 30 27 32 24 24 25 25 31 32 32 25 25 25 32 34 34 34 34 30 30 30 34 34 34 34 34 34 34 34 34 34 34 25 25 25 25 34 32 32 32 32 34 34 29 24 24 24 24 24 32 32 32 32 34 34 34 34 34 34 34 34 32 32 18 18 18 24 26 34 34 23 23 14 34 34 34 34 30 23 23 23
|
3
|
+
>FX9YN3P05C1QG2
|
4
|
+
37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 33 33 33
|
5
|
+
>FX9YN3P05C43XJ
|
6
|
+
36 36 36 36 36 36 36 36 39 39 39 40 39 40 40 40 40 40 39 39 39 40 40 40 40 40 40 40 40 38 38 38 40 40 40 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 31 21 21 21 21 31 31 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 35 35 35 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 31 31 31 35 36 36 36 36 36 31 31 31 35 35 35 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 35 35 35 36 36 36 36 36 36 36 36 36 36 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 33 33
|
7
|
+
>FX9YN3P05C9OK8_I_IZQ
|
8
|
+
35 35 35 35 35 35 35 35 40 40 40 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 39 39 40 39 38 38 38 40 40 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50
|
9
|
+
>FX9YN3P05C9OK8_I_DER
|
10
|
+
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 34 34 34 35 35 35 35 31 31 30 30 30 25 25 25 21 30 30 35 35 35 35 35 35 33 33 25 25 25 25 25 34 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 29 29 29 34 34 34 35 35 35 35 33 26 26 20 20 20 20 14 14 14 14 14 14 14 14 14 14 14 15 23 23 15 15 15 15 28 28 28 35 35 25 25 19 22 22 26 22 30 30 30 30 30 30 28 28 28 30 30 30 30 30 30 30 28 28 28 28
|
Binary file
|
Binary file
|
@@ -0,0 +1,86 @@
|
|
1
|
+
#include "libreria_gz.h"
|
2
|
+
#include <stdio.h>
|
3
|
+
#include <ctype.h>
|
4
|
+
|
5
|
+
|
6
|
+
/*******************************************************/
|
7
|
+
/* main */
|
8
|
+
/*******************************************************/
|
9
|
+
int main(int argc, char *argv[])
|
10
|
+
{
|
11
|
+
|
12
|
+
char *fasta=NULL;
|
13
|
+
char *qual=NULL;
|
14
|
+
char *extras=NULL;
|
15
|
+
int size=5000;
|
16
|
+
|
17
|
+
if (argc!=4)
|
18
|
+
{
|
19
|
+
printf("Usage %s fasta_file qual_file output_file\n\n",argv[0]);
|
20
|
+
exit(-1);
|
21
|
+
}
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
// prueba de lectura
|
26
|
+
printf ("Comienzo\n");
|
27
|
+
|
28
|
+
//int res=read_seq("data/F143CJN01.fbin","F143CJN01D96I9", &fasta, &qual, &extras);
|
29
|
+
//int res=read_seq("fasta_filt_w_dict.fbin","F143CJN01D96I9", &fasta, &qual, &extras);
|
30
|
+
|
31
|
+
// prueba de escritura
|
32
|
+
/*int res=write_seq("borrar","S143CJN01D96I9", "primero","QUANTAQUANTAQUANTAQUANTAQUANTA","");
|
33
|
+
res=write_seq("borrar","3CJN01D96I9", "el de enmedio","QUANTAQUANTAQUANTAQUANTAQUANTA","");
|
34
|
+
res=write_seq("borrar","3CJsdasdaN01D96I9", "ultimo","QUANTAQUANTAQUANTAQUANTAQUANTA","");
|
35
|
+
*/
|
36
|
+
//init_dicts(dict_fasta,dict_qual,32767);
|
37
|
+
//int res=process_biofile("data/F143CJN01.fasta","/tmp/prueba2gz.fbin");
|
38
|
+
int res=process_biofile(argv[1],argv[3]);
|
39
|
+
|
40
|
+
//res=read_seq("fasta_filt_w_dict.fbin","F143CJN01D96I9", &fasta, &qual, &extras);
|
41
|
+
/*
|
42
|
+
int res=read_seq("prueba2.fbin","F143CJN01DI5MZ", &fasta, &qual, &extras);
|
43
|
+
printf ("-------------------------------------------------------------\n");
|
44
|
+
printf ("RES of read_seq1 call is :%d\n",res);
|
45
|
+
if ( res==0 ) printf ("fasta:%s\n size:%d\n",fasta,sizeof(fasta));
|
46
|
+
if ( res==0 ) printf ("qual:%s\n",qual);
|
47
|
+
if (( res==0 )&& (extras!=NULL)) printf ("extras:%s\n",extras);
|
48
|
+
if ( fasta!=NULL ) {free(fasta);fasta=NULL;}
|
49
|
+
if ( qual!=NULL ) {free(qual);qual=NULL;}
|
50
|
+
if ( extras!=NULL ) {free(extras);extras=NULL;}
|
51
|
+
*/
|
52
|
+
//int res=read_seq("/tmp/prueba2gz.fbin","F143CJN01BO14N", &fasta, &qual, &extras);
|
53
|
+
//int res=read_seq("/tmp/prueba2gz.fbin","F143CJN01D2X26", &fasta, &qual, &extras);
|
54
|
+
//res=read_seq("prueba2gz.fbin","F143CJN01EBIJN", &fasta, &qual, &extras);
|
55
|
+
res=read_seq(argv[3],"F143CJN01DZW7L", &fasta, &qual, &extras);
|
56
|
+
//res=read_seq("prueba2gz.fbin","F143CJN01EN6AH", &fasta, &qual, &extras);
|
57
|
+
printf ("-------------------------------------------------------------\n");
|
58
|
+
printf ("RES of read_seq2 call is :%d\n",res);
|
59
|
+
if ( res==0 ) printf ("fasta:%s\n fasta size:%d\n",fasta,strlen(fasta));
|
60
|
+
if ( res==0 ) printf ("qual:%s\n",qual);
|
61
|
+
if (( res==0 )&& (extras!=NULL)) printf ("extras:%s\n",extras);
|
62
|
+
if ( fasta!=NULL ) {free(fasta);fasta=NULL;}
|
63
|
+
if ( qual!=NULL ) {free(qual);qual=NULL;}
|
64
|
+
if ( extras!=NULL ) {free(extras);extras=NULL;}
|
65
|
+
|
66
|
+
printf ("***************************\n");
|
67
|
+
printf ("Sequential reads\n");
|
68
|
+
|
69
|
+
initialize_sequential_reads(argv[3]);
|
70
|
+
char *sname=NULL;
|
71
|
+
while (read_data_sequential(&sname, &fasta, &qual, &extras)==0)
|
72
|
+
{
|
73
|
+
printf ("***************************\n");
|
74
|
+
printf ("RES of read_seq2 call is :%d, sname:%s\n",res,sname);
|
75
|
+
if ( res==0 ) printf ("fasta:%s fasta size:%d\n",fasta,strlen(fasta));
|
76
|
+
if ( res==0 ) printf ("qual:%s",qual);
|
77
|
+
if (( res==0 )&& (extras!=NULL)) printf ("extras:%s\n",extras);
|
78
|
+
if ( fasta!=NULL ) {free(fasta);fasta=NULL;}
|
79
|
+
if ( qual!=NULL ) {free(qual);qual=NULL;}
|
80
|
+
if ( extras!=NULL ) {free(extras);extras=NULL;}
|
81
|
+
}
|
82
|
+
close_sequential_reads();
|
83
|
+
|
84
|
+
return res;
|
85
|
+
}
|
86
|
+
|
@@ -0,0 +1,62 @@
|
|
1
|
+
|
2
|
+
Manual of the YAGFF (Yet Another Genetic File Format)
|
3
|
+
OGF (Optimized Genetic Format)
|
4
|
+
|
5
|
+
|
6
|
+
First a call to :
|
7
|
+
error=initialize_writes(outname,1);
|
8
|
+
|
9
|
+
Is needed to initialize the files.
|
10
|
+
|
11
|
+
Its arguments are:
|
12
|
+
|
13
|
+
- the name of the main output file and to this the suffix .index will be
|
14
|
+
appended for the index file.
|
15
|
+
|
16
|
+
- The mode of the write:
|
17
|
+
1 : create a new file
|
18
|
+
2 : append data to already existing files
|
19
|
+
|
20
|
+
It returns
|
21
|
+
0 if everything goes fine,
|
22
|
+
-1 if there is a problem with already existing files, like an incorrect
|
23
|
+
version number
|
24
|
+
-2 if there is a problem creating or opening files
|
25
|
+
|
26
|
+
In case of error it writes it on stderr
|
27
|
+
|
28
|
+
|
29
|
+
Then request to write can be done:
|
30
|
+
|
31
|
+
int error_wr=write_seq(sname, fasta,qual,extras);
|
32
|
+
|
33
|
+
Where sname is a char* with the name of the sequence, and fasta, qual and
|
34
|
+
extras are char* with the fasta, qual and extras data.
|
35
|
+
|
36
|
+
At the end a call to : closes_writes();
|
37
|
+
is needed to close the opened files
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
The reads are even easier:
|
42
|
+
|
43
|
+
int read_seq(char *filename, char *seq_name, char **fasta, char **qual, char **extras)
|
44
|
+
The arguments are:
|
45
|
+
filename: is a char* used as input the name of the main file, .index is appended for the index file
|
46
|
+
seq_name : char* that contains the name of the searched sequence
|
47
|
+
|
48
|
+
And the result are returned in :
|
49
|
+
fasta, qual and extras, if they point to NULL they are malloced to bufsize=150000 bytes (defined inside the function)
|
50
|
+
else they are used without checking its size
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
For doing sequential reads an untested procedure is implemented:
|
55
|
+
|
56
|
+
int initialize_sequential_reads(char *filename);
|
57
|
+
|
58
|
+
// return -9 on EOF
|
59
|
+
int read_data_sequential(char **seq_name, char **fasta, char **qual, char **extras)
|
60
|
+
int close_sequential_reads();
|
61
|
+
|
62
|
+
|