Skip to content

Commit 0d53df6

Browse files
committed
initial source version
0 parents  commit 0d53df6

93 files changed

Lines changed: 45510 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LICENSE

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
Artistic License 2.0
2+
3+
Preamble
4+
5+
This license establishes the terms under which a given free software
6+
Package may be copied, modified, distributed, and/or redistributed. The
7+
intent is that the Copyright Holder maintains some artistic control over
8+
the development of that Package while still keeping the Package
9+
available as open source and free software.
10+
11+
You are always permitted to make arrangements wholly outside of this
12+
license directly with the Copyright Holder of a given Package. If the
13+
terms of this license do not permit the full use that you propose to
14+
make of the Package, you should contact the Copyright Holder and seek a
15+
different licensing arrangement. Definitions
16+
17+
"Copyright Holder" means the individual(s) or organization(s) named in
18+
the copyright notice for the entire Package.
19+
20+
"Contributor" means any party that has contributed code or other
21+
material to the Package, in accordance with the Copyright Holder's
22+
procedures.
23+
24+
"You" and "your" means any person who would like to copy, distribute, or
25+
modify the Package.
26+
27+
"Package" means the collection of files distributed by the Copyright
28+
Holder, and derivatives of that collection and/or of those files. A
29+
given Package may consist of either the Standard Version, or a Modified
30+
Version.
31+
32+
"Distribute" means providing a copy of the Package or making it
33+
accessible to anyone else, or in the case of a company or organization,
34+
to others outside of your company or organization.
35+
36+
"Distributor Fee" means any fee that you charge for Distributing this
37+
Package or providing support for this Package to another party. It does
38+
not mean licensing fees.
39+
40+
"Standard Version" refers to the Package if it has not been modified, or
41+
has been modified only in ways explicitly requested by the Copyright
42+
Holder.
43+
44+
"Modified Version" means the Package, if it has been changed, and such
45+
changes were not explicitly requested by the Copyright Holder.
46+
47+
"Original License" means this Artistic License as Distributed with the
48+
Standard Version of the Package, in its current version or as it may be
49+
modified by The Perl Foundation in the future.
50+
51+
"Source" form means the source code, documentation source, and
52+
configuration files for the Package.
53+
54+
"Compiled" form means the compiled bytecode, object code, binary, or any
55+
other form resulting from mechanical transformation or translation of
56+
the Source form. Permission for Use and Modification Without
57+
Distribution
58+
59+
(1) You are permitted to use the Standard Version and create and use
60+
Modified Versions for any purpose without restriction, provided that you
61+
do not Distribute the Modified Version. Permissions for Redistribution
62+
of the Standard Version
63+
64+
(2) You may Distribute verbatim copies of the Source form of the
65+
Standard Version of this Package in any medium without restriction,
66+
either gratis or for a Distributor Fee, provided that you duplicate all
67+
of the original copyright notices and associated disclaimers. At your
68+
discretion, such verbatim copies may or may not include a Compiled form
69+
of the Package.
70+
71+
(3) You may apply any bug fixes, portability changes, and other
72+
modifications made available from the Copyright Holder. The resulting
73+
Package will still be considered the Standard Version, and as such will
74+
be subject to the Original License. Distribution of Modified Versions of
75+
the Package as Source
76+
77+
(4) You may Distribute your Modified Version as Source (either gratis or
78+
for a Distributor Fee, and with or without a Compiled form of the
79+
Modified Version) provided that you clearly document how it differs from
80+
the Standard Version, including, but not limited to, documenting any
81+
non-standard features, executables, or modules, and provided that you do
82+
at least ONE of the following:
83+
84+
(a) make the Modified Version available to the Copyright Holder of the
85+
Standard Version, under the Original License, so that the Copyright
86+
Holder may include your modifications in the Standard Version. (b)
87+
ensure that installation of your Modified Version does not prevent the
88+
user installing or running the Standard Version. In addition, the
89+
Modified Version must bear a name that is different from the name of the
90+
Standard Version. (c) allow anyone who receives a copy of the Modified
91+
Version to make the Source form of the Modified Version available to
92+
others under (i) the Original License or (ii) a license that permits the
93+
licensee to freely copy, modify and redistribute the Modified Version
94+
using the same licensing terms that apply to the copy that the licensee
95+
received, and requires that the Source form of the Modified Version, and
96+
of any works derived from it, be made freely available in that license
97+
fees are prohibited but Distributor Fees are allowed. Distribution of
98+
Compiled Forms of the Standard Version or Modified Versions without the
99+
Source
100+
101+
(5) You may Distribute Compiled forms of the Standard Version without
102+
the Source, provided that you include complete instructions on how to
103+
get the Source of the Standard Version. Such instructions must be valid
104+
at the time of your distribution. If these instructions, at any time
105+
while you are carrying out such distribution, become invalid, you must
106+
provide new instructions on demand or cease further distribution. If you
107+
provide valid instructions or cease distribution within thirty days
108+
after you become aware that the instructions are invalid, then you do
109+
not forfeit any of your rights under this license.
110+
111+
(6) You may Distribute a Modified Version in Compiled form without the
112+
Source, provided that you comply with Section 4 with respect to the
113+
Source of the Modified Version. Aggregating or Linking the Package
114+
115+
(7) You may aggregate the Package (either the Standard Version or
116+
Modified Version) with other packages and Distribute the resulting
117+
aggregation provided that you do not charge a licensing fee for the
118+
Package. Distributor Fees are permitted, and licensing fees for other
119+
components in the aggregation are permitted. The terms of this license
120+
apply to the use and Distribution of the Standard or Modified Versions
121+
as included in the aggregation.
122+
123+
(8) You are permitted to link Modified and Standard Versions with other
124+
works, to embed the Package in a larger work of your own, or to build
125+
stand-alone binary or bytecode versions of applications that include the
126+
Package, and Distribute the result without restriction, provided the
127+
result does not expose a direct interface to the Package. Items That are
128+
Not Considered Part of a Modified Version
129+
130+
(9) Works (including, but not limited to, modules and scripts) that
131+
merely extend or make use of the Package, do not, by themselves, cause
132+
the Package to be a Modified Version. In addition, such works are not
133+
considered parts of the Package itself, and are not subject to the terms
134+
of this license. General Provisions
135+
136+
(10) Any use, modification, and distribution of the Standard or Modified
137+
Versions is governed by this Artistic License. By using, modifying or
138+
distributing the Package, you accept this license. Do not use, modify,
139+
or distribute the Package, if you do not accept this license.
140+
141+
(11) If your Modified Version has been derived from a Modified Version
142+
made by someone other than you, you are nevertheless required to ensure
143+
that your Modified Version complies with the requirements of this
144+
license.
145+
146+
(12) This license does not grant you the right to use any trademark,
147+
service mark, tradename, or logo of the Copyright Holder.
148+
149+
(13) This license includes the non-exclusive, worldwide, free-of-charge
150+
patent license to make, have made, use, offer to sell, sell, import and
151+
otherwise transfer the Package with respect to any patent claims
152+
licensable by the Copyright Holder that are necessarily infringed by the
153+
Package. If you institute patent litigation (including a cross-claim or
154+
counterclaim) against any party alleging that the Package constitutes
155+
direct or contributory patent infringement, then this Artistic License
156+
to you shall terminate on the date that such litigation is filed.
157+
158+
(14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT
159+
HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED
160+
WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
161+
PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT
162+
PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER
163+
OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
164+
CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
165+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Makefile

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
BAM := ./samtools-0.1.18
2+
#path to the directory where the samtools package was built (in place)
3+
#so libbam.a and *.h files MUST be in here
4+
5+
GDIR := ./gclib
6+
7+
SEARCHDIRS := -I. -I${GDIR} -I${BAM}
8+
9+
#SYSTYPE := $(shell uname)
10+
11+
CC := g++
12+
13+
14+
ifneq (,$(findstring nothreads,$(MAKECMDGOALS)))
15+
NOTHREADS=1
16+
endif
17+
18+
#detect MinGW (Windows environment)
19+
ifneq (,$(findstring mingw,$(shell ${CC} -dumpmachine)))
20+
WINDOWS=1
21+
endif
22+
23+
LFLAGS =
24+
# MinGW32 GCC 4.5 link problem fix
25+
#ifdef WINDOWS
26+
ifneq (,$(findstring 4.5.,$(shell g++ -dumpversion)))
27+
LFLAGS += -static-libstdc++ -static-libgcc
28+
endif
29+
#endif
30+
31+
# Misc. system commands
32+
ifdef WINDOWS
33+
RM = del /Q
34+
else
35+
RM = rm -f
36+
endif
37+
38+
# File endings
39+
ifdef WINDOWS
40+
EXE = .exe
41+
else
42+
EXE =
43+
endif
44+
45+
46+
BASEFLAGS := -Wall -Wextra ${SEARCHDIRS} $(MARCH) -D_FILE_OFFSET_BITS=64 \
47+
-D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-exceptions -fno-rtti
48+
49+
# C/C++ linker
50+
51+
LINKER := g++
52+
53+
LIBS := -lbam -lz
54+
55+
# Non-windows systems need pthread
56+
ifndef WINDOWS
57+
#ifndef NOTHREADS
58+
# unfortunately the new samtools requires pthread anyway
59+
LIBS += -lpthread
60+
#endif
61+
endif
62+
63+
ifdef NOTHREADS
64+
BASEFLAGS += -DNOTHREADS
65+
endif
66+
67+
###----- generic build rule
68+
69+
ifneq (,$(findstring release,$(MAKECMDGOALS)))
70+
CFLAGS := -O2 -DNDEBUG -g $(BASEFLAGS)
71+
LDFLAGS := -g -L${BAM} ${LFLAGS}
72+
else
73+
CFLAGS := -g -DDEBUG -D_DEBUG -DGDEBUG $(BASEFLAGS)
74+
LDFLAGS := -g -L${BAM}
75+
GDEBUG = 1
76+
endif
77+
78+
%.o : %.cpp
79+
${CC} ${CFLAGS} -c $< -o $@
80+
81+
OBJS := ${GDIR}/GBase.o ${GDIR}/GArgs.o ${GDIR}/GStr.o ${GDIR}/GBam.o \
82+
${GDIR}/gdna.o ${GDIR}/codons.o ${GDIR}/GFaSeqGet.o ${GDIR}/gff.o
83+
84+
ifndef NOTHREADS
85+
OBJS += ${GDIR}/GThreads.o
86+
endif
87+
88+
ifdef GDEBUG
89+
OBJS += ${GDIR}/proc_mem.o
90+
endif
91+
92+
OBJS += rlink.o
93+
94+
.PHONY : all debug clean release nothreads
95+
all: stringtie
96+
release: stringtie
97+
debug: stringtie
98+
nothreads: stringtie
99+
100+
${GDIR}/GBam.o : $(GDIR)/GBam.h
101+
stringtie.o : $(GDIR)/GBitVec.h $(GDIR)/GHash.hh $(GDIR)/GBam.h
102+
rlink.o : rlink.h $(GDIR)/GBam.h $(GDIR)/GBitVec.h
103+
${BAM}/libbam.a:
104+
cd ${BAM} && make lib
105+
stringtie: ${BAM}/libbam.a $(OBJS) stringtie.o
106+
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
107+
108+
# target for removing all object files
109+
110+
clean:
111+
cd ${BAM} && make clean
112+
@${RM} stringtie stringtie.o* stringtie.exe $(OBJS)
113+
@${RM} core.*
114+
115+

0 commit comments

Comments
 (0)