Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
319b456e5c
!19 [sync] PR-18: fix build error, because of remove libbam.a after samtools upgrade
From: @openeuler-sync-bot 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
2024-04-17 09:50:05 +00:00
zhangxianting
28193db469 fix build error, because of remove libbam.a after samtools upgrade
(cherry picked from commit ad11b6f2f7cb88d31cae07408bcebe024d21eef0)
2024-04-17 16:48:38 +08:00
openeuler-ci-bot
6d28c5027b
!17 【轻量级PR】添加yaml文件
From: @kkzhs_admin 
Reviewed-by: @reganhe_xx 
Signed-off-by: @reganhe_xx
2022-05-16 09:51:49 +00:00
kkz
7a019ca045 Add yaml file 2022-05-05 15:01:50 +08:00
openeuler-ci-bot
255787744f
!15 [sync] PR-14: fix build issue
From: @openeuler-sync-bot 
Reviewed-by: @reganhe_xx 
Signed-off-by: @reganhe_xx
2022-02-14 06:40:46 +00:00
herengui
6964a838c3 rebuild for htslib version updated
Signed-off-by: herengui <herengui@uniontech.com>
(cherry picked from commit c505905732ceb74bd6a0264e6c372d8811cf81ed)
2022-02-11 09:32:13 +08:00
openeuler-ci-bot
69b850b1cb !2 Fix FTBFS with GCC 10
From: @wang_yue111
Reviewed-by: @reganhe_xx
Signed-off-by: @reganhe_xx
2021-08-09 06:55:25 +00:00
wang_yue111
858812fb26 Fix FTBFS with GCC 10 2021-08-07 16:18:59 +08:00
openeuler-ci-bot
17fe49377e !1 package init
From: @reganhe_xx
Reviewed-by: @zhouzhongyuan1
Signed-off-by: @zhouzhongyuan1
2021-03-31 09:49:47 +08:00
He Rengui
3f22db1fe6 init 2021-03-31 08:53:30 +08:00
15 changed files with 1740 additions and 0 deletions

65
0001-fix_spelling.patch Normal file
View File

@ -0,0 +1,65 @@
diff --git a/src/abundances.cpp b/src/abundances.cpp
index 2c386d4..c95c2ca 100644
--- a/src/abundances.cpp
+++ b/src/abundances.cpp
@@ -3132,7 +3132,7 @@ bool AbundanceGroup::calculate_gammas(const vector<MateHit>& nr_alignments,
vector<double> gammas;
- verbose_msg( "Calculating intial MLE\n");
+ verbose_msg( "Calculating initial MLE\n");
AbundanceStatus mle_success = gamma_mle(mapped_transcripts,
nr_alignments,
diff --git a/src/locfit/arith.c b/src/locfit/arith.c
index 536a78c..2a6c66c 100644
--- a/src/locfit/arith.c
+++ b/src/locfit/arith.c
@@ -410,7 +410,7 @@ double (*f)();
INT i;
if (l==NULL)
{
- ERROR(("vvec1 recieved NULL variable\n"));
+ ERROR(("vvec1 received NULL variable\n"));
return NULL;
}
v = createvar("_vvec1",STHIDDEN,l->n,VDOUBLE);
diff --git a/src/locfit/cmd.c b/src/locfit/cmd.c
index ec19da6..3f36703 100644
--- a/src/locfit/cmd.c
+++ b/src/locfit/cmd.c
@@ -593,7 +593,7 @@ vari *v;
vari *vd;
if (argarg(v,0)==NULL)
- { ERROR(("Unnamed Defintion"));
+ { ERROR(("Unnamed Definition"));
return;
}
n = vlength(v)-1;
diff --git a/src/locfit/lfd.c b/src/locfit/lfd.c
index 4a6b74b..912670a 100644
--- a/src/locfit/lfd.c
+++ b/src/locfit/lfd.c
@@ -78,7 +78,7 @@ INT fp;
}
}
if (access("LFData",W_OK)==-1)
- { ERROR(("LFData directory not writeable"));
+ { ERROR(("LFData directory not writable"));
return(0);
}
}
diff --git a/src/locfit/pout.c b/src/locfit/pout.c
index 04eab50..bd52de3 100644
--- a/src/locfit/pout.c
+++ b/src/locfit/pout.c
@@ -537,7 +537,7 @@ INT wn, w, h, rd;
points3d(xyz,theta,phi,dev,'q');
break;
case 's':
- if (i==0) { ERROR(("invalid segements")); }
+ if (i==0) { ERROR(("invalid segments")); }
else
segments(viptr(pl->xyzs,i-1),xyz,theta,phi,dev);
break;

View File

@ -0,0 +1,65 @@
diff --git a/ax_check_eigen.m4 b/ax_check_eigen.m4
index 02234d8..a7d070a 100644
--- a/ax_check_eigen.m4
+++ b/ax_check_eigen.m4
@@ -66,7 +66,7 @@ export EIGEN_CPPFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-@%:@include <Eigen/Dense>
+@%:@include <eigen3/Eigen/Dense>
]], [[
]])],[
AC_MSG_RESULT(yes)
diff --git a/src/abundances.cpp b/src/abundances.cpp
index c95c2ca..cb8073f 100644
--- a/src/abundances.cpp
+++ b/src/abundances.cpp
@@ -50,7 +50,7 @@
#include "negative_binomial_distribution.h"
-#include <Eigen/Dense>
+#include <eigen3/Eigen/Dense>
//using Eigen::MatrixXd;
//#ifdef __USE_ISOC99
diff --git a/src/abundances.h b/src/abundances.h
index a3f8469..fd45821 100644
--- a/src/abundances.h
+++ b/src/abundances.h
@@ -18,7 +18,7 @@
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/vector.hpp>
-#include <Eigen/Dense>
+#include <eigen3/Eigen/Dense>
#include "hits.h"
#include "scaffolds.h"
diff --git a/src/jensen_shannon.h b/src/jensen_shannon.h
index 96d6132..038a88a 100644
--- a/src/jensen_shannon.h
+++ b/src/jensen_shannon.h
@@ -14,7 +14,7 @@
#include <boost/numeric/ublas/io.hpp>
#include <vector>
-#include <Eigen/Dense>
+#include <eigen3/Eigen/Dense>
namespace ublas = boost::numeric::ublas;
diff --git a/src/sampling.h b/src/sampling.h
index d430a34..368b9af 100644
--- a/src/sampling.h
+++ b/src/sampling.h
@@ -35,7 +35,7 @@
#include <boost/random/variate_generator.hpp>
#include <boost/math/constants/constants.hpp>
-#include <Eigen/Dense>
+#include <eigen3/Eigen/Dense>
// Boost Cholesky factorizations in the spirit of lu.hpp
// Written by Robbie Vogt, found at:

View File

@ -0,0 +1,13 @@
diff --git a/src/biascorrection.h b/src/biascorrection.h
index 962426d..c332667 100644
--- a/src/biascorrection.h
+++ b/src/biascorrection.h
@@ -15,7 +15,7 @@
#include <vector>
#include <list>
#include <string>
-#include <boost/tr1/unordered_map.hpp>
+#include <boost/unordered_map.hpp>
#include <boost/thread.hpp>
#include "common.h"

View File

@ -0,0 +1,16 @@
diff --git a/src/lemon/error.h b/src/lemon/error.h
index 01931d8..ffcd46c 100644
--- a/src/lemon/error.h
+++ b/src/lemon/error.h
@@ -67,9 +67,9 @@ namespace lemon {
}
ExceptionMember& operator=(const ExceptionMember& copy) {
- if (ptr.get() == 0) return;
+ if (ptr.get() == 0) return *this;
try {
- if (!copy.valid()) return;
+ if (!copy.valid()) return *this;
*ptr = copy.get();
} catch (...) {}
}

View File

@ -0,0 +1,265 @@
diff --git a/src/GHash.hh b/src/GHash.hh
index 5122e1d..df613d0 100644
--- a/src/GHash.hh
+++ b/src/GHash.hh
@@ -88,7 +88,7 @@ public:
//nextkey is SET to the corresponding key
GHashEntry* NextEntry() { //returns a pointer to a GHashEntry
register int pos=fCurrentEntry;
- while (pos<fCapacity && hash[pos].hash<0) pos++;
+ while (pos<fCapacity && (hash[pos].hash)<0) pos++;
if (pos==fCapacity) {
fCurrentEntry=fCapacity;
return NULL;
@@ -146,7 +146,7 @@ template <class OBJ> GHash<OBJ>::GHash(GFreeProc* freeProc) {
fFreeProc=freeProc;
lastkeyptr=NULL;
for (uint i=0; i<DEF_HASH_SIZE; i++)
- hash[i].hash=-1; //this will be an indicator for 'empty' entries
+ (hash[i].hash)=-1; //this will be an indicator for 'empty' entries
fCapacity=DEF_HASH_SIZE;
fCount=0;
}
@@ -157,7 +157,7 @@ template <class OBJ> GHash<OBJ>::GHash(bool doFree) {
lastkeyptr=NULL;
fFreeProc = (doFree)?&DefaultFreeProc : NULL;
for (uint i=0; i<DEF_HASH_SIZE; i++)
- hash[i].hash=-1; //this will be an indicator for 'empty' entries
+ (hash[i].hash)=-1; //this will be an indicator for 'empty' entries
fCapacity=DEF_HASH_SIZE;
fCount=0;
}
@@ -177,16 +177,16 @@ template <class OBJ> void GHash<OBJ>::Resize(int m){
if(n!=fCapacity){
GASSERT(m<=n);
GMALLOC(k, sizeof(GHashEntry)*n);
- for(i=0; i<n; i++) k[i].hash=-1;
+ for(i=0; i<n; i++) (k[i].hash)=-1;
for(i=0; i<fCapacity; i++){
- h=hash[i].hash;
+ h=(hash[i].hash);
if(0<=h){
p=HASH1(h,n);
GASSERT(0<=p && p<n);
x=HASH2(h,n);
GASSERT(1<=x && x<n);
- while(k[p].hash!=-1) p=(p+x)%n;
- GASSERT(k[p].hash<0);
+ while((k[p].hash)!=-1) p=(p+x)%n;
+ GASSERT((k[p].hash)<0);
k[p]=hash[i];
}
}
@@ -210,9 +210,9 @@ template <class OBJ> const OBJ* GHash<OBJ>::Add(const char* ky,
GASSERT(1<=x && x<fCapacity);
i=-1;
n=fCapacity;
- while(n && hash[p].hash!=-1){
- if ((i==-1)&&(hash[p].hash==-2)) i=p;
- if (hash[p].hash==h && strcmp(hash[p].key,ky)==0) {
+ while(n && (hash[p].hash)!=-1){
+ if ((i==-1)&&((hash[p].hash)==-2)) i=p;
+ if ((hash[p].hash)==h && strcmp(hash[p].key,ky)==0) {
//replace hash data for this key!
lastkeyptr=hash[p].key;
hash[p].data = (void*) pdata;
@@ -225,8 +225,8 @@ template <class OBJ> const OBJ* GHash<OBJ>::Add(const char* ky,
GTRACE(("GHash::insert: key=\"%s\"\n",ky));
//GMessage("GHash::insert: key=\"%s\"\n",ky);
GASSERT(0<=i && i<fCapacity);
- GASSERT(hash[i].hash<0);
- hash[i].hash=h;
+ GASSERT((hash[i].hash)<0);
+ (hash[i].hash)=h;
hash[i].mark=mrk;
hash[i].key=Gstrdup(ky);
hash[i].keyalloc=true;
@@ -251,9 +251,9 @@ template <class OBJ> const OBJ* GHash<OBJ>::shkAdd(const char* ky,
GASSERT(1<=x && x<fCapacity);
i=-1;
n=fCapacity;
- while(n && hash[p].hash!=-1){
- if((i==-1)&&(hash[p].hash==-2)) i=p;
- if(hash[p].hash==h && strcmp(hash[p].key,ky)==0){
+ while(n && (hash[p].hash)!=-1){
+ if((i==-1)&&((hash[p].hash)==-2)) i=p;
+ if((hash[p].hash)==h && strcmp(hash[p].key,ky)==0){
//replace hash data for this key!
lastkeyptr=hash[p].key;
hash[p].data = (void*) pdata;
@@ -266,8 +266,8 @@ template <class OBJ> const OBJ* GHash<OBJ>::shkAdd(const char* ky,
GTRACE(("GHash::insert: key=\"%s\"\n",ky));
//GMessage("GHash::insert: key=\"%s\"\n",ky);
GASSERT(0<=i && i<fCapacity);
- GASSERT(hash[i].hash<0);
- hash[i].hash=h;
+ GASSERT((hash[i].hash)<0);
+ (hash[i].hash)=h;
hash[i].mark=mrk;
hash[i].key=(char *)ky;
lastkeyptr=hash[i].key;
@@ -293,9 +293,9 @@ template <class OBJ> OBJ* GHash<OBJ>::Replace(const char* ky,const OBJ* pdata,
GASSERT(1<=x && x<fCapacity);
i=-1;
n=fCapacity;
- while(n && hash[p].hash!=-1){
- if((i==-1)&&(hash[p].hash==-2)) i=p;
- if(hash[p].hash==h && strcmp(hash[p].key,ky)==0){
+ while(n && (hash[p].hash)!=-1){
+ if((i==-1)&&((hash[p].hash)==-2)) i=p;
+ if((hash[p].hash)==h && strcmp(hash[p].key,ky)==0){
if(hash[p].mark<=mrk){
GTRACE(("GHash::replace: %08x: replacing: \"%s\"\n",this,ky));
if (FREEDATA) (*fFreeProc)(hash[p].data);
@@ -310,8 +310,8 @@ template <class OBJ> OBJ* GHash<OBJ>::Replace(const char* ky,const OBJ* pdata,
if(i==-1) i=p;
GTRACE(("GHash::replace: %08x: inserting: \"%s\"\n",this,ky));
GASSERT(0<=i && i<fCapacity);
- GASSERT(hash[i].hash<0);
- hash[i].hash=h;
+ GASSERT((hash[i].hash)<0);
+ (hash[i].hash)=h;
hash[i].mark=mrk;
hash[i].key=Gstrdup(ky);
hash[i].data=pdata;
@@ -335,10 +335,10 @@ template <class OBJ> OBJ* GHash<OBJ>::Remove(const char* ky){
GASSERT(1<=x && x<fCapacity);
GASSERT(fCount<fCapacity);
n=fCapacity;
- while(n && hash[p].hash!=-1){
- if(hash[p].hash==h && strcmp(hash[p].key,ky)==0){
+ while(n && (hash[p].hash)!=-1){
+ if((hash[p].hash)==h && strcmp(hash[p].key,ky)==0){
GTRACE(("GHash::remove: %08x removing: \"%s\"\n",this,ky));
- hash[p].hash=-2;
+ (hash[p].hash)=-2;
hash[p].mark=false;
if (hash[p].keyalloc) GFREE((hash[p].key));
if (FREEDATA) (*fFreeProc)(hash[p].data);
@@ -370,8 +370,8 @@ template <class OBJ> bool GHash<OBJ>::hasKey(const char* ky) {
GASSERT(1<=x && x<fCapacity);
GASSERT(fCount<fCapacity);
n=fCapacity;
- while(n && hash[p].hash!=-1){
- if(hash[p].hash==h && strcmp(hash[p].key,ky)==0){
+ while(n && (hash[p].hash)!=-1){
+ if((hash[p].hash)==h && strcmp(hash[p].key,ky)==0){
return true;
}
p=(p+x)%fCapacity;
@@ -393,8 +393,8 @@ template <class OBJ> OBJ* GHash<OBJ>::Find(const char* ky, char** keyptr){
GASSERT(1<=x && x<fCapacity);
GASSERT(fCount<fCapacity);
n=fCapacity;
- while(n && hash[p].hash!=-1){
- if(hash[p].hash==h && strcmp(hash[p].key,ky)==0){
+ while(n && (hash[p].hash)!=-1){
+ if((hash[p].hash)==h && strcmp(hash[p].key,ky)==0){
if (keyptr!=NULL) *keyptr = hash[p].key;
return (OBJ*)hash[p].data;
}
@@ -412,7 +412,7 @@ template <class OBJ> void GHash<OBJ>::startIterate() {// initialize a key iterat
template <class OBJ> char* GHash<OBJ>::NextKey() {
register int pos=fCurrentEntry;
- while (pos<fCapacity && hash[pos].hash<0) pos++;
+ while (pos<fCapacity && (hash[pos].hash)<0) pos++;
if (pos==fCapacity) {
fCurrentEntry=fCapacity;
return NULL;
@@ -425,7 +425,7 @@ template <class OBJ> char* GHash<OBJ>::NextKey() {
template <class OBJ> OBJ* GHash<OBJ>::NextData() {
register int pos=fCurrentEntry;
- while (pos<fCapacity && hash[pos].hash<0) pos++;
+ while (pos<fCapacity && (hash[pos].hash)<0) pos++;
if (pos==fCapacity) {
fCurrentEntry=fCapacity;
return NULL;
@@ -439,7 +439,7 @@ template <class OBJ> OBJ* GHash<OBJ>::NextData() {
template <class OBJ> OBJ* GHash<OBJ>::NextData(char* &nextkey) {
register int pos=fCurrentEntry;
- while (pos<fCapacity && hash[pos].hash<0) pos++;
+ while (pos<fCapacity && (hash[pos].hash)<0) pos++;
if (pos==fCapacity) {
fCurrentEntry=fCapacity;
nextkey=NULL;
@@ -457,8 +457,8 @@ template <class OBJ> OBJ* GHash<OBJ>::NextData(char* &nextkey) {
// Get first non-empty entry
template <class OBJ> int GHash<OBJ>::First() const {
register int pos=0;
- while(pos<fCapacity){ if(0<=hash[pos].hash) break; pos++; }
- GASSERT(fCapacity<=pos || 0<=hash[pos].hash);
+ while(pos<fCapacity){ if(0<=(hash[pos].hash)) break; pos++; }
+ GASSERT(fCapacity<=pos || 0<=(hash[pos].hash));
return pos;
}
@@ -474,8 +474,8 @@ template <class OBJ> int GHash<OBJ>::Last() const {
// Find next valid entry
template <class OBJ> int GHash<OBJ>::Next(int pos) const {
GASSERT(0<=pos && pos<fCapacity);
- while(++pos <= fCapacity-1){ if(0<=hash[pos].hash) break; }
- GASSERT(fCapacity<=pos || 0<=hash[pos].hash);
+ while(++pos <= fCapacity-1){ if(0<=(hash[pos].hash)) break; }
+ GASSERT(fCapacity<=pos || 0<=(hash[pos].hash));
return pos;
}
@@ -483,8 +483,8 @@ template <class OBJ> int GHash<OBJ>::Next(int pos) const {
// Find previous valid entry
template <class OBJ> int GHash<OBJ>::Prev(int pos) const {
GASSERT(0<=pos && pos<fCapacity);
- while(--pos >= 0){ if(0<=hash[pos].hash) break; }
- GASSERT(pos<0 || 0<=hash[pos].hash);
+ while(--pos >= 0){ if(0<=(hash[pos].hash)) break; }
+ GASSERT(pos<0 || 0<=(hash[pos].hash));
return pos;
}
@@ -493,7 +493,7 @@ template <class OBJ> int GHash<OBJ>::Prev(int pos) const {
template <class OBJ> void GHash<OBJ>::Clear(){
register int i;
for(i=0; i<fCapacity; i++){
- if(hash[i].hash>=0){
+ if((hash[i].hash)>=0){
if (hash[i].keyalloc) GFREE((hash[i].key));
if (FREEDATA)
(*fFreeProc)(hash[i].data);
@@ -503,7 +503,7 @@ template <class OBJ> void GHash<OBJ>::Clear(){
GMALLOC(hash, sizeof(GHashEntry)*DEF_HASH_SIZE);
//reinitialize it
for (i=0; i<DEF_HASH_SIZE; i++)
- hash[i].hash=-1; //this will be an indicator for 'empty' entries
+ (hash[i].hash)=-1; //this will be an indicator for 'empty' entries
fCapacity=DEF_HASH_SIZE;
fCount=0;
}
@@ -517,7 +517,7 @@ void GHash::Save(Stream& store) const {
store << fCount;
for(int i=0; i<fCapacity; i++){
store << hash[i].hash;
- if(hash[i].hash>=0){
+ if((hash[i].hash)>=0){
uint len=strlen(hash[i].key);
store << len;
store << hash[i].mark;
@@ -534,7 +534,7 @@ void GHash::Load(Stream& store){
store >> fCount;
for(int i=0; i<fCapacity; i++){
store >> hash[i].hash;
- if(hash[i].hash>=0){
+ if((hash[i].hash)>=0){
uint len;
store >> len;
store >> hash[i].mark;
@@ -550,7 +550,7 @@ void GHash::Load(Stream& store){
template <class OBJ> GHash<OBJ>::~GHash(){
register int i;
for(i=0; i<fCapacity; i++){
- if(hash[i].hash>=0){
+ if((hash[i].hash)>=0){
if (hash[i].keyalloc) GFREE((hash[i].key));
if (FREEDATA) (*fFreeProc)(hash[i].data);
}

View File

@ -0,0 +1,13 @@
diff --git a/src/locfit/makecmd.c b/src/locfit/makecmd.c
index 12ced82..c712843 100644
--- a/src/locfit/makecmd.c
+++ b/src/locfit/makecmd.c
@@ -200,7 +200,7 @@ char *cmdline;
/* vs is used to store the command line string. */
sprintf(vn,"=clstr%d",clcount);
vs = createvar(vn,STSYSTEM,1+strlen(cmdline),VCHAR);
- sprintf((char *)vdptr(vs),cmdline);
+ sprintf((char *)vdptr(vs),"%s",cmdline);
/* va is used to store pointers to the command line fields. */
sprintf(vn,"=cline%d",clcount);

399
0007-py2to3.patch Normal file
View File

@ -0,0 +1,399 @@
diff --git a/src/cuffmerge b/src/cuffmerge
index e12f232..452df65 100755
--- a/src/cuffmerge
+++ b/src/cuffmerge
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
"""
cuffmerge.py
@@ -6,6 +6,8 @@ cuffmerge.py
Created by Cole Trapnell on 2011-03-17.
Copyright (c) 2011 Cole Trapnell. All rights reserved.
"""
+from __future__ import print_function
+from __future__ import absolute_import
import sys
import getopt
@@ -17,6 +19,9 @@ import os
import tempfile
import warnings
import types
+from operator import itemgetter
+from tempfile import mktemp
+
help_message = '''
cuffmerge takes two or more Cufflinks GTF files and merges them into a
@@ -92,7 +97,7 @@ class TestParams:
"num-threads=",
"keep-tmp",
"min-isoform-fraction="])
- except getopt.error, msg:
+ except getopt.error as msg:
raise Usage(msg)
self.system_params.parse_options(opts)
@@ -104,7 +109,7 @@ class TestParams:
# option processing
for option, value in opts:
if option in ("-v", "--version"):
- print "merge_cuff_asms v%s" % (get_version())
+ print("merge_cuff_asms v%s" % (get_version()))
exit(0)
if option in ("-h", "--help"):
raise Usage(help_message)
@@ -128,17 +133,17 @@ def right_now():
def prepare_output_dir():
- print >> sys.stderr, "[%s] Preparing output location %s" % (right_now(), output_dir)
+ print("[%s] Preparing output location %s" % (right_now(), output_dir), file=sys.stderr)
if os.path.exists(output_dir):
pass
else:
os.makedirs(output_dir)
- #print >> sys.stderr, "Checking for %s", logging_dir
+ #print("Checking for %s", logging_dir, file=sys.stderr)
if os.path.exists(logging_dir):
pass
else:
- #print >> sys.stderr, "Creating %s", logging_dir
+ #print("Creating %s", logging_dir, file=sys.stderr)
os.makedirs(logging_dir)
if os.path.exists(tmp_dir):
@@ -158,7 +163,7 @@ def tmp_name(prefix):
pass
else:
os.mkdir(tmp_root)
- return tmp_root + prefix + os.tmpnam().split('/')[-1]
+ return tmp_root + prefix + mktemp().split(os.sep)[-1]
def cufflinks(out_dir,
sam_file,
@@ -168,9 +173,9 @@ def cufflinks(out_dir,
lsf=False,
curr_queue=None):
if gtf_file != None:
- print >> sys.stderr, "[%s] Quantitating transcripts" % (right_now())
+ print("[%s] Quantitating transcripts" % (right_now()), file=sys.stderr)
else:
- print >> sys.stderr, "[%s] Assembling transcripts" % (right_now())
+ print("[%s] Assembling transcripts" % (right_now()), file=sys.stderr)
cmd = ["cufflinks"]
@@ -191,20 +196,20 @@ def cufflinks(out_dir,
cmd.append(sam_file)
try:
- print >> run_log, " ".join(cmd)
+ print(" ".join(cmd), file=run_log)
ret = subprocess.call(cmd)
if ret != 0:
- print >> sys.stderr, fail_str, "Error: could not execute cufflinks"
+ print(fail_str, "Error: could not execute cufflinks", file=sys.stderr)
exit(1)
# cufflinks not found
- except OSError, o:
+ except OSError as o:
if o.errno == errno.ENOTDIR or o.errno == errno.ENOENT:
- print >> sys.stderr, fail_str, "Error: cufflinks not found on this system. Did you forget to include it in your PATH?"
+ print(fail_str, "Error: cufflinks not found on this system. Did you forget to include it in your PATH?", file=sys.stderr)
exit(1)
def cuffcompare(prefix, ref_gtf, fasta, cuff_gtf):
- print >> sys.stderr, "[%s] Comparing reference %s to assembly %s" % (right_now(), ref_gtf, cuff_gtf)
+ print("[%s] Comparing reference %s to assembly %s" % (right_now(), ref_gtf, cuff_gtf), file=sys.stderr)
cmd = ["cuffcompare"]
if prefix != None:
@@ -213,22 +218,22 @@ def cuffcompare(prefix, ref_gtf, fasta, cuff_gtf):
cmd.extend(["-r", ref_gtf])
if fasta != None:
cmd.extend(["-s", fasta])
- if type(cuff_gtf) == types.ListType:
+ if isinstance(cuff_gtf, list):
for g in cuff_gtf:
cmd.extend([g])
else:
cmd.extend([cuff_gtf])
try:
- print >> run_log, " ".join(cmd)
+ print(" ".join(cmd), file=run_log)
ret = subprocess.call(cmd)
if ret != 0:
- print >> sys.stderr, fail_str, "Error: could not execute cuffcompare"
+ print(fail_str, "Error: could not execute cuffcompare", file=sys.stderr)
exit(1)
# cuffcompare not found
- except OSError, o:
+ except OSError as o:
if o.errno == errno.ENOTDIR or o.errno == errno.ENOENT:
- print >> sys.stderr, fail_str, "Error: cuffcompare not found on this system. Did you forget to include it in your PATH?"
+ print(fail_str, "Error: cuffcompare not found on this system. Did you forget to include it in your PATH?", file=sys.stderr)
exit(1)
def gtf_to_sam(gtf_filename):
@@ -240,15 +245,15 @@ def gtf_to_sam(gtf_filename):
cmd.append(gtf_filename)
cmd.append(sam_out)
try:
- print >> run_log, " ".join(cmd)
+ print(" ".join(cmd), file=run_log)
ret = subprocess.call(cmd)
if ret != 0:
- print >> sys.stderr, fail_str, "Error: could not execute gtf_to_sam"
+ print(fail_str, "Error: could not execute gtf_to_sam", file=sys.stderr)
exit(1)
# gtf_to_sam not found
- except OSError, o:
+ except OSError as o:
if o.errno == errno.ENOTDIR or o.errno == errno.ENOENT:
- print >> sys.stderr, fail_str, "Error: gtf_to_sam not found on this system. Did you forget to include it in your PATH?"
+ print(fail_str, "Error: gtf_to_sam not found on this system. Did you forget to include it in your PATH?", file=sys.stderr)
exit(1)
return sam_out
@@ -268,9 +273,9 @@ def test_input_files(filename_list):
g = open(line,"r")
input_files.append(line)
- except OSError, o:
+ except OSError as o:
if o.errno == errno.ENOTDIR or o.errno == errno.ENOENT:
- print >> sys.stderr, fail_str, "Error: could not open %s" % line
+ print(fail_str, "Error: could not open %s" % line, file=sys.stderr)
OK = False
if not OK:
sys.exit(1)
@@ -279,16 +284,16 @@ def test_input_files(filename_list):
def convert_gtf_to_sam(gtf_filename_list):
"""This function takes a list of GTF files, converts them all to
temporary SAM files, and returns the list of temporary file names."""
- print >> sys.stderr, "[%s] Converting GTF files to SAM" % (right_now())
+ print("[%s] Converting GTF files to SAM" % (right_now()), file=sys.stderr)
OK = True
sam_input_filenames = []
for line in gtf_filename_list:
try:
sam_out = gtf_to_sam(line)
sam_input_filenames.append(sam_out)
- except OSError, o:
+ except OSError as o:
if o.errno == errno.ENOTDIR or o.errno == errno.ENOENT:
- print >> sys.stderr, fail_str, "Error: could not open %s" % line
+ print(fail_str, "Error: could not open %s" % line, file=sys.stderr)
OK = False
if not OK:
sys.exit(1)
@@ -299,12 +304,12 @@ def merge_sam_inputs(sam_input_list, header):
sorted_map = open(sorted_map_name, "w")
- #print header
+ #print(header)
# The header was built from a dict keyed by chrom, so
# the records will be lexicographically ordered and
# should match the BAM after the sort below.
- print >> sorted_map, header,
+ print(header, end=' ', file=sorted_map)
sorted_map.close()
sort_cmd =["sort",
@@ -315,48 +320,49 @@ def merge_sam_inputs(sam_input_list, header):
"--temporary-directory="+tmp_dir]
sort_cmd.extend(sam_input_list)
- print >> run_log, " ".join(sort_cmd), ">", sorted_map_name
+ print(" ".join(sort_cmd), ">", sorted_map_name, file=run_log)
subprocess.call(sort_cmd,
stdout=open(sorted_map_name, "a"))
return sorted_map_name
def compare_to_reference(meta_asm_gtf, ref_gtf, fasta):
- print >> sys.stderr, "[%s] Comparing against reference file %s" % (right_now(), ref_gtf)
+ global tmp_dir
+ print("[%s] Comparing against reference file %s" % (right_now(), ref_gtf), file=sys.stderr)
ref_str = ""
if ref_gtf != None:
ref_str = " -r %s " % ref_gtf
if fasta != None:
- comp_cmd = '''cuffcompare -o tmp_meta_asm -C -G %s -s %s %s''' % (ref_str, fasta, meta_asm_gtf)
+ comp_cmd = '''cuffcompare -o %s -C -G %s -s %s %s''' % (tmp_dir, ref_str, fasta, meta_asm_gtf)
else:
- comp_cmd = '''cuffcompare -o tmp_meta_asm -C -G %s %s''' % (ref_str, meta_asm_gtf)
+ comp_cmd = '''cuffcompare -o %s -C -G %s %s''' % (tmp_dir, ref_str, meta_asm_gtf)
#cmd = bsub_cmd(comp_cmd, "/gencode_cmp", True, job_mem=8)
cmd = comp_cmd
try:
- print >> run_log, cmd
+ print(cmd, file=run_log)
ret = subprocess.call(cmd,shell=True)
if ret != 0:
- print >> sys.stderr, fail_str, "Error: could not execute cuffcompare"
+ print(fail_str, "Error: could not execute cuffcompare", file=sys.stderr)
exit(1)
#tmap_out = meta_asm_gtf.split("/")[-1] + ".tmap"
tfpath, tfname = os.path.split(meta_asm_gtf)
if tfpath: tfpath+='/'
- tmap_out = tfpath+'tmp_meta_asm.'+tfname+".tmap"
+ tmap_out = tfpath+'.'+tfname+".tmap"
return tmap_out
# cuffcompare not found
- except OSError, o:
+ except OSError as o:
if o.errno == errno.ENOTDIR or o.errno == errno.ENOENT:
- print >> sys.stderr, fail_str, "Error: cuffcompare not found on this system. Did you forget to include it in your PATH?"
+ print(fail_str, "Error: cuffcompare not found on this system. Did you forget to include it in your PATH?", file=sys.stderr)
exit(1)
def select_gtf(gtf_in_filename, ids, gtf_out_filename):
f_gtf = open(gtf_in_filename)
- #print >> sys.stderr, "Select GTF: Ids are: "
- #print >> sys.stderr, ids
- #print >> sys.stderr, "reference gtf file name:"
- #print >> sys.stderr, gtf_in_filename
+ #print("Select GTF: Ids are: ", file=sys.stderr)
+ #print(ids, file=sys.stderr)
+ #print("reference gtf file name:", file=sys.stderr)
+ #print(gtf_in_filename, file=sys.stderr)
out_gtf = open(gtf_out_filename, "w")
for line in f_gtf:
line = line.strip()
@@ -370,13 +376,13 @@ def select_gtf(gtf_in_filename, ids, gtf_out_filename):
first_quote = col.find('"')
last_quote = col.find('"', first_quote + 1)
transcript = col[first_quote + 1:last_quote]
- #print >> sys.stderr, transcript
+ #print(transcript, file=sys.stderr)
if transcript in ids:
- print >> out_gtf, line
+ print(line, file=out_gtf)
def merge_gtfs(gtf_filenames, merged_gtf, ref_gtf=None):
- print >> sys.stderr, "[%s] Merging linc gtf files with cuffcompare" % (right_now())
+ print("[%s] Merging linc gtf files with cuffcompare" % (right_now()), file=sys.stderr)
cmd = ["cuffcompare"]
cmd.extend(["-o", merged_gtf])
@@ -388,24 +394,24 @@ def merge_gtfs(gtf_filenames, merged_gtf, ref_gtf=None):
#cmd = bsub_cmd(cmd, "/merge_gtf", True, job_mem=8)
try:
- print >> run_log, cmd
+ print(cmd, file=run_log)
ret = subprocess.call(cmd, shell=True)
if ret != 0:
- print >> sys.stderr, fail_str, "Error: could not execute cuffcompare"
+ print(fail_str, "Error: could not execute cuffcompare", file=sys.stderr)
exit(1)
return merged_gtf + ".combined.gtf"
# cuffcompare not found
- except OSError, o:
+ except OSError as o:
if o.errno == errno.ENOTDIR or o.errno == errno.ENOENT:
- print >> sys.stderr, fail_str, "Error: cuffcompare not found on this system. Did you forget to include it in your PATH?"
+ print(fail_str, "Error: cuffcompare not found on this system. Did you forget to include it in your PATH?", file=sys.stderr)
exit(1)
def compare_meta_asm_against_ref(ref_gtf, fasta_file, gtf_input_file, class_codes=["c", "i", "r", "p", "e"]):
- #print >> sys.stderr, "Cuffcmpare all assemblies GTFs"
+ #print("Cuffcmpare all assemblies GTFs", file=sys.stderr)
tmap = compare_to_reference(gtf_input_file, ref_gtf, fasta_file)
- #print >> sys.stderr, "Cuffcmpare all assemblies GTFs : filter %s" % ",".join(class_codes)
+ #print("Cuffcmpare all assemblies GTFs : filter %s" % ",".join(class_codes), file=sys.stderr)
selected_ids= set([])
f_tmap = open(tmap)
#out = open("tmp_meta_asm_selectedIds.txt", "w")
@@ -434,15 +440,10 @@ def compare_meta_asm_against_ref(ref_gtf, fasta_file, gtf_input_file, class_code
if os.path.exists(mtmap.split(".tmap")[0]+".refmap"):
os.remove(mtmap.split(".tmap")[0]+".refmap")
- shutil.move("tmp_meta_asm.combined.gtf", output_dir + "/merged.gtf")
+ global tmp_dir
+ shutil.move(tmp_dir+".combined.gtf", output_dir + "/merged.gtf")
# os.remove("tmp_meta_asm.combined.gtf")
- if os.path.exists("tmp_meta_asm.loci"):
- os.remove("tmp_meta_asm.loci")
- if os.path.exists("tmp_meta_asm.tracking"):
- os.remove("tmp_meta_asm.tracking")
- if os.path.exists("tmp_meta_asm.stats"):
- os.remove("tmp_meta_asm.stats")
if os.path.exists(tmap):
os.remove(tmap)
if os.path.exists(tmap.split(".tmap")[0]+".refmap"):
@@ -484,9 +485,8 @@ def get_gtf_chrom_info(gtf_filename, known_chrom_info=None):
def header_for_chrom_info(chrom_info):
header_strs = ["""@HD\tVN:1.0\tSO:coordinate"""]
- chrom_list = [(chrom, limits) for chrom, limits in chrom_info.iteritems()]
- chrom_list.sort(lambda x,y: cmp(x[0],y[0]))
- #print chrom_list
+ chrom_list = sorted(chrom_info.items(), key=itemgetter(0))
+ #print(chrom_list)
for chrom, limits in chrom_list:
line = "@SQ\tSN:%s\tLN:\t%d" % (chrom, limits[1])
header_strs.append(line)
@@ -510,29 +510,29 @@ def main(argv=None):
params.check()
if len(args) < 1:
- raise(Usage(help_message))
+ raise Usage(help_message)
global run_log
global run_cmd
- print >> sys.stderr
- print >> sys.stderr, "[%s] Beginning transcriptome assembly merge" % (right_now())
- print >> sys.stderr, "-------------------------------------------"
- print >> sys.stderr
+ print(file=sys.stderr)
+ print("[%s] Beginning transcriptome assembly merge" % (right_now()), file=sys.stderr)
+ print("-------------------------------------------", file=sys.stderr)
+ print(file=sys.stderr)
start_time = datetime.now()
prepare_output_dir()
run_log = open(logging_dir + "run.log", "w", 0)
run_cmd = " ".join(argv)
- print >> run_log, run_cmd
+ print(run_cmd, file=run_log)
transfrag_list_file = open(args[0], "r")
if params.ref_gtf != None:
test_input_files([params.ref_gtf])
else:
- print >> sys.stderr, "Warning: no reference GTF provided!"
+ print("Warning: no reference GTF provided!", file=sys.stderr)
# Check that all the primary assemblies are accessible before starting the time consuming stuff
gtf_input_files = test_input_files(transfrag_list_file)
@@ -571,8 +571,8 @@ def main(argv=None):
os.remove(output_dir + "/skipped.gtf")
os.remove(output_dir + "/genes.fpkm_tracking")
os.remove(output_dir + "/isoforms.fpkm_tracking")
- except Usage, err:
- print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg)
+ except Usage as err:
+ print(sys.argv[0].split("/")[-1] + ": " + str(err.msg), file=sys.stderr)
return 2

View File

@ -0,0 +1,46 @@
diff --git a/src/bundles.h b/src/bundles.h
index e7caf06..6fb8681 100644
--- a/src/bundles.h
+++ b/src/bundles.h
@@ -12,7 +12,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
#include <boost/random.hpp>
#include <vector>
#include <numeric>
diff --git a/src/cuffquant.cpp b/src/cuffquant.cpp
index 2634e98..5c5ffd2 100644
--- a/src/cuffquant.cpp
+++ b/src/cuffquant.cpp
@@ -43,6 +43,7 @@ vector<string> sample_labels;
using namespace std;
using namespace boost;
+using namespace boost::placeholders;
// We leave out the short codes for options that don't take an argument
#if ENABLE_THREADS
diff --git a/src/transitive_closure.h b/src/transitive_closure.h
index fc23976..d982396 100644
--- a/src/transitive_closure.h
+++ b/src/transitive_closure.h
@@ -27,7 +27,7 @@
#include <algorithm> // for std::min and std::max
#include <functional>
#include <boost/config.hpp>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
#include <boost/graph/vector_as_graph.hpp>
#include <boost/graph/strong_components.hpp>
#include <boost/graph/topological_sort.hpp>
@@ -35,6 +35,7 @@
#include <boost/graph/named_function_params.hpp>
using namespace boost;
+using namespace boost::placeholders;
typedef uint16_t v_id_size_type;

BIN
cufflinks-2.2.1.tar.gz Normal file

Binary file not shown.

78
cufflinks.spec Normal file
View File

@ -0,0 +1,78 @@
Name: cufflinks
Version: 2.2.1
Release: 4
Summary: Transcriptome assembly and differential expression analysis for RNA-Seq.
License: GPL-3.0-only and BSL-1.0
URL: http://cole-trapnell-lab.github.io/%{name}/
Source0: https://github.com/cole-trapnell-lab/%{name}/archive/refs/tags/%{name}-%{version}.tar.gz
Patch0: 0001-fix_spelling.patch
Patch1: 0002-fix_includes_path.patch
Patch2: 0003-fix_boost_tr1_path.patch
Patch3: 0004-return_with_novalue.patch
Patch4: 0005-fix_no_hash_member.patch
Patch5: 0006-format-security.patch
Patch6: 0007-py2to3.patch
Patch7: 0008-boost_bind_header.patch
Patch8: multiple-definition-linker-error.patch
Patch9: no_svnversion.patch
Patch10: hts-instead-of-bam-because-samtools-upgrade.patch
Patch11: fix-build-error-of-sam.h.patch
BuildRequires: boost boost-serialization boost-system boost-thread boost-devel samtools samtools-devel htslib htslib-devel
BuildRequires: gcc gcc-c++ gcc-gfortran make autoconf gmp mpfr openmpi java-1.8.0-openjdk-headless
BuildRequires: python3 ncurses-devel eigen3-devel xz-devel bzip2-devel zlib-devel automake
Recommends: gffread
%description
Cufflinks assembles transcripts, estimates their abundances, and tests for
differential expression and regulation in RNA-Seq samples. It accepts aligned
RNA-Seq reads and assembles the alignments into a parsimonious set of transcripts.
Cufflinks then estimates the relative abundances of these transcripts based on
how many reads support each one, taking into account biases in library
preparation protocols.
%prep
%autosetup -p1
%build
autoreconf --install >/dev/null 2>&1
if ! ./configure \
--prefix=%{_prefix} \
%ifarch aarch64
--build=arm \
%endif
--with-boost --with-eigen --with-hts \
LIBS="-lboost_system -lboost_thread -lboost_serialization" \
PYTHON="$(command -v python3)"; then
: cat log
cat config.log
fi
%make_build CXXFLAGS="-I/usr/include/eigen3 -lhts -L%{_libdir} -lpthread"
%install
%make_install
# skip gffread binary provided by gffread package
find %{buildroot}/%{_bindir}/ -type f -name gffread -delete
%files
%license LICENSE
%doc README AUTHORS doc
%{_bindir}/*
%changelog
* Wed Apr 10 2024 zhangxianting <zhangxianting@uniontech.com> - 2.2.1-4
- fix build error, because of remove libbam.a after samtools upgrade
* Thu Feb 10 2022 herengui <herengui@uniontech.com> - 2.2.1-3
- fix build issue.
* Sat Aug 07 2021 wangyue <wangyue92@huawei.com> - 2.2.1-2
- Fix FTBFS with GCC 10
* Wed Mar 24 2021 He Rengui <herengui@uniontech.com> - 2.2.1-1
- Package init

5
cufflinks.yaml Normal file
View File

@ -0,0 +1,5 @@
version_control: github
src_repo: cole-trapnell-lab/cufflinks
tag_prefix: ^
separator: .

View File

@ -0,0 +1,359 @@
From 9be41e572e5a983286c1520e713397dfa481df4f Mon Sep 17 00:00:00 2001
From: zhangxianting <zhangxianting@uniontech.com>
Date: Wed, 10 Apr 2024 14:38:30 +0800
Subject: [PATCH 2/2] fix build error of sam.h
error: reference to 'byte' is ambiguous
/usr/include/c++/12/cstddef:69:14: note: candidates are: 'enum class std::byte'
error: 'samread' was not declared in this scope; did you mean 'sam_read1'?
error: 'bam_header_t' was not declared in this scope; did you mean 'bam_hdr_t'?
error: 'bam1_qname' was not declared in this scope; did you mean 'basename'?
error: 'bam1_cigar' was not declared in this scope; did you mean 'bam_cigar_op'?
error: 'samopen' was not declared in this scope; did you mean 'sam_open'?
error: 'samclose' was not declared in this scope; did you mean 'sam_close'?
error: '_hit_file' was not declared in this scope; did you mean 'htsFile'?
src/GBase.h:
rename byte to gbase_byte
src/hits.cpp:
sam_read1 instead of samread
bam_hdr_t instead of bam_header_t
bam_get_qname instead of bam1_qname
bam_get_cigar instead of bam1_cigar
src/hits.h:
sam_open instead of samopen
sam_close instead of samclose
samFile instead of samfile_t
fp.bgzf instead of x.bam
---
src/GBase.h | 2 +-
src/codons.cpp | 8 ++++----
src/gdna.cpp | 12 ++++++------
src/gdna.h | 4 ++--
src/gff.cpp | 2 +-
src/gff.h | 11 +++++------
src/hits.cpp | 24 ++++++++++++------------
src/hits.h | 21 +++++++++++----------
8 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/src/GBase.h b/src/GBase.h
index fc3c5ba..1d31e9d 100644
--- a/src/GBase.h
+++ b/src/GBase.h
@@ -72,7 +72,7 @@ typedef int16_t int16;
typedef uint16_t uint16;
typedef unsigned char uchar;
-typedef unsigned char byte;
+typedef unsigned char gbase_byte;
#ifndef MAXUINT
#define MAXUINT ((unsigned int)-1)
diff --git a/src/codons.cpp b/src/codons.cpp
index a459250..4efe055 100644
--- a/src/codons.cpp
+++ b/src/codons.cpp
@@ -48,9 +48,9 @@ static bool isCodonTableReady=codonTableInit();
unsigned short packCodon(char n1, char n2, char n3) {
//assumes they are uppercase already!
- byte b1=n1-'A';
- byte b2=n2-'A';
- byte b3=n3-'A';
+ gbase_byte b1=n1-'A';
+ gbase_byte b2=n2-'A';
+ gbase_byte b3=n3-'A';
b1 |= (b2 << 5);
b2 = (b2 >> 3) | (b3 << 2);
return ( ((unsigned short)b2) << 8) + b1;
@@ -68,7 +68,7 @@ bool codonTableInit() {
char Codon::translate() {
- for (byte i=0;i<3;i++) nuc[i]=toupper(nuc[i]);
+ for (gbase_byte i=0;i<3;i++) nuc[i]=toupper(nuc[i]);
unsigned short aacode=packCodon(nuc[0], nuc[1], nuc[2]);
return codonTable[aacode];
}
diff --git a/src/gdna.cpp b/src/gdna.cpp
index 4d8a4b0..f7873be 100644
--- a/src/gdna.cpp
+++ b/src/gdna.cpp
@@ -11,8 +11,8 @@ const char* IUPAC_COMP ="TtGgAaCcAaKkYyWwSsRrMmBbDdHhVvNnXx-*";
#define G_2BIT 2 // 10
#define T_2BIT 3 // 11
-static byte ntCompTable[256];
-static byte nt2bit[256]; //maps any character to a 2bit base value (with N = A)
+static gbase_byte ntCompTable[256];
+static gbase_byte nt2bit[256]; //maps any character to a 2bit base value (with N = A)
static char v_2bit2nt[4] = {'A','C','G','T'};
//----------------------
@@ -21,9 +21,9 @@ static bool gdna_Ready=gDnaInit();
//----------------------
-byte gdna2bit(char* &nt, int n) {
-// Pack n bases into a byte (n can be 1..4)
-byte out = 0;
+gbase_byte gdna2bit(char* &nt, int n) {
+// Pack n bases into a gbase_byte (n can be 1..4)
+gbase_byte out = 0;
while (n && *nt) {
n--;
out <<= 2;
@@ -43,7 +43,7 @@ char ntComplement(char c) {
return ntCompTable[(int)c];
}
-char g2bit2base(byte v2bit) {
+char g2bit2base(gbase_byte v2bit) {
return v_2bit2nt[v2bit & 0x03 ];
}
diff --git a/src/gdna.h b/src/gdna.h
index 1f923ed..6871a34 100644
--- a/src/gdna.h
+++ b/src/gdna.h
@@ -9,7 +9,7 @@ char* reverseComplement(char* seq, int slen=0);
bool gDnaInit();
-byte gdna2bit(char* &nt, int n=4); //pack n bases into a byte (n can be 1..4)
-char g2bit2base(byte v2bit); //convert the 2-bit value into 'A', 'C', 'G' or 'T'
+gbase_byte gdna2bit(char* &nt, int n=4); //pack n bases into a gbase_byte (n can be 1..4)
+char g2bit2base(gbase_byte v2bit); //convert the 2-bit value into 'A', 'C', 'G' or 'T'
#endif
diff --git a/src/gff.cpp b/src/gff.cpp
index 17103ff..1b7fa5b 100644
--- a/src/gff.cpp
+++ b/src/gff.cpp
@@ -21,7 +21,7 @@ const uint gfo_flag_BY_EXON = 0x00000020; //created by subfeature (exon
const uint gfo_flag_DISCARDED = 0x00000100;
const uint gfo_flag_LST_KEEP = 0x00000200;
const uint gfo_flag_LEVEL_MSK = 0x00FF0000;
-const byte gfo_flagShift_LEVEL = 16;
+const gbase_byte gfo_flagShift_LEVEL = 16;
void gffnames_ref(GffNames* &n) {
if (n==NULL) n=new GffNames();
diff --git a/src/gff.h b/src/gff.h
index db2f87e..483b9d0 100644
--- a/src/gff.h
+++ b/src/gff.h
@@ -22,7 +22,6 @@ const byte exMskMinSpliceL = 0x04;
const byte exMskMinSpliceR = 0x08;
const byte exMskTag = 0x80;
*/
-
//reserved Gffnames::feats entries -- basic feature types
extern const int gff_fid_mRNA; // "mRNA" feature name
extern const int gff_fid_transcript; // *RNA, *transcript feature name
@@ -43,7 +42,7 @@ extern const uint gfo_flag_DISCARDED; //should not be printed under the "transcr
extern const uint gfo_flag_LST_KEEP; //GffObj from GffReader::gflst is to be kept (not deallocated)
//when GffReader is destroyed
extern const uint gfo_flag_LEVEL_MSK; //hierarchical level: 0 = no parent
-extern const byte gfo_flagShift_LEVEL;
+extern const gbase_byte gfo_flagShift_LEVEL;
extern bool gff_show_warnings;
@@ -502,18 +501,18 @@ public:
if (v) flags |= gfo_flag_CHILDREN_PROMOTED;
else flags &= ~gfo_flag_CHILDREN_PROMOTED;
}
- void setLevel(byte v) {
+ void setLevel(gbase_byte v) {
if (v==0) flags &= ~gfo_flag_LEVEL_MSK;
else flags &= ~(((uint)v) << gfo_flagShift_LEVEL);
}
- byte incLevel() {
+ gbase_byte incLevel() {
uint v=((flags & gfo_flag_LEVEL_MSK) >> gfo_flagShift_LEVEL);
v++;
flags &= ~(v << gfo_flagShift_LEVEL);
return v;
}
- byte getLevel() {
- return ((byte)((flags & gfo_flag_LEVEL_MSK) >> gfo_flagShift_LEVEL));
+ gbase_byte getLevel() {
+ return ((gbase_byte)((flags & gfo_flag_LEVEL_MSK) >> gfo_flagShift_LEVEL));
}
bool isValidTranscript() {
diff --git a/src/hits.cpp b/src/hits.cpp
index 4cac1f1..068bb67 100644
--- a/src/hits.cpp
+++ b/src/hits.cpp
@@ -398,7 +398,7 @@ bool BAMHitFactory::next_record(const char*& buf, size_t& buf_size)
memset(&_next_hit, 0, sizeof(_next_hit));
- int bytes_read = samread(_hit_file, &_next_hit);
+ int bytes_read = sam_read1(_hit_file, _hit_file->bam_header, &_next_hit);
if (bytes_read < 0)
{
_eof_encountered = true;
@@ -470,7 +470,7 @@ bool BAMHitFactory::get_hit_from_buf(const char* orig_bwt_buf,
if (sam_flag & 0x4 || target_id < 0)
{
//assert(cigar.size() == 1 && cigar[0].opcode == MATCH);
- bh = create_hit(bam1_qname(hit_buf),
+ bh = create_hit(bam_get_qname(hit_buf),
"*",
0, // SAM files are 1-indexed
0,
@@ -483,27 +483,27 @@ bool BAMHitFactory::get_hit_from_buf(const char* orig_bwt_buf,
sam_flag);
return true;
}
- if (target_id >= _hit_file->header->n_targets)
+ if (target_id >= _hit_file->bam_header->n_targets)
{
- fprintf (stderr, "BAM error: file contains hits to sequences not in header SQ records (%s)\n", bam1_qname(hit_buf));
+ fprintf (stderr, "BAM error: file contains hits to sequences not in header SQ records (%s)\n", bam_get_qname(hit_buf));
return false;
}
- string text_name = _hit_file->header->target_name[target_id];
+ string text_name = _hit_file->bam_header->target_name[target_id];
for (int i = 0; i < hit_buf->core.n_cigar; ++i)
{
//char* t;
- int length = bam1_cigar(hit_buf)[i] >> BAM_CIGAR_SHIFT;
+ int length = bam_get_cigar(hit_buf)[i] >> BAM_CIGAR_SHIFT;
if (length <= 0)
{
- fprintf (stderr, "BAM error: CIGAR op has zero length (%s)\n", bam1_qname(hit_buf));
+ fprintf (stderr, "BAM error: CIGAR op has zero length (%s)\n", bam_get_qname(hit_buf));
return false;
}
CigarOpCode opcode;
- switch(bam1_cigar(hit_buf)[i] & BAM_CIGAR_MASK)
+ switch(bam_get_cigar(hit_buf)[i] & BAM_CIGAR_MASK)
{
case BAM_CMATCH: opcode = MATCH; break;
case BAM_CINS: opcode = INS; break;
@@ -533,7 +533,7 @@ bool BAMHitFactory::get_hit_from_buf(const char* orig_bwt_buf,
{
if (mate_target_id == target_id)
{
- mrnm = _hit_file->header->target_name[mate_target_id];
+ mrnm = _hit_file->bam_header->target_name[mate_target_id];
// if (abs((int)text_mate_pos - (int)text_offset) > (int)max_intron_length)
// {
// //fprintf (stderr, "Mates are too distant, skipping\n");
@@ -593,7 +593,7 @@ bool BAMHitFactory::get_hit_from_buf(const char* orig_bwt_buf,
//assert(_rg_props.strandedness() == STRANDED_PROTOCOL || source_strand == CUFF_STRAND_UNKNOWN);
//assert(cigar.size() == 1 && cigar[0].opcode == MATCH);
- bh = create_hit(bam1_qname(hit_buf),
+ bh = create_hit(bam_get_qname(hit_buf),
text_name,
text_offset, // BAM files are 0-indexed
cigar,
@@ -614,7 +614,7 @@ bool BAMHitFactory::get_hit_from_buf(const char* orig_bwt_buf,
fprintf(stderr, "BAM record error: found spliced alignment without XS attribute\n");
}
- bh = create_hit(bam1_qname(hit_buf),
+ bh = create_hit(bam_get_qname(hit_buf),
text_name,
text_offset, // BAM files are 0-indexed
cigar,
@@ -739,7 +739,7 @@ static const unsigned MAX_HEADER_LEN = 64 * 1024 * 1024; // 4 MB
bool BAMHitFactory::inspect_header()
{
- bam_header_t* header = _hit_file->header;
+ bam_hdr_t* header = _hit_file->bam_header;
if (header == NULL)
{
diff --git a/src/hits.h b/src/hits.h
index 4072389..e63f9c1 100644
--- a/src/hits.h
+++ b/src/hits.h
@@ -18,7 +18,8 @@
#include <boost/shared_ptr.hpp>
-#include <bam/sam.h>
+#include <htslib/sam.h>
+#include <htslib/bgzf.h>
#include "common.h"
#include "multireads.h"
@@ -724,16 +725,16 @@ public:
RefSequenceTable& reference_table) :
HitFactory(insert_table, reference_table)
{
- _hit_file = samopen(hit_file_name.c_str(), "rb", 0);
+ _hit_file = sam_open(hit_file_name.c_str(), "rb");
memset(&_next_hit, 0, sizeof(_next_hit));
- if (_hit_file == NULL || _hit_file->header == NULL)
+ if (_hit_file == NULL || _hit_file->bam_header == NULL)
{
throw std::runtime_error("Fail to open BAM file");
}
- _beginning = bgzf_tell(_hit_file->x.bam);
+ _beginning = bgzf_tell(_hit_file->fp.bgzf);
_eof_encountered = false;
if (inspect_header() == false)
@@ -753,19 +754,19 @@ public:
{
if (_hit_file)
{
- samclose(_hit_file);
+ sam_close(_hit_file);
}
}
void mark_curr_pos()
{
- _curr_pos = bgzf_tell(_hit_file->x.bam);
+ _curr_pos = bgzf_tell(_hit_file->fp.bgzf);
}
void undo_hit()
{
- bgzf_seek(_hit_file->x.bam, _curr_pos, SEEK_SET);
+ bgzf_seek(_hit_file->fp.bgzf, _curr_pos, SEEK_SET);
//--_line_num;
}
@@ -776,9 +777,9 @@ public:
void reset()
{
- if (_hit_file && _hit_file->x.bam)
+ if (_hit_file && _hit_file->fp.bgzf)
{
- bgzf_seek(_hit_file->x.bam, _beginning, SEEK_SET);
+ bgzf_seek(_hit_file->fp.bgzf, _beginning, SEEK_SET);
_eof_encountered = false;
}
}
@@ -795,7 +796,7 @@ public:
bool inspect_header();
private:
- samfile_t* _hit_file;
+ samFile* _hit_file;
int64_t _curr_pos;
int64_t _beginning;
--
2.33.0

View File

@ -0,0 +1,360 @@
From d94b8582e580f7c110b64705b79aa6ae3748f0d1 Mon Sep 17 00:00:00 2001
From: zhangxianting <zhangxianting@uniontech.com>
Date: Wed, 10 Apr 2024 14:37:17 +0800
Subject: [PATCH 1/2] hts instead of bam , because samtools upgrade, remove /usr/lib64/libbam.a
copy ax_hts.m4, base ax_bam.m4
---
ax_hts.m4 | 203 ++++++++++++++++++++++++++++
configure.ac | 6 +-
cufflinks.xcodeproj/project.pbxproj | 2 +-
make_bin.sh | 8 +-
src/Makefile.am | 32 ++---
5 files changed, 227 insertions(+), 24 deletions(-)
create mode 100644 ax_hts.m4
diff --git a/ax_hts.m4 b/ax_hts.m4
new file mode 100644
index 0000000..b5f7e78
--- /dev/null
+++ b/ax_hts.m4
@@ -0,0 +1,203 @@
+# SYNOPSIS
+#
+# AX_HTS
+#
+# DESCRIPTION
+#
+# Test for the HTS libraries of a particular version (or newer)
+#
+# If no path to the installed hts library is given the macro searchs
+# under /usr, /usr/local, /opt and /opt/local and evaluates the
+# $HTS_ROOT environment variable.
+# Adapted from AX_BOOST_BASE
+#
+# This macro calls:
+#
+# AC_SUBST(HTS_CPPFLAGS) / AC_SUBST(HTS_LDFLAGS)
+#
+# And sets:
+#
+# HAVE_HTS
+#
+# LICENSE
+#
+# Copyright (c) 2010 Cole Trapnell <cole@cs.umd.edu>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+
+AC_DEFUN([AX_HTS],
+[
+AC_ARG_WITH([hts],
+ AS_HELP_STRING([--with-hts@<:@=DIR@:>@], [use HTS libraries (default is yes) - it is possible to specify the root directory for HTS (optional)]),
+ [
+ if test "$withval" = "no"; then
+ want_hts="no"
+ elif test "$withval" = "yes"; then
+ want_hts="yes"
+ ac_hts_path=""
+ else
+ want_hts="yes"
+ ac_hts_path="$withval"
+ fi
+ ],
+ [want_hts="yes"])
+
+
+AC_ARG_WITH([hts-libdir],
+ AS_HELP_STRING([--with-hts-libdir=LIB_DIR],
+ [Force given directory for hts libraries. Note that this will overwrite library path detection, so use this parameter only if default library detection fails and you know exactly where your hts libraries are located.]),
+ [
+ if test -d $withval
+ then
+ ac_hts_lib_path="$withval"
+ else
+ AC_MSG_ERROR(--with-hts-libdir expected directory name)
+ fi
+ ],
+ [ac_hts_lib_path=""]
+)
+
+if test "x$want_hts" = "xyes"; then
+# hts_lib_version_req=ifelse([$1], ,1.20.0,$1)
+# hts_lib_version_req_shorten=`expr $hts_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
+# hts_lib_version_req_major=`expr $hts_lib_version_req : '\([[0-9]]*\)'`
+# hts_lib_version_req_minor=`expr $hts_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
+# hts_lib_version_req_sub_minor=`expr $hts_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
+# if test "x$hts_lib_version_req_sub_minor" = "x" ; then
+# hts_lib_version_req_sub_minor="0"
+# fi
+# WANT_HTS_VERSION=`expr $htslib_version_req_major \* 100000 \+ $hts_lib_version_req_minor \* 100 \+ $hts_lib_version_req_sub_minor`
+ AC_MSG_CHECKING(for htslib)
+ succeeded=no
+
+ dnl first we check the system location for hts libraries
+ if test "$ac_hts_path" != ""; then
+ HTS_LDFLAGS="-L$ac_hts_path/lib"
+ HTS_CPPFLAGS="-I$ac_hts_path/include"
+ else
+ for ac_hts_path_tmp in /usr /usr/local /opt /opt/local ; do
+ if test -d "$ac_hts_path_tmp/include/htslib" && test -r "$ac_hts_path_tmp/include/htslib"; then
+ HTS_LDFLAGS="-L$ac_hts_path_tmp/lib"
+ HTS_CPPFLAGS="-I$ac_hts_path_tmp/include"
+ break;
+ fi
+ done
+ fi
+
+ dnl overwrite ld flags if we have required special directory with
+ dnl --with-hts-libdir parameter
+ if test "$ac_hts_lib_path" != ""; then
+ HTS_LDFLAGS="-L$ac_hts_lib_path"
+ fi
+
+ CPPFLAGS_SAVED="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $HTS_CPPFLAGS"
+ export CPPFLAGS
+
+ LDFLAGS_SAVED="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $HTS_LDFLAGS"
+ export LDFLAGS
+
+ AC_LANG_PUSH(C++)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ @%:@include <htslib/hts.h>
+ ]], [[
+ ]])],[
+ AC_MSG_RESULT(yes)
+ succeeded=yes
+ found_system=yes
+ ],[
+ ])
+ AC_LANG_POP([C++])
+
+ dnl if we found no hts with system layout we search for hts libraries
+ dnl built and installed without the --layout=system option or for a staged(not installed) version
+ if test "x$succeeded" != "xyes"; then
+ _version=0
+ if test "$ac_hts_path" != ""; then
+ if test -d "$ac_hts_path" && test -r "$ac_hts_path"; then
+ for i in `ls -d $ac_hts_path/include/hts* 2>/dev/null`; do
+ _version_tmp=`echo $i | sed "s#$ac_hts_path##" | sed 's/\/include\/hts-//' | sed 's/_/./'`
+ V_CHECK=`expr $_version_tmp \> $_version`
+ if test "$V_CHECK" = "1" ; then
+ _version=$_version_tmp
+ fi
+ VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
+ HTS_CPPFLAGS="-I$ac_hts_path/include/hts-$VERSION_UNDERSCORE"
+ done
+ fi
+ else
+ for ac_hts_path in /usr /usr/local /opt /opt/local ; do
+ if test -d "$ac_hts_path" && test -r "$ac_hts_path"; then
+ for i in `ls -d $ac_hts_path/include/hts-* 2>/dev/null`; do
+ _version_tmp=`echo $i | sed "s#$ac_hts_path##" | sed 's/\/include\/hts-//' | sed 's/_/./'`
+ V_CHECK=`expr $_version_tmp \> $_version`
+ if test "$V_CHECK" = "1" ; then
+ _version=$_version_tmp
+ best_path=$ac_hts_path
+ fi
+ done
+ fi
+ done
+
+ VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
+ HTS_CPPFLAGS="-I$best_path/include/hts-$VERSION_UNDERSCORE"
+ if test "$ac_hts_lib_path" = ""
+ then
+ HTS_LDFLAGS="-L$best_path/lib"
+ fi
+
+ if test "x$HTS_ROOT" != "x"; then
+ if test -d "$HTS_ROOT" && test -r "$HTS_ROOT" && test -d "$HTS_ROOT/stage/lib" && test -r "$HTS_ROOT/stage/lib"; then
+ version_dir=`expr //$HTS_ROOT : '.*/\(.*\)'`
+ stage_version=`echo $version_dir | sed 's/hts_//' | sed 's/_/./g'`
+ stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
+ V_CHECK=`expr $stage_version_shorten \>\= $_version`
+ if test "$V_CHECK" = "1" -a "$ac_hts_lib_path" = "" ; then
+ AC_MSG_NOTICE(We will use a staged hts library from $HTS_ROOT)
+ HTS_CPPFLAGS="-I$HTS_ROOT"
+ HTS_LDFLAGS="-L$HTS_ROOT/stage/lib"
+ fi
+ fi
+ fi
+ fi
+
+ CPPFLAGS="$CPPFLAGS $HTS_CPPFLAGS"
+ export CPPFLAGS
+ LDFLAGS="$LDFLAGS $HTS_LDFLAGS"
+ export LDFLAGS
+
+ AC_LANG_PUSH(C++)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ @%:@include <htslib/version.hpp>
+ ]], [[
+ ]])],[
+ AC_MSG_RESULT(yes)
+ succeeded=yes
+ found_system=yes
+ ],[
+ ])
+ AC_LANG_POP([C++])
+ fi
+
+ if test "$succeeded" != "yes" ; then
+ if test "$_version" = "0" ; then
+ AC_MSG_ERROR([[We could not detect the hts libraries (version $hts_lib_version_req_shorten or higher). If you have a staged hts library (still not installed) please specify \$HTS_ROOT in your environment and do not give a PATH to --with-hts option. If you are sure you have hts installed, then check your version number looking in <htslib/version.hpp>. See http://randspringer.de/hts for more documentation.]])
+ else
+ AC_MSG_NOTICE([Your hts libraries seem too old (version $_version).])
+ fi
+ else
+ HTS_LIB="-lhts"
+ AC_SUBST(HTS_CPPFLAGS)
+ AC_SUBST(HTS_LDFLAGS)
+ AC_SUBST(HTS_LIB)
+ AC_DEFINE(HAVE_HTS,,[define if the HTS library is available])
+ fi
+
+ CPPFLAGS="$CPPFLAGS_SAVED"
+ LDFLAGS="$LDFLAGS_SAVED"
+fi
+
+])
diff --git a/configure.ac b/configure.ac
index ce9936f..eba4f7a 100755
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ m4_include([ax_boost_base.m4])
m4_include([ax_boost_thread.m4])
m4_include([ax_boost_system.m4])
m4_include([ax_boost_serialization.m4])
-m4_include([ax_bam.m4])
+m4_include([ax_hts.m4])
m4_include([ax_check_zlib.m4])
m4_include([ax_check_eigen.m4])
@@ -33,7 +33,7 @@ AC_PROG_INSTALL
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AM_PATH_PYTHON([2.4])
AX_BOOST_BASE([1.47.0])
-AX_BAM
+AX_HTS
AX_BOOST_SYSTEM
AX_BOOST_SERIALIZATION
AX_BOOST_THREAD
@@ -105,7 +105,7 @@ AC_ARG_ENABLE(profiling, [ --enable-profiling enable profiling with
CFLAGS="${generic_CFLAGS} ${ext_CFLAGS} ${user_CFLAGS} ${debug_CFLAGS} ${OPENMP_CFLAGS}"
CXXFLAGS="$CFLAGS"
-CXXFLAGS="${CXXFLAGS} ${BOOST_CPPFLAGS} ${BAM_CPPFLAGS} ${EIGEN_CPPFLAGS}"
+CXXFLAGS="${CXXFLAGS} ${BOOST_CPPFLAGS} ${HTS_CPPFLAGS} ${EIGEN_CPPFLAGS}"
user_LDFLAGS="$LDFLAGS"
LDFLAGS="${ext_LDFLAGS} ${user_LDFLAGS}"
diff --git a/cufflinks.xcodeproj/project.pbxproj b/cufflinks.xcodeproj/project.pbxproj
index ea9dce7..f021377 100644
--- a/cufflinks.xcodeproj/project.pbxproj
+++ b/cufflinks.xcodeproj/project.pbxproj
@@ -748,7 +748,7 @@
A2047A17191141C7007193FC /* libbam.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libbam.a; path = ../../../../opt/local/libIntel64/libbam.a; sourceTree = "<group>"; };
ED1C0C7111D7D9E500CFD663 /* ax_boost_base.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ax_boost_base.m4; sourceTree = "<group>"; };
ED1C0C7211D7D9E500CFD663 /* ax_boost_thread.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ax_boost_thread.m4; sourceTree = "<group>"; };
- ED1C0C7411D7DA3200CFD663 /* ax_bam.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ax_bam.m4; sourceTree = "<group>"; };
+ ED1C0C7411D7DA3200CFD663 /* ax_hts.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ax_hts.m4; sourceTree = "<group>"; };
ED1C0CAA11D7E52400CFD663 /* ax_check_zlib.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ax_check_zlib.m4; sourceTree = "<group>"; };
ED1C0D7911D7F94900CFD663 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
ED41B838127602C60000B5A2 /* cufflinks_xcode */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = cufflinks_xcode; sourceTree = BUILT_PRODUCTS_DIR; };
diff --git a/make_bin.sh b/make_bin.sh
index 32c2e6e..f4d3aa5 100755
--- a/make_bin.sh
+++ b/make_bin.sh
@@ -2,11 +2,11 @@
#simple script to pack up a precompiled binary package, with the boost thread
# library statically linked in; on x86_64 Linux, libstc++ and libgcc are linked statically also
if [[ -z "$2" ]]; then
- echo -e "Usage:\n./make_bin.sh <package_base_name> <boost_prefix> [<bam_prefix> [<Eigen_prefix>]]"
+ echo -e "Usage:\n./make_bin.sh <package_base_name> <boost_prefix> [<hts_prefix> [<Eigen_prefix>]]"
exit 1
fi
-echo "packing up $1.tar.gz, using boost in $2, linking against $3 and using BAM in $4, using Eigen in $5"
+echo "packing up $1.tar.gz, using boost in $2, linking against $3 and using HTS in $4, using Eigen in $5"
mkdir $1
#make clean
make distclean
@@ -38,8 +38,8 @@ fi
# fi
-#./configure --enable-intel64 --with-boost=$l2 --with-boost-thread=$l3 --with-bam=$l4 --with-eigen=$l5
-./configure --with-boost=$l2 --with-boost-thread=$l2/lib/libboost_thread.a --with-boost-system=$l2/lib/libboost_system.a --with-bam=$l3 --with-eigen=$l4 --with-boost-serialization=$l2/lib/libboost_serialization.a
+#./configure --enable-intel64 --with-boost=$l2 --with-boost-thread=$l3 --with-hts=$l4 --with-eigen=$l5
+./configure --with-boost=$l2 --with-boost-thread=$l2/lib/libboost_thread.a --with-boost-system=$l2/lib/libboost_system.a --with-hts=$l3 --with-eigen=$l4 --with-boost-serialization=$l2/lib/libboost_serialization.a
make
cp src/cufflinks $1
cp src/cuffcompare $1
diff --git a/src/Makefile.am b/src/Makefile.am
index b46137d..a900f19 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -206,8 +206,8 @@ CLEANFILES = $(bin_SCRIPTS)
# (echo '#!$(PYTHON)'; sed '/^#!/d' $<) > $@
cufflinks_SOURCES = cufflinks.cpp
-cufflinks_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(BAM_LIB)
-cufflinks_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(BAM_LDFLAGS) #$(ZLIB_LDFLAGS)
+cufflinks_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(HTS_LIB)
+cufflinks_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(HTS_LDFLAGS) #$(ZLIB_LDFLAGS)
cuffcompare_SOURCES = cuffcompare.cpp
cuffcompare_LDADD = libgc.a
@@ -216,30 +216,30 @@ gffread_SOURCES = gffread.cpp
gffread_LDADD = libgc.a
cuffdiff_SOURCES = cuffdiff.cpp
-cuffdiff_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(BAM_LIB)
-cuffdiff_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(BAM_LDFLAGS)
+cuffdiff_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(HTS_LIB)
+cuffdiff_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(HTS_LDFLAGS)
cuffquant_SOURCES = cuffquant.cpp
-cuffquant_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(BAM_LIB)
-cuffquant_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(BAM_LDFLAGS)
+cuffquant_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(HTS_LIB)
+cuffquant_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(HTS_LDFLAGS)
cuffnorm_SOURCES = cuffnorm.cpp
-cuffnorm_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(BAM_LIB)
-cuffnorm_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(BAM_LDFLAGS)
+cuffnorm_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(HTS_LIB)
+cuffnorm_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(HTS_LDFLAGS)
gtf_to_sam_SOURCES = gtf_to_sam.cpp
-gtf_to_sam_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(BAM_LIB)
-gtf_to_sam_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(BAM_LDFLAGS)
+gtf_to_sam_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(HTS_LIB)
+gtf_to_sam_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(HTS_LDFLAGS)
#cuffcluster_SOURCES = cuffcluster.cpp
-#cuffcluster_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(BAM_LIB)
-#cuffcluster_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(BAM_LDFLAGS)
+#cuffcluster_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(HTS_LIB)
+#cuffcluster_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(HTS_LDFLAGS)
compress_gtf_SOURCES = compress_gtf.cpp
-compress_gtf_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(BAM_LIB)
-compress_gtf_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(BAM_LDFLAGS)
+compress_gtf_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(HTS_LIB)
+compress_gtf_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(HTS_LDFLAGS)
#gtf_reads_SOURCES = gtf_reads.cpp
-#gtf_reads_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(BAM_LIB)
-#gtf_reads_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(BAM_LDFLAGS) #$(ZLIB_LDFLAGS)
+#gtf_reads_LDADD = libcufflinks.a libgc.a $(BOOST_THREAD_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) $(HTS_LIB)
+#gtf_reads_LDFLAGS = $(LDFLAGS) $(BOOST_LDFLAGS) $(HTS_LDFLAGS) #$(ZLIB_LDFLAGS)
--
2.33.0

View File

@ -0,0 +1,24 @@
From 8e89c64b095d114414a71d0eb62358c3bc21fd7e Mon Sep 17 00:00:00 2001
Author: Reiner Herrmann <reiner@reiner-h.de>
Description: Fix FTBFS with GCC 10 curwin is declared in different source file. declare it as extern to fix multiple definition linker error.
---
src/locfit/startlf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/locfit/startlf.c b/src/locfit/startlf.c
index 6255410..f5435f7 100644
--- a/src/locfit/startlf.c
+++ b/src/locfit/startlf.c
@@ -233,7 +233,7 @@ INT (*vfun)(), nopc;
extern lfit lf;
extern design des;
extern plots pl[];
-int curwin;
+extern int curwin;
vari *vb;
INT nofit()
--
2.23.0

32
no_svnversion.patch Normal file
View File

@ -0,0 +1,32 @@
From 8fe33f6c21af2e620d0051fe042454400e7b228d Mon Sep 17 00:00:00 2001
From: herengui <herengui@uniontech.com>
Date: Thu, 10 Feb 2022 14:10:12 +0800
Subject: [PATCH] no svnversion
Signed-off-by: herengui <herengui@uniontech.com>
---
configure.ac | 2 --
1 file changed, 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 96ffbac..ce9936f 100755
--- a/configure.ac
+++ b/configure.ac
@@ -6,14 +6,12 @@ m4_include([ax_bam.m4])
m4_include([ax_check_zlib.m4])
m4_include([ax_check_eigen.m4])
-define([svnversion], esyscmd([sh -c "svnversion|tr -d '\n'"]))dnl
AC_INIT([cufflinks], [2.2.1], [cole@cs.umd.edu])
AC_DEFINE(SVN_REVISION, "svnversion", [SVN Revision])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE
#AM_PATH_CPPUNIT(1.10.2)
--
2.20.1