pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/biology/rna-star



Module Name:    pkgsrc
Committed By:   bacon
Date:           Mon Jul 31 14:34:18 UTC 2023

Added Files:
        pkgsrc/biology/rna-star: DESCR Makefile PLIST distinfo
        pkgsrc/biology/rna-star/patches: patch-Makefile patch-SharedMemory.cpp
            patch-SoloBarcode.cpp patch-SuffixArrayFuns.cpp
            patch-bamSortByCoordinate.cpp

Log Message:
biology/rna-star: Spliced Transcripts Align to a Ref

STAR (Spliced Transcripts Alignment to a Reference) aims to achieve
accurate alignment of high-throughput RNA-seq data.  STAR is based on
a previously undescribed RNA-seq alignment algorithm that uses
sequential maximum mappable seed search in uncompressed suffix arrays
followed by seed clustering and stitching procedure. STAR outperforms
other aligners by a factor of >50 in mapping speed, aligning to the
human genome 550 million 2 x 76 bp paired-end reads per hour on a modest
12-core server, while at the same time improving alignment sensitivity
and precision.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/biology/rna-star/DESCR \
    pkgsrc/biology/rna-star/Makefile pkgsrc/biology/rna-star/PLIST \
    pkgsrc/biology/rna-star/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/biology/rna-star/patches/patch-Makefile \
    pkgsrc/biology/rna-star/patches/patch-SharedMemory.cpp \
    pkgsrc/biology/rna-star/patches/patch-SoloBarcode.cpp \
    pkgsrc/biology/rna-star/patches/patch-SuffixArrayFuns.cpp \
    pkgsrc/biology/rna-star/patches/patch-bamSortByCoordinate.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/biology/rna-star/DESCR
diff -u /dev/null pkgsrc/biology/rna-star/DESCR:1.1
--- /dev/null   Mon Jul 31 14:34:18 2023
+++ pkgsrc/biology/rna-star/DESCR       Mon Jul 31 14:34:18 2023
@@ -0,0 +1,9 @@
+STAR (Spliced Transcripts Alignment to a Reference) aims to achieve
+accurate alignment of high-throughput RNA-seq data.  STAR is based on
+a previously undescribed RNA-seq alignment algorithm that uses
+sequential maximum mappable seed search in uncompressed suffix arrays
+followed by seed clustering and stitching procedure. STAR outperforms
+other aligners by a factor of >50 in mapping speed, aligning to the
+human genome 550 million 2 x 76 bp paired-end reads per hour on a modest
+12-core server, while at the same time improving alignment sensitivity
+and precision
Index: pkgsrc/biology/rna-star/Makefile
diff -u /dev/null pkgsrc/biology/rna-star/Makefile:1.1
--- /dev/null   Mon Jul 31 14:34:18 2023
+++ pkgsrc/biology/rna-star/Makefile    Mon Jul 31 14:34:18 2023
@@ -0,0 +1,57 @@
+# $NetBSD: Makefile,v 1.1 2023/07/31 14:34:18 bacon Exp $
+
+DISTNAME=      STAR-2.7.10b
+PKGNAME=       rna-star-2.7.10b
+CATEGORIES=    biology
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=alexdobin/}
+GITHUB_PROJECT=        STAR
+
+OWNER=         bacon%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/alexdobin/STAR
+COMMENT=       Spliced Transcripts Alignment to a Reference
+LICENSE=       gnu-gpl-v3
+
+SUBST_CLASSES+=                htslib
+SUBST_STAGE.htslib=    pre-configure
+SUBST_SED.htslib+=     -e 's|"htslib/htslib/sam.h"|<htslib/sam.h>|g'
+SUBST_SED.htslib+=     -e 's|"htslib/htslib/kstring.h"|<htslib/kstring.h>|g'
+SUBST_SED.htslib+=     -e 's|"htslib/htslib/bgzf.h"|<htslib/bgzf.h>|g'
+SUBST_FILES.htslib+=   BAMfunctions.cpp
+SUBST_FILES.htslib+=   IncludeDefine.h
+SUBST_FILES.htslib+=   STAR.cpp
+SUBST_FILES.htslib+=   bamRemoveDuplicates.cpp
+SUBST_FILES.htslib+=   bam_cat.c
+SUBST_FILES.htslib+=   bam_cat.h
+SUBST_FILES.htslib+=   signalFromBAM.h
+
+# May work on other 64-bit processors, but untested
+ONLY_FOR_PLATFORM=     *-*-x86_64 *-*-aarch64 *-*-powerpc64
+
+USE_LANGUAGES= c c++
+USE_TOOLS+=    gmake
+
+WRKSRC=                ${WRKDIR}/${DISTNAME}/source
+MAKE_FLAGS=    HTSLIB=''
+
+INSTALLATION_DIRS=     bin
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/STAR ${DESTDIR}${PREFIX}/bin
+
+.include "../../mk/bsd.prefs.mk"
+
+# Xcode supports -Xpreprocessor -fopenmp, but does not supply OpenMP libs
+# parallel/openmp installs an entire llvm
+# Maybe a libomp package would suffice?
+.if ${OPSYS} == Darwin
+SUBST_CLASSES+=                openmp
+SUBST_SED.openmp=      -e 's|-fopenmp|-Xpreprocessor &|g'
+SUBST_STAGE.openmp=    pre-configure
+SUBST_FILES.openmp=    Makefile
+LDFLAGS+=              -L${PREFIX}/lib -lomp -lm
+.include "../../parallel/openmp/buildlink3.mk"
+.endif
+
+.include "../../biology/htslib/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/biology/rna-star/PLIST
diff -u /dev/null pkgsrc/biology/rna-star/PLIST:1.1
--- /dev/null   Mon Jul 31 14:34:18 2023
+++ pkgsrc/biology/rna-star/PLIST       Mon Jul 31 14:34:18 2023
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2023/07/31 14:34:18 bacon Exp $
+bin/STAR
Index: pkgsrc/biology/rna-star/distinfo
diff -u /dev/null pkgsrc/biology/rna-star/distinfo:1.1
--- /dev/null   Mon Jul 31 14:34:18 2023
+++ pkgsrc/biology/rna-star/distinfo    Mon Jul 31 14:34:18 2023
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1 2023/07/31 14:34:18 bacon Exp $
+
+BLAKE2s (STAR-2.7.10b.tar.gz) = ae5b1c236c1b5975d60277dbd5634661a4598e6f3f906f3d6b582b403edb58d3
+SHA512 (STAR-2.7.10b.tar.gz) = c4e94fd19f2a8145c38d59b39d91af16b53af63da2d77275445b9aeadfd287e3d2749829352a034e45e4352c64884275fa5b7b2ed28b95bf47cac3183b0d74aa
+Size (STAR-2.7.10b.tar.gz) = 12443703 bytes
+SHA1 (patch-Makefile) = 7dd8ef0ba12182a4cb2722aacfc6691b4f0a0cfe
+SHA1 (patch-SharedMemory.cpp) = e4b97d68ddeb7ed2c7da66378f253ff4cd42abee
+SHA1 (patch-SoloBarcode.cpp) = a939a97cadd05b1ec6b6dfcddb469acd5072b0e8
+SHA1 (patch-SuffixArrayFuns.cpp) = b7c623c02277fdfc2bd9d6fa8068afafeb46b1cf
+SHA1 (patch-bamSortByCoordinate.cpp) = e91a4ac9f04beb29c95c7bfbb5d89c5bf41aca41

Index: pkgsrc/biology/rna-star/patches/patch-Makefile
diff -u /dev/null pkgsrc/biology/rna-star/patches/patch-Makefile:1.1
--- /dev/null   Mon Jul 31 14:34:18 2023
+++ pkgsrc/biology/rna-star/patches/patch-Makefile      Mon Jul 31 14:34:18 2023
@@ -0,0 +1,64 @@
+$NetBSD: patch-Makefile,v 1.1 2023/07/31 14:34:18 bacon Exp $
+
+# Portability
+
+--- Makefile.orig      2022-11-01 14:50:35.000000000 +0000
++++ Makefile
+@@ -11,6 +11,10 @@ CXXFLAGSextra ?=
+ # user may define the compiler
+ CXX ?= g++
+ 
++# user may set to '' and sed "htslib/htslib/*.h" to <htslib/*.h>
++# if they don't want the bundled htslib
++HTSLIB ?= htslib
++
+ # pre-defined flags
+ LDFLAGS_shared := -pthread -Lhtslib -Bstatic -lhts -Bdynamic -lz
+ LDFLAGS_static := -static -static-libgcc -pthread -Lhtslib -lhts -lz
+@@ -18,7 +22,8 @@ LDFLAGS_Mac :=-pthread -lz htslib/libhts
+ LDFLAGS_Mac_static :=-pthread -lz -static-libgcc htslib/libhts.a
+ LDFLAGS_gdb := $(LDFLAGS_shared)
+ 
+-DATE_FMT = --iso-8601=seconds
++# --iso-8601 is not portable
++DATE_FMT = +%Y-%m-%dT%H:%M:%S%z
+ ifdef SOURCE_DATE_EPOCH
+     BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)")
+ else
+@@ -41,12 +46,12 @@ GIT_BRANCH_COMMIT_DIFF := -D'GIT_BRANCH_
+ 
+ # Defaults, can be overridden by make arguments or environment
+ CXXFLAGS ?= -pipe -Wall -Wextra
+-CFLAGS ?= -pipe -Wall -Wextra -O3
++CFLAGS ?= -pipe -Wall -Wextra
+ CXXFLAGS_SIMD ?= -mavx2
+ 
+ # Unconditionally set essential flags and optimization options
+ CXXFLAGS_common := -std=c++11 -fopenmp $(COMPTIMEPLACE) $(GIT_BRANCH_COMMIT_DIFF)
+-CXXFLAGS_main := -O3 $(CXXFLAGS_common)
++CXXFLAGS_main := $(CXXFLAGS_common)
+ CXXFLAGS_gdb := -O0 -g3 $(CXXFLAGS_common)
+ 
+ ##########################################################################################################
+@@ -114,7 +119,7 @@ clean:
+ 
+ .PHONY: CLEAN
+ CLEAN: clean
+-      $(MAKE) -C htslib clean
++      $(MAKE) -C $(HTSLIB) clean
+ 
+ 
+ .PHONY: clean_solo
+@@ -131,10 +136,10 @@ ifneq ($(MAKECMDGOALS),CLEAN)
+ ifneq ($(MAKECMDGOALS),clean_solo)
+ ifneq ($(MAKECMDGOALS),STARforMac)
+ ifneq ($(MAKECMDGOALS),STARforMacGDB)
+-Depend.list: $(SOURCES) parametersDefault.xxd htslib
++Depend.list: $(SOURCES) parametersDefault.xxd $(HTSLIB)
+       echo $(SOURCES)
+       'rm' -f ./Depend.list
+-      $(CXX) $(CXXFLAGS_common) -MM $^ >> Depend.list
++      $(CXX) $(CXXFLAGS) $(CXXFLAGS_common) -MM $^ >> Depend.list
+ include Depend.list
+ endif
+ endif
Index: pkgsrc/biology/rna-star/patches/patch-SharedMemory.cpp
diff -u /dev/null pkgsrc/biology/rna-star/patches/patch-SharedMemory.cpp:1.1
--- /dev/null   Mon Jul 31 14:34:18 2023
+++ pkgsrc/biology/rna-star/patches/patch-SharedMemory.cpp      Mon Jul 31 14:34:18 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-SharedMemory.cpp,v 1.1 2023/07/31 14:34:18 bacon Exp $
+
+# Portability
+
+--- SharedMemory.cpp.orig      2022-11-01 14:50:35.000000000 +0000
++++ SharedMemory.cpp
+@@ -12,7 +12,7 @@
+ #include <errno.h>
+ #include <sys/types.h>
+ 
+-#if defined(COMPILE_FOR_MAC) || defined(__FreeBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
+   //some Mac's idiosyncrasies: standard SHM libraries are very old and missing some definitions
+   #define SHM_NORESERVE 0
+ #endif
Index: pkgsrc/biology/rna-star/patches/patch-SoloBarcode.cpp
diff -u /dev/null pkgsrc/biology/rna-star/patches/patch-SoloBarcode.cpp:1.1
--- /dev/null   Mon Jul 31 14:34:18 2023
+++ pkgsrc/biology/rna-star/patches/patch-SoloBarcode.cpp       Mon Jul 31 14:34:18 2023
@@ -0,0 +1,21 @@
+$NetBSD: patch-SoloBarcode.cpp,v 1.1 2023/07/31 14:34:18 bacon Exp $
+
+# Portability
+
+--- SoloBarcode.cpp.orig       2023-07-23 17:22:42.613062682 +0000
++++ SoloBarcode.cpp
+@@ -3,6 +3,7 @@
+ #include "SoloCommon.h"
+ #include "SequenceFuns.h"
+ #include "ParametersSolo.h"
++#include <cmath>
+ 
+ void wlAddMismatches(uint32 nMM, uint32 cbLen, vector<uintCB> &wl, vector<uintCB> &wlEd1, vector<uint32> &wlInd1);
+ 
+@@ -149,4 +150,4 @@ void wlAddMismatches(uint32 nMM, uint32 
+             ++icb;
+         };
+     };
+-};
+\ No newline at end of file
++};
Index: pkgsrc/biology/rna-star/patches/patch-SuffixArrayFuns.cpp
diff -u /dev/null pkgsrc/biology/rna-star/patches/patch-SuffixArrayFuns.cpp:1.1
--- /dev/null   Mon Jul 31 14:34:18 2023
+++ pkgsrc/biology/rna-star/patches/patch-SuffixArrayFuns.cpp   Mon Jul 31 14:34:18 2023
@@ -0,0 +1,54 @@
+$NetBSD: patch-SuffixArrayFuns.cpp,v 1.1 2023/07/31 14:34:18 bacon Exp $
+
+# Drop obsolete modifier for c++17 compat
+
+--- SuffixArrayFuns.cpp.orig   2023-07-21 15:26:07 UTC
++++ SuffixArrayFuns.cpp
+@@ -15,7 +15,7 @@ uint compareSeqToGenome(Genome &mapGen, char** s2, uin
+      * dirR forward or reverse direction search on read sequence
+      */
+ 
+-    register int64 ii;
++    int64 ii;
+ 
+     uint SAstr=mapGen.SA[iSA];
+     bool dirG = (SAstr>>mapGen.GstrandBit) == 0; //forward or reverse strand of the genome
+@@ -231,7 +231,7 @@ uint compareSeqToGenome1(Genome &mapGen, char** s2, ui
+ 
+     //TODO no need for complementary sequence
+ 
+-    register int64 ii;
++    int64 ii;
+ 
+     uint SAstr=mapGen.SA[iSA];
+     bool dirG = (SAstr>>mapGen.GstrandBit) == 0; //forward or reverse strand of the genome
+@@ -356,13 +356,13 @@ uint funCalcSAiFromSA(char* gSeq, PackedArray& gSA, Ge
+     bool dirG = (SAstr>>mapGen.GstrandBit) == 0; //forward or reverse strand of the genome
+     SAstr &= mapGen.GstrandMask;
+     iL4=-1;
+-    register uint saind=0;
++    uint saind=0;
+     if (dirG)
+     {
+-        register uint128 g1=*( (uint128*) (gSeq+SAstr) );
++        uint128 g1=*( (uint128*) (gSeq+SAstr) );
+         for (int ii=0; ii<L; ii++)
+         {
+-            register char g2=(char) g1;
++            char g2=(char) g1;
+             if (g2>3)
+             {
+                 iL4=ii;
+@@ -376,10 +376,10 @@ uint funCalcSAiFromSA(char* gSeq, PackedArray& gSA, Ge
+         return saind;
+     } else
+     {
+-        register uint128 g1=*( (uint128*) (gSeq+mapGen.nGenome-SAstr-16) );
++        uint128 g1=*( (uint128*) (gSeq+mapGen.nGenome-SAstr-16) );
+         for (int ii=0; ii<L; ii++)
+         {
+-            register char g2=(char) (g1>>(8*(15-ii)));
++            char g2=(char) (g1>>(8*(15-ii)));
+             if (g2>3)
+             {
+                 iL4=ii;
Index: pkgsrc/biology/rna-star/patches/patch-bamSortByCoordinate.cpp
diff -u /dev/null pkgsrc/biology/rna-star/patches/patch-bamSortByCoordinate.cpp:1.1
--- /dev/null   Mon Jul 31 14:34:18 2023
+++ pkgsrc/biology/rna-star/patches/patch-bamSortByCoordinate.cpp       Mon Jul 31 14:34:18 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-bamSortByCoordinate.cpp,v 1.1 2023/07/31 14:34:18 bacon Exp $
+
+# Portability
+
+--- bamSortByCoordinate.cpp.orig       2022-11-01 14:50:35.000000000 +0000
++++ bamSortByCoordinate.cpp
+@@ -69,7 +69,7 @@ void bamSortByCoordinate (Parameters &P,
+                             boolWait=false;
+                             totalMem+=newMem;
+                         };
+-                        sleep(0.1);
++                        usleep(100000);
+                     };
+                     BAMbinSortByCoordinate(ibin,binN,binS,P.runThreadN,P.outBAMsortTmpDir, P, genome, solo);
+                     #pragma omp critical



Home | Main Index | Thread Index | Old Index