Skip to content
Commits on Source (6)
......@@ -2,15 +2,29 @@ Installation
--------------
You may use Subread package by directly downloading a binary release suitable for your operating system (no compilation is needed), or you may build it from the source. Here we describe how to install it from the source.
Download the latest version of Subread package from http://subread.sourceforge.net/. The source release includes a keyword 'source' in the name of the tar ball. Uncompress the tar ball, enter the 'src' directory and issue the following command to build it for Linux OS :
Download the latest version of Subread package from http://subread.sourceforge.net/. The source release includes a keyword 'source' in the name of the tar ball. Uncompress the tar ball, enter the 'src' directory and issue one of the following commands to build it.
*** for Linux OS, use command:
make -f Makefile.Linux
For Mac OS, use command:
*** For Windows, use command:
make -f Makefile.Windows
You need to have ``gcc" and ``make" in %PATH% to build the Windows-version of Subread. It is recommended to download and install Mingw-w64 before building Subread, for that Mingw-w64 contains all the necessary prorgams and libraries.
If you have had Mingw-w64 installed, you should use this command:
mingw32-make -f Makefile.Windows
Still, you need to make sure that mingw_64/bin, which contains mingw32-make.exe and gcc.exe, is in %PATH%. We strongly recommend to build the 64-bit version Subread programs (by using the 64-bit Mingw package) because the 32-bit version Subread programs have very limited memory access.
*** For Mac OS, use command:
make -f Makefile.MacOS
For FreeBSD OS, use command:
*** For FreeBSD OS, use command:
gmake -f Makefile.FreeBSD
......
subread (2.0.0+dfsg-1) unstable; urgency=medium
* New upstream version
* Use 2to3 to port to Python3
Closes: #938576
-- Andreas Tille <tille@debian.org> Thu, 05 Sep 2019 09:30:37 +0200
subread (1.6.5+dfsg-1) unstable; urgency=medium
* Team upload.
......
......@@ -7,7 +7,7 @@ Priority: optional
Build-Depends: bc,
debhelper-compat (= 12),
help2man,
python,
python3,
zlib1g-dev
Standards-Version: 4.4.0
Vcs-Browser: https://salsa.debian.org/med-team/subread
......
Description: Use 2to3 to port to Python3
Bug-Debian: https://bugs.debian.org/938576
Author: Andreas Tille <tille@debian.org>
Last-Update: Thu, 05 Sep 2019 09:01:45 +0200
--- a/test/subread-align/readname_cigar_match.py
+++ b/test/subread-align/readname_cigar_match.py
@@ -68,10 +68,10 @@ while True:
if not is_correct:
if is_cigar_problem:
- print "%s\t%s"%(cigar, oracle_cigar)
+ print("%s\t%s"%(cigar, oracle_cigar))
error_cig +=1
else:
error_pos +=1
- print "%s,%d\t%s,%d\t\t%s"%(chro, chro_pos, oracle_chro, oracle_pos, read_name)
+ print("%s,%d\t%s,%d\t\t%s"%(chro, chro_pos, oracle_chro, oracle_pos, read_name))
-print "RES: %d reads\t%d unmapped\t%d error_pos\t%d error_cigar\t%d correct_indel"%(all_r,unmapped, error_pos, error_cig, correct_indel)
+print("RES: %d reads\t%d unmapped\t%d error_pos\t%d error_cigar\t%d correct_indel"%(all_r,unmapped, error_pos, error_cig, correct_indel))
--- a/test/subread-align/readname_ora_match.py
+++ b/test/subread-align/readname_ora_match.py
@@ -29,7 +29,7 @@ def main():
line +=1
if line % 100000 == 0:
- print "L=",line
+ print("L=",line)
if fl.find("NNNNNNNN")>0:
NN+=1
@@ -76,8 +76,8 @@ def main():
old_read_name = t_name
- print "unmatched=",unmatched, "; matched=",matched, "; unmapped=", unmapped, "; reads=", line, " ;NN=", NN
- print "accuracy=",(matched*1.)/(matched+unmatched)," ; sensitivity=",(matched+unmatched)*1./(line-NN)
- print "paired_match=", paired_match," ; paired=", (paired_match*1./(matched))
+ print("unmatched=",unmatched, "; matched=",matched, "; unmapped=", unmapped, "; reads=", line, " ;NN=", NN)
+ print("accuracy=",(matched*1.)/(matched+unmatched)," ; sensitivity=",(matched+unmatched)*1./(line-NN))
+ print("paired_match=", paired_match," ; paired=", (paired_match*1./(matched)))
main()
--- a/test/subread-align/subread-align-test.sh
+++ b/test/subread-align/subread-align-test.sh
@@ -1,5 +1,5 @@
SUBREAD_HOME=../../bin/
-PYTHON_EXEC=python
+PYTHON_EXEC=python3
rm test-tmp.log
mkdir -p result
......@@ -7,10 +7,8 @@ Description: Inject architecture specific flags:
- Append CFLAGS and LDFLAGS instead of hardcoding the values, this way the
hardening flags are set correctly
Author: Alex Mestiashvili <alex@biotec.tu-dresden.de>
Index: subread/src/Makefile.Linux
===================================================================
--- subread.orig/src/Makefile.Linux
+++ subread/src/Makefile.Linux
--- a/src/Makefile.Linux
+++ b/src/Makefile.Linux
@@ -7,9 +7,9 @@ OPT_LEVEL = 3
include makefile.version
-include ~/.R/DBPZ_debug_makefile
......@@ -24,21 +22,18 @@ Index: subread/src/Makefile.Linux
ALL_LIBS= core core-junction core-indel sambam-file sublog gene-algorithms hashtable input-files sorted-hashtable gene-value-index exon-algorithms HelperFunctions interval_merge long-hashtable core-bigtable seek-zlib input-blc
Index: subread/src/longread-one/Makefile
===================================================================
--- subread.orig/src/longread-one/Makefile
+++ subread/src/longread-one/Makefile
@@ -1,10 +1,10 @@
OPT_LEVEL = 3
--- a/src/longread-one/Makefile
+++ b/src/longread-one/Makefile
@@ -4,9 +4,9 @@ OPT_LEVEL = 3
include ../makefile.version
include make.version
-CCFLAGS = -mtune=core2 ${MACOS} -O${OPT_LEVEL} -Wall -DMAKE_FOR_EXON -D MAKE_STANDALONE -D_FILE_OFFSET_BITS=64 -DSUBREAD_VERSION=\"${SUBREAD_VERSION}\" ${WARNING_LEVEL}
-CCFLAGS = -mtune=core2 ${MACOS} -O${OPT_LEVEL} -Wall -DMAKE_FOR_EXON -D MAKE_STANDALONE -D_FILE_OFFSET_BITS=64 -DSUBREAD_VERSION=\"${SUBREAD_VERSION}\" ${WARNING_LEVEL} ${MINGW32}
-LDFLAGS = -lpthread -lz -lm -O${OPT_LEVEL} -DMAKE_FOR_EXON -D MAKE_STANDALONE # -DREPORT_ALL_THE_BEST
+CCFLAGS += -O${OPT_LEVEL} -Wall -DMAKE_FOR_EXON -D MAKE_STANDALONE -D_FILE_OFFSET_BITS=64 -D SUBREAD_VERSION=\"${SUBREAD_VERSION}\" ${WARNING_LEVEL}
+LDFLAGS += -lpthread -lz -lm -O${OPT_LEVEL} -DMAKE_FOR_EXON -D MAKE_STANDALONE # -DREPORT_ALL_THE_BEST
CC_EXEC = gcc
-CC = ${CC_EXEC} ${CCFLAGS} -fmessage-length=0 -ggdb
+CCFLAGS += -O${OPT_LEVEL} -Wall -DMAKE_FOR_EXON -D MAKE_STANDALONE -D_FILE_OFFSET_BITS=64 -DSUBREAD_VERSION=\"${SUBREAD_VERSION}\" ${WARNING_LEVEL} ${MINGW32}
+LDFLAGS += -lpthread -lz -lm -O${OPT_LEVEL} -DMAKE_FOR_EXON -D MAKE_STANDALONE # -DREPORT_ALL_THE_BEST
+CC = ${CC_EXEC} ${CFLAGS} ${CPPFLAGS} ${CCFLAGS} -fmessage-length=0 -ggdb
ALL_LIBS=LRMsorted-hashtable LRMbase-index LRMchro-event LRMhelper LRMseek-zlib LRMfile-io LRMhashtable
ALL_OBJECTS=$(addsuffix .o, ${ALL_LIBS})
Subject: Fix ftbfs on kfreebsd
From: Alex Mestiashvili <alex@biotec.tu-dresden.de>
--- subread.orig/src/HelperFunctions.c
+++ subread/src/HelperFunctions.c
@@ -807,6 +807,9 @@
--- a/src/HelperFunctions.c
+++ b/src/HelperFunctions.c
@@ -848,6 +848,9 @@ int mac_str(char * str_buff)
#if defined(FREEBSD) || defined(__MINGW32__)
return 1;
#else
......@@ -12,7 +12,7 @@ From: Alex Mestiashvili <alex@biotec.tu-dresden.de>
#ifdef MACOS
int mib[6], x1, ret = 1;
size_t len;
@@ -899,6 +902,7 @@
@@ -940,6 +943,7 @@ int mac_str(char * str_buff)
return 1;
#endif
#endif
......
typo.patch
fix_ftbfs_kfreebsd.patch
arch_specific_flags.patch
2to3.patch
Description: Fix typos
Author: Alex Mestiashvili <alex@biotec.tu-dresden.de>
--- subread.orig/src/sambam-file.c
+++ subread/src/sambam-file.c
@@ -205,7 +205,7 @@
--- a/src/sambam-file.c
+++ b/src/sambam-file.c
@@ -205,7 +205,7 @@ char cigar_op_char(int ch)
return "MIDNSHP=X"[ch];
else
{
......@@ -11,9 +11,9 @@ Author: Alex Mestiashvili <alex@biotec.tu-dresden.de>
return 'M';
}
}
--- subread.orig/src/readSummary.c
+++ subread/src/readSummary.c
@@ -1256,7 +1256,7 @@
--- a/src/readSummary.c
+++ b/src/readSummary.c
@@ -1281,7 +1281,7 @@ int load_feature_info(fc_thread_global_c
}else{
SUBREADprintf("ERROR: no features were loaded in format %s. The annotation format can be specified by the '-F' option%s.\n", file_type == FILE_TYPE_GTF?"GTF":"SAF", file_type == FILE_TYPE_GTF?", and the required feature type can be specified by the '-t' option.":"");
}
......@@ -22,7 +22,7 @@ Author: Alex Mestiashvili <alex@biotec.tu-dresden.de>
return -2;
}
@@ -3785,7 +3785,7 @@
@@ -4032,7 +4032,7 @@ void vote_and_add_count(fc_thread_global
assigned_no++;
}
}
......@@ -31,7 +31,7 @@ Author: Alex Mestiashvili <alex@biotec.tu-dresden.de>
final_feture_names[GENE_NAME_LIST_BUFFER_SIZE-1]=0;
if(RG_name){
@@ -6560,7 +6560,7 @@
@@ -7339,7 +7339,7 @@ int feature_count_main(int argc, char **
else if(optarg[0]=='5')
reduce_5_3_ends_to_one = REDUCE_TO_5_PRIME_END;
else{
......
......@@ -36,9 +36,9 @@
\begin{center}
{\Huge\bf Rsubread/Subread Users Guide}\\
\vspace{1 cm}
{\centering\large Rsubread v1.34.6/Subread v1.6.5\\}
{\centering\large Rsubread v2.0.0/Subread v2.0.0\\}
\vspace{1 cm}
\centering 18 July 2019\\
\centering 2 September 2019\\
\vspace{5 cm}
\Large Wei Shi and Yang Liao\\
\vspace{1 cm}
......@@ -99,7 +99,9 @@ They are released in two packages -- SourceForge \emph{Subread} package and Bioc
If you use {\Rsubread}, you can cite:
\begin{quote}
Liao Y, Smyth GK and Shi W (2019). The R package Rsubread is easier, faster, cheaper and better for alignment and quantification of RNA sequencing reads. \emph{Nucleic Acids Research}, doi: 10.1093/nar/gkz114. [Epub ahead of print].
Liao Y, Smyth GK and Shi W (2019).
The R package Rsubread is easier, faster, cheaper and better for alignment and quantification of RNA sequencing reads.
\emph{Nucleic Acids Research}, 47(8):e47.
\\
{\color{blue}{\url{http://www.ncbi.nlm.nih.gov/pubmed/30783653}} }
\end{quote}
......@@ -107,7 +109,9 @@ Liao Y, Smyth GK and Shi W (2019). The R package Rsubread is easier, faster, che
If you use \featureCounts, you can cite:
\begin{quote}
Liao Y, Smyth GK and Shi W (2014). featureCounts: an efficient general purpose program for assigning sequence reads to genomic features. \emph{Bioinformatics}, 30(7):923-30.
Liao Y, Smyth GK and Shi W (2014).
featureCounts: an efficient general purpose program for assigning sequence reads to genomic features.
\emph{Bioinformatics}, 30(7):923-30.
\\
{\color{blue}{\url{http://www.ncbi.nlm.nih.gov/pubmed/24227677}}}
\end{quote}
......@@ -115,12 +119,14 @@ Liao Y, Smyth GK and Shi W (2014). featureCounts: an efficient general purpose p
If you use {\Subread} or {\Subjunc} aligners, you can cite:
\begin{quote}
Liao Y, Smyth GK and Shi W (2013). The Subread aligner: fast, accurate and scalable read mapping by seed-and-vote. \emph{Nucleic Acids Research}, 41(10):e108.
Liao Y, Smyth GK and Shi W (2013).
The Subread aligner: fast, accurate and scalable read mapping by seed-and-vote.
\emph{Nucleic Acids Research}, 41(10):e108.
\\
{\color{blue}{\url{http://www.ncbi.nlm.nih.gov/pubmed/23558742}} }
\end{quote}
\newpage
\section{Download and installation}
......@@ -135,24 +141,19 @@ if (!requireNamespace("BiocManager", quietly = TRUE))
BiocManager::install("Rsubread")
\end{Rcode}
Alternatively, you may download the {\Rsubread} source package directly from {\color{blue}{\url{http://bioconductor.org/packages/release/bioc/html/Rsubread.html}} } and install it from source.\\
To install {\Rsubread} on a Windows computer, the R software has to be launched from Linux Bash Shell (Windows 10) or a unix-like environment such as cygwin.
Alternatively you may download it from {\Rsubread} web page {\color{blue}{\url{http://bioconductor.org/packages/release/bioc/html/Rsubread.html}}} and install it manually.
\subsection{Install SourceForge {\Subread} package}
\subsubsection{Installation from a binary distribution}
\subsubsection{Install from a binary distribution}
This is the easiest way to install the SourceForge {\Subread} package.
Binary distributions can be downloaded for Linux and Mac OS X from {\color{blue}{\url{http://subread.sourceforge.net}}}.
The Linux binary distribution can be run on multiple variants of Linux including Debian, Ubuntu, Fedora and Cent OS.
Binary distributions are available for Linux, Macintosh and Windows operating systems and they can be downloaded from {\color{blue}{\url{http://subread.sourceforge.net}}}.
The Linux binary distribution can be run on multiple Linux variants including Debian, Ubuntu, Fedora and Cent OS.
For Windows 10, the Linux binary distribution can be directly installed on the Linux Bash Shell.
If a unix-like environment such as cygwin is installed on a Windows computer, the Linux binary distribution can also be installed in that environment.
To install {\Subread} package on FreeBSD or Solaris, you will have to install from source.
To install {\Subread} package on FreeBSD or Solaris, you will have to install them for source.
\subsubsection{Installation from the source package}
\subsubsection{Install from source on a Unix or Macintosh computer}
Download {\Subread} source package to your working directory from SourceForge \\
{\color{blue}{\url{http://subread.sourceforge.net}}}, and type the following command to uncompress it:\\
......@@ -175,12 +176,12 @@ To install it on Oracle Solaris or OpenSolaris computer operating systems, issue
\code{make -f Makefile.SunOS}\\
If you use a Windows computer, you can install it on the Linux Bash Shell (Windows 10) or install it on a unix-like environment such as cygwin.
The command for installation is the same as that for the installation on a Linux operating system.\\
A new directory called \code{bin} will be created under the home directory of the software package, and the executables generated from the compilation are saved to that directory.
To enable easy access to these executables, you may copy them to a system directory such as \code{/usr/bin} or add the path to them to your search path (your search path is usually specified in the environment variable \code{`PATH'}).
\subsubsection{Install from source on a Windows computer}
The MinGW software tool (http://www.mingw.org/) needs to installed to compile Subread.
\section{How to get help}
......
......@@ -46,9 +46,9 @@
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <net/if.h>
#include <sys/sysinfo.h>
#endif
#include <sys/types.h>
#include <sys/sysinfo.h>
#endif
......@@ -96,8 +96,8 @@ char * get_short_fname(char * lname){
char * ret = lname;
int x1;
for(x1 = strlen(lname)-1; x1>=0; x1--){
if(lname [x1] == '/'){
for(x1 = strlen(lname)-2; x1>=0; x1--){
if(lname [x1] == '/'||lname [x1] == '\\'){
ret = lname + x1 + 1;
break;
}
......@@ -244,8 +244,9 @@ void destroy_contig_fasta(fasta_contigs_t * tab){
HashTableDestroy( tab -> contig_table );
}
int read_contig_fasta(fasta_contigs_t * tab, char * fname){
FILE * fp = f_subr_open(fname, "r");
if(fp != NULL){
autozip_fp fp;
int rv = autozip_open(fname, &fp);
if(rv>=0){
tab -> contig_table = HashTableCreate(3943);
tab -> size_table = HashTableCreate(3943);
......@@ -265,7 +266,8 @@ int read_contig_fasta(fasta_contigs_t * tab, char * fname){
chro_name[0]=0;
while(1){
char nch = fgetc(fp);
int nch = autozip_getch(&fp);
if(nch<0)break;
if(status == 0){
assert(nch == '>');
status = 1;
......@@ -305,6 +307,7 @@ int read_contig_fasta(fasta_contigs_t * tab, char * fname){
unsigned int new_bin_space = current_bin_space / 4 * 5;
if(current_bin_space > 0xffff0000 /5 * 4){
assert(0);
return 1;
}
bin_block = realloc(bin_block, new_bin_space);
memset(bin_block + current_bin_space, 0, new_bin_space - current_bin_space);
......@@ -316,7 +319,7 @@ int read_contig_fasta(fasta_contigs_t * tab, char * fname){
}
}
fclose(fp);
autozip_close(&fp);
return 0;
}
return 1;
......@@ -1531,7 +1534,11 @@ void md5txt(char *s){
for(x=0;x<16;x++){
SUBREADprintf("%02X", md5v[x]);
}
#ifdef __MINGW32__
SUBREADprintf("\t'%s'\t%016I64X\t%I64u\t%.9f\n", s, randv, randv, randv*1./0xffffffffffffffffllu);
#else
SUBREADprintf("\t'%s'\t%016llX\t%llu\t%.9f\n", s, randv, randv, randv*1./0xffffffffffffffffllu);
#endif
}
//#define TESTHelpermain main
......@@ -2687,12 +2694,25 @@ void main(){
#endif
#ifdef __MINGW32__
#include <windows.h>
#endif
int get_free_total_mem(size_t * total, size_t * free_mem){
#ifdef FREEBSD
return -1;
#endif
#ifdef __MINGW32__
MEMORYSTATUSEX statex;
statex.dwLength = sizeof (statex);
GlobalMemoryStatusEx (&statex);
(*total) = statex.ullTotalPhys;
(*free_mem) = statex.ullAvailPhys;
return 0;
#else
#ifdef MACOS
mach_msg_type_number_t count = HOST_VM_INFO_COUNT;
vm_statistics_data_t vmstat;
......@@ -2713,4 +2733,5 @@ int get_free_total_mem(size_t * total, size_t * free_mem){
*total = sinf.totalram;
return 0;
#endif
#endif
}
......@@ -4,6 +4,7 @@ all:
@echo " Subread currently supports Linux, Mac OS X and FreeBSD. Please choose the correct Makefile to build Subread."
@echo
@echo " For building subread in Linux, please run ' make -f Makefile.Linux '."
@echo " For building subread in Windows, please run ' make -f Makefile.Windows '. See README.txt for how to find the necessary programs and libraries."
@echo " For building subread in Mac OS X, please run ' make -f Makefile.MacOS '."
@echo " For building subread in FreeBSD, please run ' gmake -f Makefile.FreeBSD '."
@echo
......
......@@ -6,7 +6,7 @@ LDFLAGS = -pthread -lz -lm ${MACOS} -DMAKE_FOR_EXON -D MAKE_STANDALONE # -DREPO
CC = gcc ${CCFLAGS} ${STATIC_MAKE} -ggdb -fomit-frame-pointer -O3 -ffast-math -funroll-loops -mmmx -msse -msse2 -msse3 -fmessage-length=0
ALL_LIBS= core core-junction core-indel sambam-file sublog gene-algorithms hashtable input-files sorted-hashtable gene-value-index exon-algorithms HelperFunctions interval_merge core-bigtable seek-zlib
ALL_LIBS= core core-junction core-indel sambam-file sublog gene-algorithms hashtable input-files sorted-hashtable gene-value-index exon-algorithms HelperFunctions interval_merge core-bigtable seek-zlib input-blc
ALL_OBJECTS=$(addsuffix .o, ${ALL_LIBS})
ALL_H=$(addsuffix .h, ${ALL_LIBS})
ALL_C=$(addsuffix .c, ${ALL_LIBS})
......
CC_EXEC = gcc
OPT_LEVEL = 3
include makefile.version
-include ~/.R/DBPZ_debug_makefile
CCFLAGS = -mtune=core2 -O${OPT_LEVEL} -DMAKE_FOR_EXON -D MAKE_STANDALONE -D SUBREAD_VERSION=\"${SUBREAD_VERSION}\" -D_FILE_OFFSET_BITS=64 ${WARNING_LEVEL} -D __MINGW32__
LDFLAGS = ${STATIC_MAKE} -pthread -lz -O${OPT_LEVEL} -DMAKE_FOR_EXON -D MAKE_STANDALONE -lm
CC = ${CC_EXEC} ${CCFLAGS} -fmessage-length=0 -ggdb
ALL_LIBS= core core-junction core-indel sambam-file sublog gene-algorithms hashtable input-files sorted-hashtable gene-value-index exon-algorithms HelperFunctions interval_merge long-hashtable core-bigtable seek-zlib input-blc
ALL_OBJECTS=$(addsuffix .o, ${ALL_LIBS})
ALL_H=$(addsuffix .h, ${ALL_LIBS})
ALL_C=$(addsuffix .c, ${ALL_LIBS})
all: $(ALL_OBJECTS) genRandomReads detectionCall sublong repair txUnique featureCounts removeDup exactSNP subread-buildindex subindel subread-align subjunc qualityScores subread-fullscan propmapped flattenGTF # samMappedBases mergeVCF testZlib
mkdir -p ../bin/utilities
mv longread-one/LRM longread-one/sublong
mv longread-one/sublong subread-align subjunc featureCounts subindel exactSNP subread-buildindex ../bin/
mv detectionCall genRandomReads repair propmapped qualityScores removeDup subread-fullscan txUnique flattenGTF ../bin/utilities
@echo
@echo "###########################################################"
@echo "# #"
@echo "# Installation successfully completed. #"
@echo "# #"
@echo "# Generated executables were copied to directory ../bin/ #"
@echo "# #"
@echo "###########################################################"
@echo
$(ALL_OBJECTS): $(ALL_C) $(ALL_H)
$(CC) -o $@ -c $(subst .o,.c,$@)
sublong: longread-one/longread-mapping.c ${ALL_OBJECTS}
echo "MINGW32 = -D __MINGW32__" > longread-one/make.version
rm -f longread-one/*.o
cd longread-one && $(MAKE)
genRandomReads: gen_rand_reads.c ${ALL_OBJECTS}
${CC} -o genRandomReads gen_rand_reads.c ${ALL_OBJECTS} ${LDFLAGS}
flattenGTF: flattenAnnotations.c ${ALL_OBJECTS}
${CC} -o flattenGTF flattenAnnotations.c ${ALL_OBJECTS} ${LDFLAGS}
detectionCall: detection-calls.c ${ALL_OBJECTS}
${CC} -o detectionCall detection-calls.c ${ALL_OBJECTS} ${LDFLAGS}
repair: read-repair.c ${ALL_OBJECTS}
${CC} -o repair read-repair.c ${ALL_OBJECTS} ${LDFLAGS}
txUnique: tx-unique.c tx-unique.h ${ALL_OBJECTS}
${CC} -o txUnique tx-unique.c ${ALL_OBJECTS} ${LDFLAGS}
globalReassembly: global-reassembly.c ${ALL_OBJECTS}
${CC} -o globalReassembly global-reassembly.c ${ALL_OBJECTS} ${LDFLAGS}
propmapped: propmapped.c ${ALL_OBJECTS}
${CC} -o propmapped propmapped.c ${ALL_OBJECTS} ${LDFLAGS}
exactSNP: SNPCalling.c SNPCalling.h ${ALL_OBJECTS}
${CC} -o exactSNP SNPCalling.c ${ALL_OBJECTS} ${LDFLAGS}
subread-buildindex: index-builder.c subread.h ${ALL_OBJECTS}
${CC} -o subread-buildindex index-builder.c ${ALL_OBJECTS} ${LDFLAGS}
removeDup: removeDupReads.c removeDupReads.h subread.h ${ALL_OBJECTS}
${CC} -o removeDup removeDupReads.c ${ALL_OBJECTS} ${LDFLAGS}
subindel: SUBindel.c core.h subread.h ${ALL_OBJECTS}
${CC} -o subindel SUBindel.c ${ALL_OBJECTS} ${LDFLAGS}
featureCounts: readSummary.c subread.h ${ALL_OBJECTS}
${CC} -o featureCounts readSummary.c ${ALL_OBJECTS} ${LDFLAGS}
subread-align: core-interface-aligner.c ${ALL_OBJECTS}
${CC} -o subread-align core-interface-aligner.c ${ALL_OBJECTS} ${LDFLAGS}
subjunc: core-interface-subjunc.c ${ALL_OBJECTS}
${CC} -o subjunc core-interface-subjunc.c ${ALL_OBJECTS} ${LDFLAGS}
subtools: subtools.c ${ALL_OBJECTS}
${CC} -o subtools subtools.c ${ALL_OBJECTS} ${LDFLAGS}
qualityScores: qualityScores.c ${ALL_OBJECTS}
${CC} -o qualityScores qualityScores.c ${ALL_OBJECTS} ${LDFLAGS}
subread-fullscan: fullscan.c ${ALL_OBJECTS}
${CC} -o subread-fullscan fullscan.c ${ALL_OBJECTS} ${LDFLAGS}
clean:
rm -f core featureCounts exactSNP removeDup subread-buildindex ${ALL_OBJECTS}
......@@ -91,7 +91,7 @@ struct SNP_Calling_Parameters{
HashTable * cigar_event_table;
char * rebuilt_command_line;
unsigned long long int all_mapped_bases;
srInt_64 all_mapped_bases;
unsigned int fisher_normalisation_target;
double start_time;
......@@ -568,7 +568,7 @@ void fishers_test_on_block(struct SNP_Calling_Parameters * parameters, float * s
//#warning " ===================== If a known SNP is at POI, the Fisher's p-value is only compared with the 'upper bound' of the p-value. ====================="
//#warning " ===================== '1 &&' is the switch ========================"
if(all_result_needed || ( 1 && Known_SNP_here && p_middle < parameters -> cutoff_upper_bound ) || ( p_middle < p_cutoff && flanking_matched*20>(flanking_matched+ flanking_unmatched )*16))
if(all_result_needed || ( 0 && Known_SNP_here && p_middle < parameters -> cutoff_upper_bound ) || ( p_middle < p_cutoff && flanking_matched*20>(flanking_matched+ flanking_unmatched )*16))
snp_fisher_raw [i] = p_middle;
else snp_fisher_raw [i] = -999;
......
......@@ -3,7 +3,9 @@
#include <string.h>
#include <assert.h>
#include <unistd.h>
#ifndef __MINGW32__
#include <sys/mman.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
......
......@@ -678,7 +678,7 @@ int localPointerCmp_forEventEntry(const void *pointer1, const void *pointer2)
return v1!=v2;
}
unsigned long localPointerHashFunction_forEventEntry(const void *pointer)
srUInt_64 localPointerHashFunction_forEventEntry(const void *pointer)
{
unsigned int v = (pointer-NULL);
return (unsigned long) (v << 24) ^ (v>>8);
......
......@@ -48,6 +48,7 @@ static struct option long_options[] =
{"fast", no_argument, 0, 0},
{"SAMinput", no_argument, 0, 0},
{"reportPairedMultiBest", no_argument, 0, 0},
{"BCLinput", no_argument, 0, 0},
{"sv", no_argument, 0, 0},
{"longDel", no_argument, 0, 0},
{"exonAnnotationScreenOut", required_argument, 0, 0},
......@@ -495,6 +496,10 @@ int parse_opts_aligner(int argc , char ** argv, global_context_t * global_contex
{
global_context->config.memory_use_multiplex = atof(optarg);
}
else if(strcmp("BCLinput", long_options[option_index].name)==0)
{
global_context->config.is_BCL_input=1;
}
else if(strcmp("rg-id", long_options[option_index].name)==0)
{
strcpy(global_context->config.read_group_id, optarg);
......
......@@ -37,6 +37,7 @@ static struct option long_options[] =
{"exonFormat", required_argument, 0, 'F'},
{"gtfAttr", required_argument, 0, 0},
{"gtfFeature", required_argument, 0, 0},
{"BCLinput", no_argument, 0, 0},
{"rg", required_argument, 0, 0},
{"rg-id", required_argument, 0, 0},
{"gzFASTQinput", no_argument, 0, 0},
......@@ -501,6 +502,10 @@ int parse_opts_subjunc(int argc , char ** argv, global_context_t * global_contex
{
global_context->config.ignore_unmapped_reads = 1;
}
else if(strcmp("BCLinput", long_options[option_index].name)==0)
{
global_context->config.is_BCL_input=1;
}
else if(strcmp("rg-id", long_options[option_index].name)==0)
{
strcpy(global_context->config.read_group_id, optarg);
......
......@@ -44,31 +44,6 @@ unsigned int abs32uint(unsigned int x){
return x;
}
int localPointerCmp_forbed(const void *pointer1, const void *pointer2)
{
paired_exon_key *p1 = (paired_exon_key *)pointer1;
paired_exon_key *p2 = (paired_exon_key *)pointer2;
return !((p1-> big_key == p2 -> big_key) && (p2-> small_key == p1-> small_key));
}
unsigned long localPointerHashFunction_forbed(const void *pointer)
{
paired_exon_key *p = (paired_exon_key *)pointer;
return p-> big_key ^ p-> small_key ^ (p->big_key>> 15);
}
int localPointerCmp_forpos(const void *pointer1, const void *pointer2)
{
return pointer1 != pointer2;
}
unsigned long localPointerHashFunction_forpos(const void *pointer)
{
return (unsigned long) pointer & 0xffffffff;
}
typedef struct{
unsigned int piece_main_abs_offset;
unsigned int piece_minor_abs_offset;
......@@ -1223,7 +1198,7 @@ void copy_vote_to_alignment_res(global_context_t * global_context, thread_contex
if(0 && FIXLENstrcmp("R000404427", read_name) == 0)
{
SUBREADprintf("OVL=%d, DIST=%llu\n", overlapped, abs(dist));
SUBREADprintf("OVL=%d, DIST=%u\n", overlapped, (unsigned int)abs(dist));
}
if(overlapped > 14) continue;
......@@ -1452,7 +1427,7 @@ int process_voting_junction_PE_juncs( global_context_t * global_context, thread_
int this_ii_path[ MAX_CLUSTER_ELEMENTS ], this_jj_path[ MAX_CLUSTER_ELEMENTS ], this_masks [ MAX_CLUSTER_ELEMENTS ];
align_cluster(global_context, thread_context, cluster_buffer + x1, read_name_1, read_name_2, read_text_1, read_text_2, read_len_1, read_len_2, is_negative_strand, vote_1, vote_2, &this_score, this_ii_path, this_jj_path, this_masks, &path_len, &R1R2_mapped);
if(0 && FIXLENstrcmp("V0112_0155:7:1101:7309:2770", read_name_1)==0)
if(0 && FIXLENstrcmp("R00000003493", read_name_1)==0)
SUBREADprintf("REAE_TEST : R12MAP=%d, PATHLEN=%d, SCORE=%d\n", R1R2_mapped, path_len, this_score);
if(this_score > 0){
......@@ -2259,7 +2234,7 @@ int process_voting_junction_PE_topK(global_context_t * global_context, thread_co
update_top_three(global_context, top_three_buff, current_vote -> votes[i][j]);
}
//SUBREADprintf("3N [R %d] =%d,%d,%d\n", 1+is_second_read, top_three_buff[0], top_three_buff[1], top_three_buff[2]);
if(0 && FIXLENstrcmp("R00000003493",read_name_1)==0)SUBREADprintf("3N [R %d] =%d,%d,%d\n", 1+is_second_read, top_three_buff[0], top_three_buff[1], top_three_buff[2]);
for(i = 0; i < global_context -> config.multi_best_reads; i++)
{
......@@ -2269,7 +2244,7 @@ int process_voting_junction_PE_topK(global_context_t * global_context, thread_co
update_top_three(global_context, top_three_buff, old_result -> selected_votes);
}
}
//SUBREADprintf("3Q [R %d] =%d,%d,%d\n", 1+is_second_read, top_three_buff[0], top_three_buff[1], top_three_buff[2]);
if(0 && FIXLENstrcmp("R00000003493",read_name_1)==0)SUBREADprintf("3Q [R %d] =%d,%d,%d\n", 1+is_second_read, top_three_buff[0], top_three_buff[1], top_three_buff[2]);
}
......@@ -3371,14 +3346,12 @@ unsigned int finalise_explain_CIGAR(global_context_t * global_context, thread_co
}
//if(explain_context -> pair_number == 999999)
// ACDB PVDB TTTS
//#warning " ========== COMMENT THIS LINE !! ========="
if(0 && FIXLENstrcmp("simulated.11420793", explain_context -> read_name) ==0){
if(0 && FIXLENstrcmp("R00000110641", explain_context -> read_name) ==0){
char outpos1[100];
absoffset_to_posstr(global_context, final_position, outpos1);
SUBREADprintf("FINALQUAL %s : FINAL_POS=%s ( %u )\tCIGAR=%s\tMM=%d / MAPLEN=%d > %d?\tVOTE=%d > %0.2f x %d ? MASK=%d\tQUAL=%d\tBRNO=%d\nKNOWN_JUNCS=%d PENALTY=%d\n\n", explain_context -> read_name, outpos1 , final_position , tmp_cigar, mismatch_bases, non_clipped_length, applied_mismatch, result -> selected_votes, global_context -> config.minimum_exonic_subread_fraction,result-> used_subreads_in_vote, result->result_flags, final_qual, explain_context -> best_read_id, known_junction_supp, explain_context -> best_indel_penalty);
exit(0);
}
......@@ -3518,7 +3491,7 @@ void print_big_margin(global_context_t * global_context, subread_read_number_t p
unsigned short * big_margin_record = _global_retrieve_big_margin_ptr(global_context,pair_number, is_second_read);
int x1;
SUBREADprintf("\n >>> READ_NO=%llu, SECOND=%d, MEM=%p <<< \n", pair_number, is_second_read, big_margin_record);
SUBREADprintf("\n >>> READ_NO=%u, SECOND=%d, MEM=%p <<< \n", (unsigned int)pair_number, is_second_read, big_margin_record);
for(x1 = 0; x1 < global_context->config.big_margin_record_size/3 ; x1++)
{
SUBREADprintf("%d %d~%d ", big_margin_record[x1*3] , big_margin_record[x1*3+1] , big_margin_record[x1*3+2]);
......@@ -5791,7 +5764,7 @@ int find_translocation_brk_PQR(global_context_t * global_context, mapping_result
unsigned int event_no_R = event_ptr_list_R[candRi] - NULL;
chromosome_event_t * event_body_R = indel_context -> event_space_dynamic + event_no_R;
long long cand_R_dist_to_Q = is_Q_small_side_close_to_P?event_body_Q -> event_large_side:event_body_Q -> event_small_side;
srInt_64 cand_R_dist_to_Q = is_Q_small_side_close_to_P?event_body_Q -> event_large_side:event_body_Q -> event_small_side;
cand_R_dist_to_Q -= is_Q_small_side_close_to_P?event_body_R -> event_large_side:event_body_R-> event_small_side;
SUBREADprintf("R: candDist=%lld, DIR = %c %c\n", cand_R_dist_to_Q, event_body_Q -> small_side_increasing_coordinate?'>':'<', event_body_Q -> large_side_increasing_coordinate?'>':'<');
......@@ -6255,7 +6228,7 @@ void finalise_inversions(global_context_t * global_context){
}
int found_INV_frags = 0;
unsigned long long guessed_Z_large_abs_sum = 0, guessed_Y_small_abs_sum = 0;
srInt_64 guessed_Z_large_abs_sum = 0, guessed_Y_small_abs_sum = 0;
for(xk1 = 0; xk1 < s1_list_items; xk1++){
for(xk2 = 0; xk2 < s2_list_items ; xk2 ++){
......@@ -6291,7 +6264,7 @@ void finalise_inversions(global_context_t * global_context){
guessed_Y_small_abs_sum /= found_INV_frags;
guessed_Z_large_abs_sum /= found_INV_frags;
SUBREADprintf("INVLOG: GUESSED_YZ=%llu, %llu\n", guessed_Y_small_abs_sum, guessed_Z_large_abs_sum);
SUBREADprintf("INVLOG: GUESSED_YZ=%lld, %lld\n", guessed_Y_small_abs_sum, guessed_Z_large_abs_sum);
locate_gene_position(q_res_1 -> selected_position, &global_context -> chromosome_table, &q_small_chro, &q_small_pos);
int cand_Y, cand_Z;
......@@ -6494,10 +6467,10 @@ void build_breakpoint_tables(global_context_t * global_context){
}
void finalise_structural_variances(global_context_t * global_context){
SUBREADprintf("Funky Tables: A:%llu, BC:%llu, DE:%llu\n", global_context -> funky_list_A.fragments, global_context -> funky_table_BC.fragments / 2, global_context -> funky_list_DE.fragments);
SUBREADprintf("Funky Tables: A:%u, BC:%u, DE:%u\n", (unsigned int) global_context -> funky_list_A.fragments, (unsigned int)global_context -> funky_table_BC.fragments / 2, (unsigned int)global_context -> funky_list_DE.fragments);
build_breakpoint_tables(global_context);
SUBREADprintf("Breakpoint Tables: P:%llu, QR:%llu, YZ:%llu\n", global_context -> breakpoint_table_P.fragments, global_context -> breakpoint_table_QR.fragments, global_context -> breakpoint_table_YZ.fragments);
SUBREADprintf("Breakpoint Tables: P:%u, QR:%u, YZ:%u\n", (unsigned int)global_context -> breakpoint_table_P.fragments, (unsigned int)global_context -> breakpoint_table_QR.fragments, (unsigned int)global_context -> breakpoint_table_YZ.fragments);
finalise_translocations(global_context);
finalise_inversions(global_context);
}
This diff is collapsed.