[med-svn] [rsem] 01/01: some manpages; suggest r-bioc-ebseq, pass in CXXFLAGS, CPPFLAGS, and LDFLAGS

Michael Crusoe misterc-guest at moszumanska.debian.org
Thu Aug 27 20:29:03 UTC 2015


This is an automated email from the git hooks/post-receive script.

misterc-guest pushed a commit to branch master
in repository rsem.

commit e91aa5964737417bb00b2a276035e186a31c15f6
Author: Michael R. Crusoe <mcrusoe at msu.edu>
Date:   Mon Feb 16 20:20:51 2015 -0500

    some manpages; suggest r-bioc-ebseq, pass in CXXFLAGS, CPPFLAGS, and LDFLAGS
    
    and document patches
---
 debian/changelog                      |   2 +-
 debian/control                        |   1 +
 debian/convert-sam-for-rsem.1         | 177 +++++++++++
 debian/patches/fix-boost              |   2 +
 debian/patches/fix-sam-includes       |   2 +
 debian/patches/ignore-sam             |   2 +
 debian/patches/series                 |   1 +
 debian/patches/use-flags              | 119 +++++++
 debian/rsem-calculate-expression.1    | 571 ++++++++++++++++++++++++++++++++++
 debian/rsem-control-fdr.1             | 177 +++++++++++
 debian/rsem-generate-ngvector.1       | 193 ++++++++++++
 debian/rsem-plot-transcript-wiggles.1 | 199 ++++++++++++
 debian/rsem-prepare-reference.1       | 274 ++++++++++++++++
 debian/rsem-run-ebseq.1               | 199 ++++++++++++
 debian/rsem.manpages                  |   1 +
 debian/rules                          |   2 +-
 16 files changed, 1920 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 635f715..28e1cbc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,4 +2,4 @@ rsem (1.2.19+dfsg-1) UNRELEASED; urgency=low
 
   * Initial release (Closes: #778578)
 
- -- Michael R. Crusoe <mcrusoe at msu.edu>  Thu, 12 Feb 2015 09:24:20 +0100
+ -- Michael R. Crusoe <mcrusoe at msu.edu>  Thu, 27 Aug 2015 13:17:53 -0400
diff --git a/debian/control b/debian/control
index 82eec1c..12db36f 100644
--- a/debian/control
+++ b/debian/control
@@ -20,6 +20,7 @@ Depends: ${shlibs:Depends},
          ${perl:Depends},
          r-base-core,
          bowtie | bowtie2
+Suggests: r-bioc-ebseq
 Description: RNA-Seq by Expectation-Maximization
  RSEM is a software package for estimating gene and isoform expression
  levels from RNA-Seq data. The RSEM package provides an user-friendly
diff --git a/debian/convert-sam-for-rsem.1 b/debian/convert-sam-for-rsem.1
new file mode 100644
index 0000000..89d8281
--- /dev/null
+++ b/debian/convert-sam-for-rsem.1
@@ -0,0 +1,177 @@
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+.    ds C`
+.    ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+.    if \nF \{
+.        de IX
+.        tm Index:\\$1\t\\n%\t"\\$2"
+..
+.        if !\nF==2 \{
+.            nr % 0
+.            nr F 2
+.        \}
+.    \}
+.\}
+.rr rF
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "CONVERT-SAM-FOR-RSEM 1"
+.TH CONVERT-SAM-FOR-RSEM 1 "2015-02-02" "perl v5.18.2" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+convert\-sam\-for\-rsem
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+convert-sam-for-rsem [options] <input.sam/input.bam> output_file_name
+.SH "ARGUMENTS"
+.IX Header "ARGUMENTS"
+.IP "\fBinput.sam/input.bam\fR" 4
+.IX Item "input.sam/input.bam"
+The \s-1SAM\s0 or \s-1BAM\s0 file generated by user's aligner. We require this file contains the header section. If input is a \s-1SAM\s0 file, it must end with suffix 'sam' (case insensitive). If input is a \s-1BAM\s0 file, it must end with suffix 'bam' (case insensitive).
+.IP "\fBoutput_file_name\fR" 4
+.IX Item "output_file_name"
+The output name for the converted file. 'convert\-sam\-for\-rsem' will output a \s-1BAM\s0 with the name 'output_file_name.bam'.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-T/\-\-temporary\-directory\fR <directory>" 4
+.IX Item "-T/--temporary-directory <directory>"
+\&'convert\-sam\-for\-rsem' will call 'sort' command and this is the '\-T/\-\-temporary\-directory' option of 'sort' command. The following is the description from 'sort' : \*(L"use \s-1DIR\s0 for temporaries, not \f(CW$TMPDIR\fR or /tmp; multiple options specify multiple directories\*(R".
+.IP "\fB\-h/\-\-help\fR" 4
+.IX Item "-h/--help"
+Show help information.
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This program converts the \s-1SAM/BAM\s0 file generated by user's aligner into a \s-1BAM\s0 file which \s-1RSEM\s0 can process. However, users should make sure their aligners use 'reference_name.idx.fa' generated by 'rsem\-prepare\-reference' as their references and output header sections. This program will create a temporary directory called 'output_file_name.bam.temp' to store the intermediate files. The directory will be deleted automatically after the conversion. After the conversion [...]
+.PP
+Note: You do not need to run this script if `rsem\-sam\-validator' reports that your \s-1SAM/BAM\s0 file is valid.
+.PP
+Note: This program does not check the correctness of input file. You should make sure the input is a valid \s-1SAM/BAM\s0 format file.
+.SH "EXAMPLES"
+.IX Header "EXAMPLES"
+Suppose input is set to 'input.sam' and output file name is \*(L"output\*(R"
+.PP
+.Vb 1
+\& convert\-sam\-for\-rsem input.sam output
+.Ve
+.PP
+We will get a file called 'output.bam' as output.
diff --git a/debian/patches/fix-boost b/debian/patches/fix-boost
index 461930b..e39bbd8 100644
--- a/debian/patches/fix-boost
+++ b/debian/patches/fix-boost
@@ -1,3 +1,5 @@
+Description: use Debian's boost library
+Author: Michael R. Crusoe <crusoe at ucdavis.edu>
 --- rsem.orig/Makefile
 +++ rsem/Makefile
 @@ -1,6 +1,6 @@
diff --git a/debian/patches/fix-sam-includes b/debian/patches/fix-sam-includes
index d0cdc83..97ddc31 100644
--- a/debian/patches/fix-sam-includes
+++ b/debian/patches/fix-sam-includes
@@ -1,3 +1,5 @@
+Description: correct the samtools includes to match standard paths
+Author: Michael R. Crusoe <crusoe at ucdavis.edu>
 --- rsem.orig/BamConverter.h
 +++ rsem/BamConverter.h
 @@ -8,8 +8,8 @@
diff --git a/debian/patches/ignore-sam b/debian/patches/ignore-sam
index 49d4edc..b2419ab 100644
--- a/debian/patches/ignore-sam
+++ b/debian/patches/ignore-sam
@@ -1,3 +1,5 @@
+Description: don't build local copy of samtools
+Author: Michael R. Crusoe <crusoe at ucdavis.edu>
 --- a/Makefile
 +++ b/Makefile
 @@ -7,9 +7,6 @@
diff --git a/debian/patches/series b/debian/patches/series
index f6f726a..9f33cee 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 ignore-sam
 fix-sam-includes
 fix-boost
+use-flags
diff --git a/debian/patches/use-flags b/debian/patches/use-flags
new file mode 100644
index 0000000..163dcd2
--- /dev/null
+++ b/debian/patches/use-flags
@@ -0,0 +1,119 @@
+Description: pass CXXFLAGS to compiler
+Author: Michael R. Crusoe <crusoe at ucdavis.edu>
+--- a/Makefile
++++ b/Makefile
+@@ -12,10 +12,10 @@
+ Transcripts.h : utils.h my_assert.h Transcript.h
+ 
+ rsem-extract-reference-transcripts : utils.h my_assert.h GTFItem.h Transcript.h Transcripts.h extractRef.cpp
+-	$(CC) -Wall -O3 extractRef.cpp -o rsem-extract-reference-transcripts
++	$(CC) $(LDFLAGS) $(CPPFLAGS) $(CXXFLAGS) -Wall -O3 extractRef.cpp -o rsem-extract-reference-transcripts
+ 
+ rsem-synthesis-reference-transcripts : utils.h my_assert.h Transcript.h Transcripts.h synthesisRef.cpp
+-	$(CC) -Wall -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts
++	$(CC) $(LDFLAGS) $(CPPFLAGS) $(CXXFLAGS) -Wall -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts
+ 
+ BowtieRefSeqPolicy.h : RefSeqPolicy.h
+ 
+@@ -25,10 +25,10 @@
+ 
+ 
+ rsem-preref : preRef.o
+-	$(CC) preRef.o -o rsem-preref
++	$(CC) $(CPPFLAGS) $(LDFLAGS) preRef.o -o rsem-preref
+ 
+ preRef.o : utils.h RefSeq.h Refs.h PolyARules.h RefSeqPolicy.h AlignerRefSeqPolicy.h preRef.cpp
+-	$(CC) $(COFLAGS) preRef.cpp
++	$(CC) $(CPPFLAGS) $(CXXFLAGS) $(COFLAGS) preRef.cpp
+ 
+ 
+ SingleRead.h : Read.h
+@@ -49,14 +49,14 @@
+ 
+ 
+ rsem-parse-alignments : parseIt.o
+-	$(CC) -o rsem-parse-alignments parseIt.o /usr/lib/libbam.a -lz -lpthread 
++	$(CC) $(LDFLAGS) -o rsem-parse-alignments parseIt.o /usr/lib/libbam.a -lz -lpthread 
+ 
+ parseIt.o : utils.h GroupInfo.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h HitContainer.h SamParser.h Transcripts.h parseIt.cpp
+-	$(CC) -Wall -O2 -c -I. parseIt.cpp
++	$(CC) $(CPPFLAGS) $(CXXFLAGS) -Wall -O2 -c -I. parseIt.cpp
+ 
+ 
+ rsem-build-read-index : utils.h buildReadIndex.cpp
+-	$(CC) -O3 buildReadIndex.cpp -o rsem-build-read-index
++	$(CC) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index
+ 
+ 
+ ReadReader.h : SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h ReadIndex.h
+@@ -78,55 +78,55 @@
+ WriteResults.h : utils.h my_assert.h GroupInfo.h Transcript.h Transcripts.h RefSeq.h Refs.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h
+ 
+ rsem-run-em : EM.o
+-	$(CC) -o rsem-run-em EM.o /usr/lib/libbam.a -lz -lpthread
++	$(CC) $(LDFLAGS) -o rsem-run-em EM.o /usr/lib/libbam.a -lz -lpthread
+ 
+ EM.o : utils.h my_assert.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h Refs.h GroupInfo.h HitContainer.h ReadIndex.h ReadReader.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h ModelParams.h RefSeq.h RefSeqPolicy.h PolyARules.h Profile.h NoiseProfile.h Transcript.h Transcripts.h HitWrapper.h BamWriter.h simul.h sam_rsem_aux.h sampling.h WriteRes [...]
+-	$(CC) $(COFLAGS) EM.cpp
++	$(CC) $(CPPFLAGS) $(COFLAGS) $(CXXFLAGS) EM.cpp
+ 
+ BamConverter.h : utils.h my_assert.h sam_rsem_aux.h sam_rsem_cvt.h bc_aux.h Transcript.h Transcripts.h
+ 
+ rsem-tbam2gbam : utils.h Transcripts.h Transcript.h bc_aux.h BamConverter.h sam_rsem_aux.h sam_rsem_cvt.h tbam2gbam.cpp
+-	$(CC) -O3 -Wall tbam2gbam.cpp /usr/lib/libbam.a -lz -lpthread -o $@
++	$(CC) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -O3 -Wall tbam2gbam.cpp /usr/lib/libbam.a -lz -lpthread -o $@
+ 
+ rsem-bam2wig : utils.h my_assert.h wiggle.h wiggle.o bam2wig.cpp
+-	$(CC) -O3 -Wall bam2wig.cpp wiggle.o /usr/lib/libbam.a -lz -lpthread -o $@
++	$(CC) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -O3 -Wall bam2wig.cpp wiggle.o /usr/lib/libbam.a -lz -lpthread -o $@
+ 
+ rsem-bam2readdepth : utils.h my_assert.h wiggle.h wiggle.o bam2readdepth.cpp
+-	$(CC) -O3 -Wall bam2readdepth.cpp wiggle.o /usr/lib/libbam.a -lz -lpthread -o $@
++	$(CC) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -O3 -Wall bam2readdepth.cpp wiggle.o /usr/lib/libbam.a -lz -lpthread -o $@
+ 
+ wiggle.o: wiggle.cpp wiggle.h
+-	$(CC) $(COFLAGS) wiggle.cpp
++	$(CC) $(CPPFLAGS) $(COFLAGS) $(CXXFLAGS) wiggle.cpp
+ 
+ rsem-simulate-reads : simulation.o
+-	$(CC) -o rsem-simulate-reads simulation.o
++	$(CC) $(CPPFLAGS) $(LDFLAGS) -o rsem-simulate-reads simulation.o
+ 
+ simulation.o : utils.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h Refs.h RefSeq.h GroupInfo.h Transcript.h Transcripts.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h Profile.h NoiseProfile.h simul.h WriteResults.h simulation.cpp
+-	$(CC) $(COFLAGS) simulation.cpp
++	$(CC) $(CPPFLAGS) $(COFLAGS) $(CXXFLAGS) simulation.cpp
+ 
+ rsem-run-gibbs : Gibbs.o
+-	$(CC) -o rsem-run-gibbs Gibbs.o -lpthread
++	$(CC) $(CPPFLAGS) $(LDFLAGS) -o rsem-run-gibbs Gibbs.o -lpthread
+ 
+ #some header files are omitted
+ Gibbs.o : utils.h my_assert.h sampling.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h RefSeq.h RefSeqPolicy.h PolyARules.h Refs.h GroupInfo.h WriteResults.h Gibbs.cpp 
+-	$(CC) $(COFLAGS) Gibbs.cpp
++	$(CC) $(CPPFLAGS) $(COFLAGS) $(CXXFLAGS) Gibbs.cpp
+ 
+ Buffer.h : my_assert.h
+ 
+ rsem-calculate-credibility-intervals : calcCI.o
+-	$(CC) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
++	$(CC) $(CPPFLAGS) $(LDFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
+ 
+ #some header files are omitted
+ calcCI.o : utils.h my_assert.h sampling.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h RefSeq.h RefSeqPolicy.h PolyARules.h Refs.h GroupInfo.h WriteResults.h Buffer.h calcCI.cpp
+-	$(CC) $(COFLAGS) calcCI.cpp
++	$(CC) $(CPPFLAGS) $(COFLAGS) $(CXXFLAGS) calcCI.cpp
+ 
+ rsem-get-unique : getUnique.cpp
+-	$(CC) -O3 -Wall getUnique.cpp /usr/lib/libbam.a -lz -lpthread -o $@
++	$(CC) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -O3 -Wall getUnique.cpp /usr/lib/libbam.a -lz -lpthread -o $@
+ 
+ rsem-sam-validator : my_assert.h samValidator.cpp
+-	$(CC) -O3 -Wall samValidator.cpp /usr/lib/libbam.a -lz -lpthread -o $@
++	$(CC) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -O3 -Wall samValidator.cpp /usr/lib/libbam.a -lz -lpthread -o $@
+ 
+ rsem-scan-for-paired-end-reads : my_assert.h scanForPairedEndReads.cpp
+-	$(CC) -O3 -Wall scanForPairedEndReads.cpp /usr/lib/libbam.a -lz -lpthread -o $@
++	$(CC) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -O3 -Wall scanForPairedEndReads.cpp /usr/lib/libbam.a -lz -lpthread -o $@
+ 
+ ebseq :
+ 	cd EBSeq ; ${MAKE} all
diff --git a/debian/rsem-calculate-expression.1 b/debian/rsem-calculate-expression.1
new file mode 100644
index 0000000..e0bba49
--- /dev/null
+++ b/debian/rsem-calculate-expression.1
@@ -0,0 +1,571 @@
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+.    ds C`
+.    ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+.    if \nF \{
+.        de IX
+.        tm Index:\\$1\t\\n%\t"\\$2"
+..
+.        if !\nF==2 \{
+.            nr % 0
+.            nr F 2
+.        \}
+.    \}
+.\}
+.rr rF
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "RSEM-CALCULATE-EXPRESSION 1"
+.TH RSEM-CALCULATE-EXPRESSION 1 "2015-02-02" "perl v5.18.2" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+rsem\-calculate\-expression
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 3
+\& rsem\-calculate\-expression [options] upstream_read_file(s) reference_name sample_name 
+\& rsem\-calculate\-expression [options] \-\-paired\-end upstream_read_file(s) downstream_read_file(s) reference_name sample_name 
+\& rsem\-calculate\-expression [options] \-\-sam/\-\-bam [\-\-paired\-end] input reference_name sample_name
+.Ve
+.SH "ARGUMENTS"
+.IX Header "ARGUMENTS"
+.IP "\fBupstream_read_files(s)\fR" 4
+.IX Item "upstream_read_files(s)"
+Comma-separated list of files containing single-end reads or upstream reads for paired-end data.  By default, these files are assumed to be in \s-1FASTQ\s0 format.  If the \-\-no\-qualities option is specified, then \s-1FASTA\s0 format is expected.
+.IP "\fBdownstream_read_file(s)\fR" 4
+.IX Item "downstream_read_file(s)"
+Comma-separated list of files containing downstream reads which are paired with the upstream reads.  By default, these files are assumed to be in \s-1FASTQ\s0 format.  If the \-\-no\-qualities option is specified, then \s-1FASTA\s0 format is expected.
+.IP "\fBinput\fR" 4
+.IX Item "input"
+\&\s-1SAM/BAM\s0 formatted input file.  If \*(L"\-\*(R" is specified for the filename, \s-1SAM/BAM\s0 input is instead assumed to come from standard input. \s-1RSEM\s0 requires all alignments of the same read group together. For paired-end reads, \s-1RSEM\s0 also requires the two mates of any alignment be adjacent. See Description section for how to make input file obey \s-1RSEM\s0's requirements.
+.IP "\fBreference_name\fR" 4
+.IX Item "reference_name"
+The name of the reference used.  The user must have run 'rsem\-prepare\-reference' with this reference_name before running this program.
+.IP "\fBsample_name\fR" 4
+.IX Item "sample_name"
+The name of the sample analyzed. All output files are prefixed by this name (e.g., sample_name.genes.results)
+.SH "BASIC OPTIONS"
+.IX Header "BASIC OPTIONS"
+.IP "\fB\-\-paired\-end\fR" 4
+.IX Item "--paired-end"
+Input reads are paired-end reads. (Default: off)
+.IP "\fB\-\-no\-qualities\fR" 4
+.IX Item "--no-qualities"
+Input reads do not contain quality scores. (Default: off)
+.IP "\fB\-\-strand\-specific\fR" 4
+.IX Item "--strand-specific"
+The RNA-Seq protocol used to generate the reads is strand specific, i.e., all (upstream) reads are derived from the forward strand.  This option is equivalent to \-\-forward\-prob=1.0.  With this option set, if \s-1RSEM\s0 runs the Bowtie/Bowtie 2 aligner, the '\-\-norc' Bowtie/Bowtie 2 option will be used, which disables alignment to the reverse strand of transcripts.  (Default: off)
+.IP "\fB\-\-bowtie2\fR" 4
+.IX Item "--bowtie2"
+Use Bowtie 2 instead of Bowtie to align reads. Since currently \s-1RSEM\s0 does not handle indel, local and discordant alignments, the Bowtie2 parameters are set in a way to avoid those alignments. In particular, we use options '\-\-sensitive \-\-dpad 0 \-\-gbar 99999999 \-\-mp 1,1 \-\-np 1 \-\-score\-min L,0,\-0.1' by default. The last parameter of '\-\-score\-min', '\-0.1', is the negative of maximum mismatch rate. This rate can be set by option '\-\-bowtie2\-mismatch\-rate'. If reads  [...]
+.IP "\fB\-\-sam\fR" 4
+.IX Item "--sam"
+Input file is in \s-1SAM\s0 format. (Default: off)
+.IP "\fB\-\-bam\fR" 4
+.IX Item "--bam"
+Input file is in \s-1BAM\s0 format. (Default: off)
+.IP "\fB\-p/\-\-num\-threads\fR <int>" 4
+.IX Item "-p/--num-threads <int>"
+Number of threads to use. Both Bowtie/Bowtie2, expression estimation and 'samtools sort' will use this many threads. (Default: 1)
+.IP "\fB\-\-no\-bam\-output\fR" 4
+.IX Item "--no-bam-output"
+Do not output any \s-1BAM\s0 file. (Default: off)
+.IP "\fB\-\-output\-genome\-bam\fR" 4
+.IX Item "--output-genome-bam"
+Generate a \s-1BAM\s0 file, 'sample_name.genome.bam', with alignments mapped to genomic coordinates and annotated with their posterior probabilities. In addition, \s-1RSEM\s0 will call samtools (included in \s-1RSEM\s0 package) to sort and index the bam file. 'sample_name.genome.sorted.bam' and 'sample_name.genome.sorted.bam.bai' will be generated. (Default: off)
+.IP "\fB\-\-sampling\-for\-bam\fR" 4
+.IX Item "--sampling-for-bam"
+When \s-1RSEM\s0 generates a \s-1BAM\s0 file, instead of outputing all alignments a read has with their posterior probabilities, one alignment is sampled according to the posterior probabilities. The sampling procedure includes the alignment to the \*(L"noise\*(R" transcript, which does not appear in the \s-1BAM\s0 file. Only the sampled alignment has a weight of 1. All other alignments have weight 0. If the \*(L"noise\*(R" transcript is sampled, all alignments appeared in the \s-1BAM\s0 [...]
+.IP "\fB\-\-seed\fR <uint32>" 4
+.IX Item "--seed <uint32>"
+Set the seed for the random number generators used in calculating posterior mean estimates and credibility intervals. The seed must be a non-negative 32 bit interger. (Default: off)
+.IP "\fB\-\-calc\-pme\fR" 4
+.IX Item "--calc-pme"
+Run \s-1RSEM\s0's collapsed Gibbs sampler to calculate posterior mean estimates. (Default: off)
+.IP "\fB\-\-calc\-ci\fR" 4
+.IX Item "--calc-ci"
+Calculate 95% credibility intervals and posterior mean estimates. The credibility level can be changed by setting '\-\-ci\-credibility\-level'. (Default: off)
+.IP "\fB\-q/\-\-quiet\fR" 4
+.IX Item "-q/--quiet"
+Suppress the output of logging information. (Default: off)
+.IP "\fB\-h/\-\-help\fR" 4
+.IX Item "-h/--help"
+Show help information.
+.IP "\fB\-\-version\fR" 4
+.IX Item "--version"
+Show version information.
+.SH "ADVANCED OPTIONS"
+.IX Header "ADVANCED OPTIONS"
+.IP "\fB\-\-sam\-header\-info\fR <file>" 4
+.IX Item "--sam-header-info <file>"
+\&\s-1RSEM\s0 reads header information from input by default. If this option is on, header information is read from the specified file. For the format of the file, please see \s-1SAM\s0 official website. (Default: "")
+.IP "\fB\-\-seed\-length\fR <int>" 4
+.IX Item "--seed-length <int>"
+Seed length used by the read aligner.  Providing the correct value is important for \s-1RSEM.\s0 If \s-1RSEM\s0 runs Bowtie, it uses this value for Bowtie's seed length parameter. Any read with its or at least one of its mates' (for paired-end reads) length less than this value will be ignored. If the references are not added poly(A) tails, the minimum allowed value is 5, otherwise, the minimum allowed value is 25. Note that this script will only check if the value >= 5 and give a warnin [...]
+.IP "\fB\-\-tag\fR <string>" 4
+.IX Item "--tag <string>"
+The name of the optional field used in the \s-1SAM\s0 input for identifying a read with too many valid alignments. The field should have the format <tagName>:i:<value>, where a <value> bigger than 0 indicates a read with too many alignments. (Default: "")
+.IP "\fB\-\-bowtie\-path\fR <path>" 4
+.IX Item "--bowtie-path <path>"
+The path to the Bowtie executables. (Default: the path to the Bowtie executables is assumed to be in the user's \s-1PATH\s0 environment variable)
+.IP "\fB\-\-bowtie\-n\fR <int>" 4
+.IX Item "--bowtie-n <int>"
+(Bowtie parameter) max # of mismatches in the seed. (Range: 0\-3, Default: 2)
+.IP "\fB\-\-bowtie\-e\fR <int>" 4
+.IX Item "--bowtie-e <int>"
+(Bowtie parameter) max sum of mismatch quality scores across the alignment. (Default: 99999999)
+.IP "\fB\-\-bowtie\-m\fR <int>" 4
+.IX Item "--bowtie-m <int>"
+(Bowtie parameter) suppress all alignments for a read if > <int> valid alignments exist. (Default: 200)
+.IP "\fB\-\-bowtie\-chunkmbs\fR <int>" 4
+.IX Item "--bowtie-chunkmbs <int>"
+(Bowtie parameter) memory allocated for best first alignment calculation (Default: 0 \- use Bowtie's default)
+.IP "\fB\-\-phred33\-quals\fR" 4
+.IX Item "--phred33-quals"
+Input quality scores are encoded as Phred+33. (Default: on)
+.IP "\fB\-\-phred64\-quals\fR" 4
+.IX Item "--phred64-quals"
+Input quality scores are encoded as Phred+64 (default for \s-1GA\s0 Pipeline ver. >= 1.3). (Default: off)
+.IP "\fB\-\-solexa\-quals\fR" 4
+.IX Item "--solexa-quals"
+Input quality scores are solexa encoded (from \s-1GA\s0 Pipeline ver. < 1.3). (Default: off)
+.IP "\fB\-\-bowtie2\-path\fR <path>" 4
+.IX Item "--bowtie2-path <path>"
+(Bowtie 2 parameter) The path to the Bowtie 2 executables. (Default: the path to the Bowtie 2 executables is assumed to be in the user's \s-1PATH\s0 environment variable)
+.IP "\fB\-\-bowtie2\-mismatch\-rate\fR <double>" 4
+.IX Item "--bowtie2-mismatch-rate <double>"
+(Bowtie 2 parameter) The maximum mismatch rate allowed. (Default: 0.1)
+.IP "\fB\-\-bowtie2\-k\fR <int>" 4
+.IX Item "--bowtie2-k <int>"
+(Bowtie 2 parameter) Find up to <int> alignments per read. (Default: 200)
+.IP "\fB\-\-bowtie2\-sensitivity\-level\fR <string>" 4
+.IX Item "--bowtie2-sensitivity-level <string>"
+(Bowtie 2 parameter) Set Bowtie 2's preset options in \-\-end\-to\-end mode. This option controls how hard Bowtie 2 tries to find alignments. <string> must be one of \*(L"very_fast\*(R", \*(L"fast\*(R", \*(L"sensitive\*(R" and \*(L"very_sensitive\*(R". The four candidates correspond to Bowtie 2's \*(L"\-\-very\-fast\*(R", \*(L"\-\-fast\*(R", \*(L"\-\-sensitive\*(R" and \*(L"\-\-very\-sensitive\*(R" options. (Default: \*(L"sensitive\*(R" \- use Bowtie 2's default)
+.IP "\fB\-\-forward\-prob\fR <double>" 4
+.IX Item "--forward-prob <double>"
+Probability of generating a read from the forward strand of a transcript. Set to 1 for a strand-specific protocol where all (upstream) reads are derived from the forward strand, 0 for a strand-specific protocol where all (upstream) read are derived from the reverse strand, or 0.5 for a non-strand-specific protocol. (Default: 0.5)
+.IP "\fB\-\-fragment\-length\-min\fR <int>" 4
+.IX Item "--fragment-length-min <int>"
+Minimum read/insert length allowed. This is also the value for the Bowtie/Bowtie2 \-I option. (Default: 1)
+.IP "\fB\-\-fragment\-length\-max\fR <int>" 4
+.IX Item "--fragment-length-max <int>"
+Maximum read/insert length allowed. This is also the value for the Bowtie/Bowtie 2 \-X option. (Default: 1000)
+.IP "\fB\-\-fragment\-length\-mean\fR <double>" 4
+.IX Item "--fragment-length-mean <double>"
+(single-end data only) The mean of the fragment length distribution, which is assumed to be a Gaussian. (Default: \-1, which disables use of the fragment length distribution)
+.IP "\fB\-\-fragment\-length\-sd\fR <double>" 4
+.IX Item "--fragment-length-sd <double>"
+(single-end data only) The standard deviation of the fragment length distribution, which is assumed to be a Gaussian.  (Default: 0, which assumes that all fragments are of the same length, given by the rounded value of \fB\-\-fragment\-length\-mean\fR)
+.IP "\fB\-\-estimate\-rspd\fR" 4
+.IX Item "--estimate-rspd"
+Set this option if you want to estimate the read start position distribution (\s-1RSPD\s0) from data. Otherwise, \s-1RSEM\s0 will use a uniform \s-1RSPD. \s0(Default: off)
+.IP "\fB\-\-num\-rspd\-bins\fR <int>" 4
+.IX Item "--num-rspd-bins <int>"
+Number of bins in the \s-1RSPD.\s0 Only relevant when '\-\-estimate\-rspd' is specified.  Use of the default setting is recommended. (Default: 20)
+.IP "\fB\-\-gibbs\-burnin\fR <int>" 4
+.IX Item "--gibbs-burnin <int>"
+The number of burn-in rounds for \s-1RSEM\s0's Gibbs sampler. Each round passes over the entire data set once. If \s-1RSEM\s0 can use multiple threads, multiple Gibbs samplers will start at the same time and all samplers share the same burn-in number. (Default: 200)
+.IP "\fB\-\-gibbs\-number\-of\-samples\fR <int>" 4
+.IX Item "--gibbs-number-of-samples <int>"
+The total number of count vectors \s-1RSEM\s0 will collect from its Gibbs samplers. (Default: 1000)
+.IP "\fB\-\-gibbs\-sampling\-gap\fR <int>" 4
+.IX Item "--gibbs-sampling-gap <int>"
+The number of rounds between two succinct count vectors \s-1RSEM\s0 collects. If the count vector after round N is collected, the count vector after round N + <int> will also be collected. (Default: 1)
+.IP "\fB\-\-ci\-credibility\-level\fR <double>" 4
+.IX Item "--ci-credibility-level <double>"
+The credibility level for credibility intervals. (Default: 0.95)
+.IP "\fB\-\-ci\-memory\fR <int>" 4
+.IX Item "--ci-memory <int>"
+Maximum size (in memory, \s-1MB\s0) of the auxiliary buffer used for computing credibility intervals (\s-1CI\s0). Set it larger for a faster \s-1CI\s0 calculation. However, leaving 2 \s-1GB\s0 memory free for other usage is recommended. (Default: 1024)
+.IP "\fB\-\-ci\-number\-of\-samples\-per\-count\-vector\fR <int>" 4
+.IX Item "--ci-number-of-samples-per-count-vector <int>"
+The number of read generating probability vectors sampled per sampled count vector. The crebility intervals are calculated by first sampling P(C | D) and then sampling P(Theta | C) for each sampled count vector. This option controls how many Theta vectors are sampled per sampled count vector. (Default: 50)
+.IP "\fB\-\-samtools\-sort\-mem\fR <string>" 4
+.IX Item "--samtools-sort-mem <string>"
+Set the maximum memory per thread that can be used by 'samtools sort'. <string> represents the memory and accepts suffices 'K/M/G'. \s-1RSEM\s0 will pass <string> to the '\-m' option of 'samtools sort'.  Please note that the default used here is different from the default used by samtools. (Default: 1G)
+.IP "\fB\-\-keep\-intermediate\-files\fR" 4
+.IX Item "--keep-intermediate-files"
+Keep temporary files generated by \s-1RSEM.  RSEM\s0 creates a temporary directory, 'sample_name.temp', into which it puts all intermediate output files. If this directory already exists, \s-1RSEM\s0 overwrites all files generated by previous \s-1RSEM\s0 runs inside of it. By default, after \s-1RSEM\s0 finishes, the temporary directory is deleted.  Set this option to prevent the deletion of this directory and the intermediate files inside of it. (Default: off)
+.IP "\fB\-\-temporary\-folder\fR <string>" 4
+.IX Item "--temporary-folder <string>"
+Set where to put the temporary files generated by \s-1RSEM.\s0 If the folder specified does not exist, \s-1RSEM\s0 will try to create it. (Default: sample_name.temp)
+.IP "\fB\-\-time\fR" 4
+.IX Item "--time"
+Output time consumed by each step of \s-1RSEM\s0 to 'sample_name.time'. (Default: off)
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+In its default mode, this program aligns input reads against a reference transcriptome with Bowtie and calculates expression values using the alignments.  \s-1RSEM\s0 assumes the data are single-end reads with quality scores, unless the '\-\-paired\-end' or '\-\-no\-qualities' options are specified.  Users may use an alternative aligner by specifying one of the \-\-sam and \-\-bam options, and providing an alignment file in the specified format. However, users should make sure that they  [...]
+.PP
+One simple way to make the alignment file satisfying \s-1RSEM\s0's requirements (assuming the aligner used put mates in a paired-end read adjacent) is to use 'convert\-sam\-for\-rsem' script. This script only accept \s-1SAM\s0 format files as input. If a \s-1BAM\s0 format file is obtained, please use samtools to convert it to a \s-1SAM\s0 file first. For example, if '/ref/mouse_125' is the 'reference_name' and the \s-1SAM\s0 file is named 'input.sam', you can run the following command:
+.PP
+.Vb 1
+\&  convert\-sam\-for\-rsem /ref/mouse_125 input.sam \-o input_for_rsem.sam
+.Ve
+.PP
+For details, please refer to 'convert\-sam\-for\-rsem's documentation page.
+.PP
+The \s-1SAM/BAM\s0 format \s-1RSEM\s0 uses is v1.4. However, it is compatible with old \s-1SAM/BAM\s0 format. However, \s-1RSEM\s0 cannot recognize 0x100 in the \s-1FLAG\s0 field. In addition, \s-1RSEM\s0 requires \s-1SEQ\s0 and \s-1QUAL\s0 are not '*'.
+.PP
+The user must run 'rsem\-prepare\-reference' with the appropriate reference before using this program.
+.PP
+For single-end data, it is strongly recommended that the user provide the fragment length distribution parameters (\-\-fragment\-length\-mean and \-\-fragment\-length\-sd).  For paired-end data, \s-1RSEM\s0 will automatically learn a fragment length distribution from the data.
+.PP
+Please note that some of the default values for the Bowtie parameters are not the same as those defined for Bowtie itself.
+.PP
+The temporary directory and all intermediate files will be removed when \s-1RSEM\s0 finishes unless '\-\-keep\-intermediate\-files' is specified.
+.PP
+With the '\-\-calc\-pme' option, posterior mean estimates will be calculated in addition to maximum likelihood estimates.
+.PP
+With the '\-\-calc\-ci' option, 95% credibility intervals and posterior mean estimates will be calculated in addition to maximum likelihood estimates.
+.SH "OUTPUT"
+.IX Header "OUTPUT"
+.IP "\fBsample_name.isoforms.results\fR" 4
+.IX Item "sample_name.isoforms.results"
+File containing isoform level expression estimates. The first line
+contains column names separated by the tab character. The format of
+each line in the rest of this file is:
+.Sp
+transcript_id gene_id length effective_length expected_count \s-1TPM FPKM\s0 IsoPct [posterior_mean_count posterior_standard_deviation_of_count pme_TPM pme_FPKM IsoPct_from_pme_TPM TPM_ci_lower_bound TPM_ci_upper_bound FPKM_ci_lower_bound FPKM_ci_upper_bound]
+.Sp
+Fields are separated by the tab character. Fields within \*(L"[]\*(R" are
+optional. They will not be presented if neither '\-\-calc\-pme' nor
+\&'\-\-calc\-ci' is set.
+.Sp
+\&'transcript_id' is the transcript name of this transcript. 'gene_id'
+is the gene name of the gene which this transcript belongs to (denote
+this gene as its parent gene). If no gene information is provided,
+\&'gene_id' and 'transcript_id' are the same.
+.Sp
+\&'length' is this transcript's sequence length (poly(A) tail is not
+counted). 'effective_length' counts only the positions that can
+generate a valid fragment. If no poly(A) tail is added,
+\&'effective_length' is equal to transcript length \- mean fragment
+length + 1. If one transcript's effective length is less than 1, this
+transcript's both effective length and abundance estimates are set to
+0.
+.Sp
+\&'expected_count' is the sum of the posterior probability of each read
+comes from this transcript over all reads. Because 1) each read
+aligning to this transcript has a probability of being generated from
+background noise; 2) \s-1RSEM\s0 may filter some alignable low quality reads,
+the sum of expected counts for all transcript are generally less than
+the total number of reads aligned.
+.Sp
+\&'\s-1TPM\s0' stands for Transcripts Per Million. It is a relative measure of
+transcript abundance. The sum of all transcripts' \s-1TPM\s0 is 1
+million. '\s-1FPKM\s0' stands for Fragments Per Kilobase of transcript per
+Million mapped reads. It is another relative measure of transcript
+abundance. If we define l_bar be the mean transcript length in a
+sample, which can be calculated as
+.Sp
+l_bar = \esum_i TPM_i / 10^6 * effective_length_i (i goes through every transcript),
+.Sp
+the following equation is hold:
+.Sp
+FPKM_i = 10^3 / l_bar * TPM_i.
+.Sp
+We can see that the sum of \s-1FPKM\s0 is not a constant across samples.
+.Sp
+\&'IsoPct' stands for isoform percentage. It is the percentage of this
+transcript's abandunce over its parent gene's abandunce. If its parent
+gene has only one isoform or the gene information is not provided,
+this field will be set to 100.
+.Sp
+\&'posterior_mean_count', 'pme_TPM', 'pme_FPKM' are posterior mean
+estimates calculated by \s-1RSEM\s0's Gibbs
+sampler. 'posterior_standard_deviation_of_count' is the posterior
+standard deviation of counts. 'IsoPct_from_pme_TPM' is the isoform
+percentage calculated from 'pme_TPM' values.
+.Sp
+\&'TPM_ci_lower_bound', 'TPM_ci_upper_bound', 'FPKM_ci_lower_bound' and
+\&'FPKM_ci_upper_bound' are lower(l) and upper(u) bounds of 95%
+credibility intervals for \s-1TPM\s0 and \s-1FPKM\s0 values. The bounds are
+inclusive (i.e. [l, u]).
+.IP "\fBsample_name.genes.results\fR" 4
+.IX Item "sample_name.genes.results"
+File containing gene level expression estimates. The first line
+contains column names separated by the tab character. The format of
+each line in the rest of this file is:
+.Sp
+gene_id transcript_id(s) length effective_length expected_count \s-1TPM FPKM\s0 [posterior_mean_count posterior_standard_deviation_of_count pme_TPM pme_FPKM TPM_ci_lower_bound TPM_ci_upper_bound FPKM_ci_lower_bound FPKM_ci_upper_bound]
+.Sp
+Fields are separated by the tab character. Fields within \*(L"[]\*(R" are
+optional. They will not be presented if neither '\-\-calc\-pme' nor
+\&'\-\-calc\-ci' is set.
+.Sp
+\&'transcript_id(s)' is a comma-separated list of transcript_ids
+belonging to this gene. If no gene information is provided, 'gene_id'
+and 'transcript_id(s)' are identical (the 'transcript_id').
+.Sp
+A gene's 'length' and 'effective_length' are
+defined as the weighted average of its transcripts' lengths and
+effective lengths (weighted by 'IsoPct'). A gene's abundance estimates
+are just the sum of its transcripts' abundance estimates.
+.IP "\fBsample_name.alleles.results\fR" 4
+.IX Item "sample_name.alleles.results"
+Only generated when the \s-1RSEM\s0 references are built with allele-specific
+transcripts.
+.Sp
+This file contains allele level expression estimates for
+allele-specific expression calculation. The first line
+contains column names separated by the tab character. The format of
+each line in the rest of this file is:
+.Sp
+allele_id transcript_id gene_id length effective_length expected_count \s-1TPM FPKM\s0 AlleleIsoPct AlleleGenePct [posterior_mean_count posterior_standard_deviation_of_count pme_TPM pme_FPKM AlleleIsoPct_from_pme_TPM AlleleGenePct_from_pme_TPM TPM_ci_lower_bound TPM_ci_upper_bound FPKM_ci_lower_bound FPKM_ci_upper_bound]
+.Sp
+Fields are separated by the tab character. Fields within \*(L"[]\*(R" are
+optional. They will not be presented if neither '\-\-calc\-pme' nor
+\&'\-\-calc\-ci' is set.
+.Sp
+\&'allele_id' is the allele-specific name of this allele-specific transcript.
+.Sp
+\&'AlleleIsoPct' stands for allele-specific percentage on isoform
+level. It is the percentage of this allele-specific transcript's
+abundance over its parent transcript's abundance. If its parent
+transcript has only one allele variant form, this field will be set to
+100.
+.Sp
+\&'AlleleGenePct' stands for allele-specific percentage on gene
+level. It is the percentage of this allele-specific transcript's
+abundance over its parent gene's abundance.
+.Sp
+\&'AlleleIsoPct_from_pme_TPM' and 'AlleleGenePct_from_pme_TPM' have
+similar meanings. They are calculated based on posterior mean
+estimates.
+.Sp
+Please note that if this file is present, the fields 'length' and
+\&'effective_length' in 'sample_name.isoforms.results' should be
+interpreted similarly as the corresponding definitions in
+\&'sample_name.genes.results'.
+.IP "\fBsample_name.transcript.bam, sample_name.transcript.sorted.bam and sample_name.transcript.sorted.bam.bai\fR" 4
+.IX Item "sample_name.transcript.bam, sample_name.transcript.sorted.bam and sample_name.transcript.sorted.bam.bai"
+Only generated when \-\-no\-bam\-output is not specified.
+.Sp
+\&'sample_name.transcript.bam' is a BAM-formatted file of read
+alignments in transcript coordinates. The \s-1MAPQ\s0 field of each alignment
+is set to min(100, floor(\-10 * log10(1.0 \- w) + 0.5)), where w is the
+posterior probability of that alignment being the true mapping of a
+read.  In addition, \s-1RSEM\s0 pads a new tag ZW:f:value, where value is a
+single precision floating number representing the posterior
+probability. Because this file contains all alignment lines produced
+by bowtie or user-specified aligners, it can also be used as a
+replacement of the aligner generated \s-1BAM/SAM\s0 file. For paired-end
+reads, if one mate has alignments but the other does not, this file
+marks the alignable mate as \*(L"unmappable\*(R" (flag bit 0x4) and appends an
+optional field \*(L"Z0:A:!\*(R".
+.Sp
+\&'sample_name.transcript.sorted.bam' and
+\&'sample_name.transcript.sorted.bam.bai' are the sorted \s-1BAM\s0 file and
+indices generated by samtools (included in \s-1RSEM\s0 package).
+.IP "\fBsample_name.genome.bam, sample_name.genome.sorted.bam and sample_name.genome.sorted.bam.bai\fR" 4
+.IX Item "sample_name.genome.bam, sample_name.genome.sorted.bam and sample_name.genome.sorted.bam.bai"
+Only generated when \-\-no\-bam\-output is not specified and \-\-output\-genome\-bam is specified.
+.Sp
+\&'sample_name.genome.bam' is a BAM-formatted file of read alignments in
+genomic coordinates. Alignments of reads that have identical genomic
+coordinates (i.e., alignments to different isoforms that share the
+same genomic region) are collapsed into one alignment.  The \s-1MAPQ\s0 field
+of each alignment is set to min(100, floor(\-10 * log10(1.0 \- w) +
+0.5)), where w is the posterior probability of that alignment being
+the true mapping of a read.  In addition, \s-1RSEM\s0 pads a new tag
+ZW:f:value, where value is a single precision floating number
+representing the posterior probability. If an alignment is spliced, a
+XS:A:value tag is also added, where value is either '+' or '\-'
+indicating the strand of the transcript it aligns to.
+.Sp
+\&'sample_name.genome.sorted.bam' and 'sample_name.genome.sorted.bam.bai' are the
+sorted \s-1BAM\s0 file and indices generated by samtools (included in \s-1RSEM\s0 package).
+.IP "\fBsample_name.time\fR" 4
+.IX Item "sample_name.time"
+Only generated when \-\-time is specified.
+.Sp
+It contains time (in seconds) consumed by aligning reads, estimating expression levels and calculating credibility intervals.
+.IP "\fBsample_name.stat\fR" 4
+.IX Item "sample_name.stat"
+This is a folder instead of a file. All model related statistics are stored in this folder. Use 'rsem\-plot\-model' can generate plots using this folder.
+.Sp
+\&'sample_name.stat/sample_name.cnt' contains alignment statistics. The format and meanings of each field are described in 'cnt_file_description.txt' under \s-1RSEM\s0 directory.
+.Sp
+\&'sample_name.stat/sample_name.model' stores RNA-Seq model parameters learned from the data. The format and meanings of each filed of this file are described in 'model_file_description.txt' under \s-1RSEM\s0 directory.
+.SH "EXAMPLES"
+.IX Header "EXAMPLES"
+Assume the path to the bowtie executables is in the user's \s-1PATH\s0 environment variable. Reference files are under '/ref' with name 'mouse_125'.
+.PP
+1) '/data/mmliver.fq', single-end reads with quality scores. Quality scores are encoded as for '\s-1GA\s0 pipeline version >= 1.3'. We want to use 8 threads and generate a genome \s-1BAM\s0 file:
+.PP
+.Vb 6
+\& rsem\-calculate\-expression \-\-phred64\-quals \e
+\&                           \-p 8 \e
+\&                           \-\-output\-genome\-bam \e
+\&                           /data/mmliver.fq \e
+\&                           /ref/mouse_125 \e
+\&                           mmliver_single_quals
+.Ve
+.PP
+2) '/data/mmliver_1.fq' and '/data/mmliver_2.fq', paired-end reads with quality scores. Quality scores are in \s-1SANGER\s0 format. We want to use 8 threads and do not generate a genome \s-1BAM\s0 file:
+.PP
+.Vb 6
+\& rsem\-calculate\-expression \-p 8 \e
+\&                           \-\-paired\-end \e
+\&                           /data/mmliver_1.fq \e
+\&                           /data/mmliver_2.fq \e
+\&                           /ref/mouse_125 \e
+\&                           mmliver_paired_end_quals
+.Ve
+.PP
+3) '/data/mmliver.fa', single-end reads without quality scores. We want to use 8 threads:
+.PP
+.Vb 5
+\& rsem\-calculate\-expression \-p 8 \e
+\&                           \-\-no\-qualities \e
+\&                           /data/mmliver.fa \e
+\&                           /ref/mouse_125 \e
+\&                           mmliver_single_without_quals
+.Ve
+.PP
+4) Data are the same as 1). This time we assume the bowtie executables are under '/sw/bowtie'. We want to take a fragment length distribution into consideration. We set the fragment length mean to 150 and the standard deviation to 35. In addition to a \s-1BAM\s0 file, we also want to generate credibility intervals. We allow \s-1RSEM\s0 to use 1GB of memory for \s-1CI\s0 calculation:
+.PP
+.Vb 11
+\& rsem\-calculate\-expression \-\-bowtie\-path /sw/bowtie \e
+\&                           \-\-phred64\-quals \e
+\&                           \-\-fragment\-length\-mean 150.0 \e
+\&                           \-\-fragment\-length\-sd 35.0 \e
+\&                           \-p 8 \e
+\&                           \-\-output\-genome\-bam \e
+\&                           \-\-calc\-ci \e
+\&                           \-\-ci\-memory 1024 \e
+\&                           /data/mmliver.fq \e
+\&                           /ref/mouse_125 \e
+\&                           mmliver_single_quals
+.Ve
+.PP
+5) '/data/mmliver_paired_end_quals.bam', paired-end reads with quality scores. We want to use 8 threads:
+.PP
+.Vb 6
+\& rsem\-calculate\-expression \-\-paired\-end \e
+\&                           \-\-bam \e
+\&                           \-p 8 \e
+\&                           /data/mmliver_paired_end_quals.bam \e
+\&                           /ref/mouse_125 \e
+\&                           mmliver_paired_end_quals
+.Ve
diff --git a/debian/rsem-control-fdr.1 b/debian/rsem-control-fdr.1
new file mode 100644
index 0000000..7b3143c
--- /dev/null
+++ b/debian/rsem-control-fdr.1
@@ -0,0 +1,177 @@
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+.    ds C`
+.    ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+.    if \nF \{
+.        de IX
+.        tm Index:\\$1\t\\n%\t"\\$2"
+..
+.        if !\nF==2 \{
+.            nr % 0
+.            nr F 2
+.        \}
+.    \}
+.\}
+.rr rF
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "RSEM-CONTROL-FDR 1"
+.TH RSEM-CONTROL-FDR 1 "2015-02-02" "perl v5.18.2" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+rsem\-control\-fdr
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+rsem-control-fdr [options] input_file fdr_rate output_file
+.SH "ARGUMENTS"
+.IX Header "ARGUMENTS"
+.IP "\fBinput_file\fR" 4
+.IX Item "input_file"
+This should be the main result file generated by 'rsem\-run\-ebseq', which contains all genes/transcripts and their associated statistics.
+.IP "\fBfdr_rate\fR" 4
+.IX Item "fdr_rate"
+The desire false discovery rate (\s-1FDR\s0).
+.IP "\fBoutput_file\fR" 4
+.IX Item "output_file"
+This file is a subset of the 'input_file'. It only contains the genes/transcripts called as differentially expressed (\s-1DE\s0). When more than 2 conditions exist, \s-1DE\s0 is defined as not all conditions are equally expressed.  Because statistical significance does not necessarily mean biological significance, users should also refer to the fold changes to decide which genes/transcripts are biologically significant. When more than two conditions exist, this file will not contain fold [...]
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-\-hard\-threshold\fR" 4
+.IX Item "--hard-threshold"
+Use hard threshold method to control \s-1FDR.\s0 If this option is set, only those genes/transcripts with their \s-1PPDE \s0>= 1 \- fdr_rate are called as \s-1DE. \s0(Default: on)
+.IP "\fB\-\-soft\-threshold\fR" 4
+.IX Item "--soft-threshold"
+Use soft threshold method to control \s-1FDR.\s0 If this option is set, this program will try to report as many genes/transcripts as possible, as long as their average \s-1PPDE \s0>= 1 \- fdr_rate. This option is equivalent to use EBSeq's 'crit_fun' for \s-1FDR\s0 control. (Default: off)
+.IP "\fB\-h/\-\-help\fR" 4
+.IX Item "-h/--help"
+Show help information.
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This program controls the false discovery rate and reports differentially expressed genes/transcripts.
+.SH "EXAMPLES"
+.IX Header "EXAMPLES"
+We assume that we have 'GeneMat.results' as input. We want to control \s-1FDR\s0 at 0.05 using hard threshold method and name the output file as 'GeneMat.de.txt':
+.PP
+.Vb 1
+\& rsem\-control\-fdr GeneMat.results 0.05 GeneMat.de.txt
+.Ve
diff --git a/debian/rsem-generate-ngvector.1 b/debian/rsem-generate-ngvector.1
new file mode 100644
index 0000000..3913a71
--- /dev/null
+++ b/debian/rsem-generate-ngvector.1
@@ -0,0 +1,193 @@
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+.    ds C`
+.    ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+.    if \nF \{
+.        de IX
+.        tm Index:\\$1\t\\n%\t"\\$2"
+..
+.        if !\nF==2 \{
+.            nr % 0
+.            nr F 2
+.        \}
+.    \}
+.\}
+.rr rF
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "RSEM-GENERATE-NGVECTOR 1"
+.TH RSEM-GENERATE-NGVECTOR 1 "2015-02-02" "perl v5.18.2" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+rsem\-generate\-ngvector
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+rsem-generate-ngvector [options] input_fasta_file output_name
+.SH "ARGUMENTS"
+.IX Header "ARGUMENTS"
+.IP "\fBinput_fasta_file\fR" 4
+.IX Item "input_fasta_file"
+The fasta file containing all reference transcripts. The transcripts must be in the same order as those in expression value files. Thus, 'reference_name.transcripts.fa' generated by 'rsem\-prepare\-reference' should be used.
+.IP "\fBoutput_name\fR" 4
+.IX Item "output_name"
+The name of all output files. The Ng vector will be stored as 'output_name.ngvec'.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-k\fR <int>" 4
+.IX Item "-k <int>"
+k mer length. See description section. (Default: 25)
+.IP "\fB\-h/\-\-help\fR" 4
+.IX Item "-h/--help"
+Show help information.
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This program generates the Ng vector required by EBSeq for isoform level differential expression analysis based on reference sequences only. EBSeq can take variance due to read mapping ambiguity into consideration by grouping isoforms with parent gene's number of isoforms. However, for de novo assembled transcriptome, it is hard to obtain an accurate gene-isoform relationship. Instead, this program groups isoforms by using measures on read mappaing ambiguity directly. First, it calcualte [...]
+.PP
+If your reference is a de novo assembled transcript set, you should run 'rsem\-generate\-ngvector' first. Then load the resulting 'output_name.ngvec' into R. For example, you can use
+.PP
+.Vb 1
+\& NgVec <\- scan(file="output_name.ngvec", what=0, sep="\en")
+.Ve
+.PP
+\&. After that, replace 'IsoNgTrun' with 'NgVec' in the second line of section 3.2.5 (Page 10) of EBSeq's vignette:
+.PP
+.Vb 1
+\& IsoEBres=EBTest(Data=IsoMat, NgVector=NgVec, ...)
+.Ve
+.PP
+This program only needs to run once per \s-1RSEM\s0 reference.
+.SH "OUTPUT"
+.IX Header "OUTPUT"
+.IP "\fBoutput_name.ump\fR" 4
+.IX Item "output_name.ump"
+\&'unmappability' scores for each transcript. This file contains two columns. The first column is transcript name and the second column is 'unmappability' score.
+.IP "\fBoutput_name.ngvec\fR" 4
+.IX Item "output_name.ngvec"
+Ng vector generated by this program.
+.SH "EXAMPLES"
+.IX Header "EXAMPLES"
+Suppose the reference sequences file is '/ref/mouse_125/mouse_125.transcripts.fa' and we set the output_name as 'mouse_125':
+.PP
+.Vb 1
+\& rsem\-generate\-ngvector /ref/mouse_125/mouse_125.transcripts.fa mouse_125
+.Ve
diff --git a/debian/rsem-plot-transcript-wiggles.1 b/debian/rsem-plot-transcript-wiggles.1
new file mode 100644
index 0000000..5ef5b8a
--- /dev/null
+++ b/debian/rsem-plot-transcript-wiggles.1
@@ -0,0 +1,199 @@
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+.    ds C`
+.    ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+.    if \nF \{
+.        de IX
+.        tm Index:\\$1\t\\n%\t"\\$2"
+..
+.        if !\nF==2 \{
+.            nr % 0
+.            nr F 2
+.        \}
+.    \}
+.\}
+.rr rF
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "RSEM-PLOT-TRANSCRIPT-WIGGLES 1"
+.TH RSEM-PLOT-TRANSCRIPT-WIGGLES 1 "2015-02-02" "perl v5.18.2" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+rsem\-plot\-transcript\-wiggles
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+rsem-plot-transcript-wiggles [options] sample_name input_list output_plot_file
+.SH "ARGUMENTS"
+.IX Header "ARGUMENTS"
+.IP "\fBsample_name\fR" 4
+.IX Item "sample_name"
+The name of the sample analyzed.
+.IP "\fBinput_list\fR" 4
+.IX Item "input_list"
+A list of transcript ids or gene ids. But it cannot be a mixture of transcript & gene ids. Each id occupies one line without extra spaces.
+.IP "\fBoutput_plot_file\fR" 4
+.IX Item "output_plot_file"
+The file name of the pdf file which contains all plots.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-\-gene\-list\fR" 4
+.IX Item "--gene-list"
+The input-list is a list of gene ids. (Default: off)
+.IP "\fB\-\-transcript\-list\fR" 4
+.IX Item "--transcript-list"
+The input-list is a list of transcript ids. This option can only be turned on if allele-specific expression is calculated. (Default: off)
+.IP "\fB\-\-show\-unique\fR" 4
+.IX Item "--show-unique"
+Show the wiggle plots as stacked bar plots. See description section for details. (Default: off)
+.IP "\fB\-h/\-\-help\fR" 4
+.IX Item "-h/--help"
+Show help information.
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This program generates transcript wiggle plots and outputs them in a pdf file. This program can accept either a list of transcript ids or gene ids (if transcript to gene mapping information is provided) and has two modes of showing wiggle plots. If '\-\-show\-unique' is not specified, the wiggle plot for each transcript is a histogram where each position has the expected read depth at this position as its height. If '\-\-show\-unique' is specified, for each transcript a stacked bar plot  [...]
+.SH "OUTPUT"
+.IX Header "OUTPUT"
+.IP "\fBoutput_plot_file\fR" 4
+.IX Item "output_plot_file"
+This is a pdf file containing all plots generated. If a list of transcript ids is provided, each page display at most 6 plots in 3 rows and 2 columns. If gene ids are provided, each page display a gene. The gene's id is showed at the top and all its transcripts' wiggle plots are showed in this page. The arrangment of plots is determined automatically. For each transcript wiggle plot, the transcript id is displayed as title. x\-axis is position in the transcript and y\-axis is read depth. [...]
+.IP "\fBsample_name.transcript.sorted.bam and sample_name.transcript.readdepth\fR" 4
+.IX Item "sample_name.transcript.sorted.bam and sample_name.transcript.readdepth"
+If these files do not exist, 'rsem\-plot\-transcript\-wiggles' will automatically generate them.
+.IP "\fBsample_name.uniq.transcript.bam, sample_name.uniq.transcript.sorted.bam and sample_name.uniq.transcript.readdepth\fR" 4
+.IX Item "sample_name.uniq.transcript.bam, sample_name.uniq.transcript.sorted.bam and sample_name.uniq.transcript.readdepth"
+If '\-\-show\-unique' option is specified and these files do not exist, 'rsem\-plot\-transcript\-wiggles' will automatically generate them.
+.SH "EXAMPLES"
+.IX Header "EXAMPLES"
+Suppose sample_name and output_plot_file are set to 'mmliver_single_quals' and 'output.pdf' respectively. input_list is set to 'transcript_ids.txt' if transcript ids are provided, and is set to 'gene_ids.txt' if gene ids are provided.
+.PP
+1) Transcript ids are provided and we just want normal wiggle plots:
+.PP
+.Vb 1
+\& rsem\-plot\-transcript\-wiggles mmliver_single_quals transcript_ids.txt output.pdf
+.Ve
+.PP
+2) Gene ids are provided and we want to show stacked bar plots:
+.PP
+.Vb 1
+\& rsem\-plot\-transcript\-wiggles \-\-gene\-list \-\-show\-unique mmliver_single_quals gene_ids.txt output.pdf
+.Ve
diff --git a/debian/rsem-prepare-reference.1 b/debian/rsem-prepare-reference.1
new file mode 100644
index 0000000..9c08bc0
--- /dev/null
+++ b/debian/rsem-prepare-reference.1
@@ -0,0 +1,274 @@
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+.    ds C`
+.    ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+.    if \nF \{
+.        de IX
+.        tm Index:\\$1\t\\n%\t"\\$2"
+..
+.        if !\nF==2 \{
+.            nr % 0
+.            nr F 2
+.        \}
+.    \}
+.\}
+.rr rF
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "RSEM-PREPARE-REFERENCE 1"
+.TH RSEM-PREPARE-REFERENCE 1 "2015-02-02" "perl v5.18.2" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+rsem\-prepare\-reference
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+rsem-prepare-reference [options] reference_fasta_file(s) reference_name
+.SH "ARGUMENTS"
+.IX Header "ARGUMENTS"
+.IP "\fBreference_fasta_file(s)\fR" 4
+.IX Item "reference_fasta_file(s)"
+Either a comma-separated list of Multi-FASTA formatted files \s-1OR\s0 a directory name. If a directory name is specified, \s-1RSEM\s0 will read all files with suffix \*(L".fa\*(R" or \*(L".fasta\*(R" in this directory.  The files should contain either the sequences of transcripts or an entire genome, depending on whether the \-\-gtf option is used.
+.IP "\fBreference name\fR" 4
+.IX Item "reference name"
+The name of the reference used. \s-1RSEM\s0 will generate several reference-related files that are prefixed by this name. This name can contain path information (e.g. /ref/mm9).
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-\-gtf\fR <file>" 4
+.IX Item "--gtf <file>"
+If this option is on, \s-1RSEM\s0 assumes that 'reference_fasta_file(s)' contains the sequence of a genome, and will extract transcript reference sequences using the gene annotations specified in <file>, which should be in \s-1GTF\s0 format.
+.Sp
+If this option is off, \s-1RSEM\s0 will assume 'reference_fasta_file(s)' contains the reference transcripts. In this case, \s-1RSEM\s0 assumes that name of each sequence in the Multi-FASTA files is its transcript_id.
+.Sp
+(Default: off)
+.IP "\fB\-\-transcript\-to\-gene\-map\fR <file>" 4
+.IX Item "--transcript-to-gene-map <file>"
+Use information from <file> to map from transcript (isoform) ids to gene ids.
+Each line of <file> should be of the form:
+.Sp
+gene_id transcript_id
+.Sp
+with the two fields separated by a tab character.
+.Sp
+If you are using a \s-1GTF\s0 file for the \*(L"\s-1UCSC\s0 Genes\*(R" gene set from the \s-1UCSC\s0 Genome Browser, then the \*(L"knownIsoforms.txt\*(R" file (obtained from the \*(L"Downloads\*(R" section of the \s-1UCSC\s0 Genome Browser site) is of this format.
+.Sp
+If this option is off, then the mapping of isoforms to genes depends on whether the \-\-gtf option is specified.  If \-\-gtf is specified, then \s-1RSEM\s0 uses the \*(L"gene_id\*(R" and \*(L"transcript_id\*(R" attributes in the \s-1GTF\s0 file.  Otherwise, \s-1RSEM\s0 assumes that each sequence in the reference sequence files is a separate gene.
+.Sp
+(Default: off)
+.IP "\fB\-\-allele\-to\-gene\-map\fR <file>" 4
+.IX Item "--allele-to-gene-map <file>"
+Use information from <file> to provide gene_id and transcript_id information for each allele-specific transcript.
+Each line of <file> should be of the form:
+.Sp
+gene_id transcript_id allele_id
+.Sp
+with the fields separated by a tab character.
+.Sp
+This option is designed for quantifying allele-specific expression. It is only valid if '\-\-gtf' option is not specified. allele_id should be the sequence names presented in the Multi-FASTA-formatted files.
+.Sp
+(Default: off)
+.IP "\fB\-\-polyA\fR" 4
+.IX Item "--polyA"
+Add poly(A) tails to the end of all reference isoforms. The length of poly(A) tail added is specified by '\-\-polyA\-length' option. \s-1STAR\s0 aligner users may not want to use this option. (Default: do not add poly(A) tail to any of the isoforms)
+.IP "\fB\-\-polyA\-length\fR <int>" 4
+.IX Item "--polyA-length <int>"
+The length of the poly(A) tails to be added. (Default: 125)
+.IP "\fB\-\-no\-polyA\-subset\fR <file>" 4
+.IX Item "--no-polyA-subset <file>"
+Only meaningful if '\-\-polyA' is specified. Do not add poly(A) tails to those transcripts listed in <file>. <file> is a file containing a list of transcript_ids. (Default: off)
+.IP "\fB\-\-bowtie\fR" 4
+.IX Item "--bowtie"
+Build Bowtie indices. (Default: off)
+.IP "\fB\-\-bowtie\-path\fR <path>" 4
+.IX Item "--bowtie-path <path>"
+The path to the Bowtie executables. (Default: the path to Bowtie executables is assumed to be in the user's \s-1PATH\s0 environment variable)
+.IP "\fB\-\-bowtie2\fR" 4
+.IX Item "--bowtie2"
+Build Bowtie 2 indices. (Default: off)
+.IP "\fB\-\-bowtie2\-path\fR" 4
+.IX Item "--bowtie2-path"
+The path to the Bowtie 2 executables. (Default: the path to Bowtie 2 executables is assumed to be in the user's \s-1PATH\s0 environment variable)
+.IP "\fB\-q/\-\-quiet\fR" 4
+.IX Item "-q/--quiet"
+Suppress the output of logging information. (Default: off)
+.IP "\fB\-h/\-\-help\fR" 4
+.IX Item "-h/--help"
+Show help information.
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This program extracts/preprocesses the reference sequences for \s-1RSEM.\s0 It can optionally build Bowtie indices (with '\-\-bowtie' option) and/or Bowtie 2 indices (with '\-\-bowtie2' option) using their default parameters. If an alternative aligner is to be used, indices for that particular aligner can be built from either 'reference_name.idx.fa' or 'reference_name.n2g.idx.fa' (see \s-1OUTPUT\s0 for details). This program is used in conjunction with the 'rsem\-calculate\-expression' program.
+.SH "OUTPUT"
+.IX Header "OUTPUT"
+This program will generate 'reference_name.grp', 'reference_name.ti', 'reference_name.transcripts.fa', 'reference_name.seq', 'reference_name.chrlist' (if '\-\-gtf' is on), 'reference_name.idx.fa', 'reference_name.n2g.idx.fa' and optional Bowtie/Bowtie 2 index files.
+.PP
+\&'reference_name.grp', 'reference_name.ti', 'reference_name.seq', and 'reference_name.chrlist' are used by \s-1RSEM\s0 internally.
+.PP
+\&\fB'reference_name.transcripts.fa'\fR contains the extracted reference transcripts in Multi-FASTA format. Poly(A) tails are not added and it may contain lower case bases in its sequences if the corresponding genomic regions are soft-masked.
+.PP
+\&\fB'reference_name.idx.fa' and 'reference_name.n2g.idx.fa'\fR are used by aligners to build their own indices. In these two files, all sequence bases are converted into upper case. In addition, poly(A) tails are added if '\-\-polyA' option is set. The only difference between 'reference_name.idx.fa' and 'reference_name.n2g.idx.fa' is that 'reference_name.n2g.idx.fa' in addition converts all 'N' characters to 'G' characters. This conversion is in particular desired for aligners (e.g. Bow [...]
+.SH "EXAMPLES"
+.IX Header "EXAMPLES"
+1) Suppose we have mouse RNA-Seq data and want to use the \s-1UCSC\s0 mm9 version of the mouse genome. We have downloaded the \s-1UCSC\s0 Genes transcript annotations in \s-1GTF\s0 format (as mm9.gtf) using the Table Browser and the knownIsoforms.txt file for mm9 from the \s-1UCSC\s0 Downloads. We also have all chromosome files for mm9 in the directory '/data/mm9'.  We want to put the generated reference files under '/ref' with name 'mouse_0'. We do not add any poly(A) tails. Please note [...]
+.PP
+There are two ways to write the command:
+.PP
+.Vb 6
+\& rsem\-prepare\-reference \-\-gtf mm9.gtf \e
+\&                        \-\-transcript\-to\-gene\-map knownIsoforms.txt \e
+\&                        \-\-bowtie \e
+\&                        \-\-bowtie\-path /sw/bowtie \e                  
+\&                        /data/mm9/chr1.fa,/data/mm9/chr2.fa,...,/data/mm9/chrM.fa \e
+\&                        /ref/mouse_0
+.Ve
+.PP
+\&\s-1OR\s0
+.PP
+.Vb 6
+\& rsem\-prepare\-reference \-\-gtf mm9.gtf \e
+\&                        \-\-transcript\-to\-gene\-map knownIsoforms.txt \e
+\&                        \-\-bowtie \e
+\&                        \-\-bowtie\-path /sw/bowtie \e
+\&                        /data/mm9 \e
+\&                        /ref/mouse_0
+.Ve
+.PP
+2) Suppose we also want to build Bowtie 2 indices in the above example and Bowtie 2 executables are found in '/sw/bowtie2', the command will be:
+.PP
+.Vb 8
+\& rsem\-prepare\-reference \-\-gtf mm9.gtf \e
+\&                        \-\-transcript\-to\-gene\-map knownIsoforms.txt \e
+\&                        \-\-bowtie \e
+\&                        \-\-bowtie\-path /sw/bowtie \e
+\&                        \-\-bowtie2 \e
+\&                        \-\-bowtie2\-path /sw/bowtie2 \e
+\&                        /data/mm9 \e
+\&                        /ref/mouse_0
+.Ve
+.PP
+3) Suppose we only have transcripts from \s-1EST\s0 tags stored in 'mm9.fasta' and isoform-gene information stored in 'mapping.txt'. We want to add 125bp long poly(A) tails to all transcripts. The reference_name is set as 'mouse_125'. In addition, we do not want to build Bowtie/Bowtie 2 indices, and will use an alternative aligner to align reads against either 'mouse_125.idx.fa' or 'mouse_125.idx.n2g.fa':
+.PP
+.Vb 4
+\& rsem\-prepare\-reference \-\-transcript\-to\-gene\-map mapping.txt \e
+\&                        \-\-polyA
+\&                        mm9.fasta \e
+\&                        mouse_125
+.Ve
diff --git a/debian/rsem-run-ebseq.1 b/debian/rsem-run-ebseq.1
new file mode 100644
index 0000000..52f5c81
--- /dev/null
+++ b/debian/rsem-run-ebseq.1
@@ -0,0 +1,199 @@
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+.    ds C`
+.    ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+.    if \nF \{
+.        de IX
+.        tm Index:\\$1\t\\n%\t"\\$2"
+..
+.        if !\nF==2 \{
+.            nr % 0
+.            nr F 2
+.        \}
+.    \}
+.\}
+.rr rF
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "RSEM-RUN-EBSEQ 1"
+.TH RSEM-RUN-EBSEQ 1 "2015-02-02" "perl v5.18.2" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+rsem\-run\-ebseq
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+rsem-run-ebseq [options] data_matrix_file conditions output_file
+.SH "ARGUMENTS"
+.IX Header "ARGUMENTS"
+.IP "\fBdata_matrix_file\fR" 4
+.IX Item "data_matrix_file"
+This file is a m by n matrix. m is the number of genes/transcripts and n is the number of total samples. Each element in the matrix represents the expected count for a particular gene/transcript in a particular sample. Users can use 'rsem\-generate\-data\-matrix' to generate this file from expression result files.
+.IP "\fBconditions\fR" 4
+.IX Item "conditions"
+Comma-separated list of values representing the number of replicates for each condition. For example, \*(L"3,3\*(R" means the data set contains 2 conditions and each condition has 3 replicates. \*(L"2,3,3\*(R" means the data set contains 3 conditions, with 2, 3, and 3 replicates for each condition respectively.
+.IP "\fBoutput_file\fR" 4
+.IX Item "output_file"
+Output file name.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-\-ngvector\fR <file>" 4
+.IX Item "--ngvector <file>"
+This option provides the grouping information required by EBSeq for isoform-level differential expression analysis. The file can be generated by 'rsem\-generate\-ngvector'. Turning this option on is highly recommended for isoform-level differential expression analysis. (Default: off)
+.IP "\fB\-h/\-\-help\fR" 4
+.IX Item "-h/--help"
+Show help information.
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This program is a wrapper over EBSeq. It performs differential expression analysis and can work on two or more conditions. All genes/transcripts and their associated statistcs are reported in one output file. This program does not control false discovery rate and call differential expressed genes/transcripts. Please use 'rsem\-control\-fdr' to control false discovery rate after this program is finished.
+.SH "OUTPUT"
+.IX Header "OUTPUT"
+.IP "\fBoutput_file\fR" 4
+.IX Item "output_file"
+This file reports the calculated statistics for all genes/transcripts. It is written as a matrix with row and column names. The row names are the genes'/transcripts' names. The column names are for the reported statistics.
+.Sp
+If there are only 2 different conditions among the samples, four statistics (columns) will be reported for each gene/transcript. They are \*(L"\s-1PPEE\*(R", \*(L"PPDE\*(R", \s0\*(L"PostFC\*(R" and \*(L"RealFC\*(R". \*(L"\s-1PPEE\*(R"\s0 is the posterior probability (estimated by EBSeq) that a gene/transcript is equally expressed. \*(L"\s-1PPDE\*(R"\s0 is the posterior probability that a gene/transcript is differentially expressed. \*(L"PostFC\*(R" is the posterior fold change (condition [...]
+.Sp
+If there are more than 2 different conditions among the samples, the output format is different. For differential expression analysis with more than 2 conditions, EBSeq will enumerate all possible expression patterns (on which conditions are equally expressed and which conditions are not). Suppose there are k different patterns, the first k columns of the output file give the posterior probability of each expression pattern is true. Patterns are defined in a separate file, 'output_file.p [...]
+.IP "\fBoutput_file.pattern\fR" 4
+.IX Item "output_file.pattern"
+This file is only generated when there are more than 2 conditions. It defines all possible expression patterns over the conditions using a matrix with names. Each row of the matrix refers to a different expression pattern and each column gives the expression status of a different condition. Two conditions are equally expressed if and only if their statuses are the same.
+.IP "\fBoutput_file.condmeans\fR" 4
+.IX Item "output_file.condmeans"
+This file is only generated when there are more than 2 conditions. It gives the normalized mean count value for each gene/transcript at each condition. It is formatted as a matrix with names. Each row represents a gene/transcript and each column represent a condition. The order of genes/transcripts is the same as 'output_file'. This file can be used to calculate fold changes between conditions which users are interested in.
+.SH "EXAMPLES"
+.IX Header "EXAMPLES"
+1) We're interested in isoform-level differential expression analysis and there are two conditions. Each condition has 5 replicates. We have already collected the data matrix as 'IsoMat' and generated ngvector as 'ngvector.ngvec':
+.PP
+.Vb 1
+\& rsem\-run\-ebseq \-\-ngvector ngvector.ngvec IsoMat 5,5 IsoMat.results
+.Ve
+.PP
+The results will be in 'IsoMat.results'.
+.PP
+2) We're interested in gene-level analysis and there are 3 conditions. The first condition has 3 replicates and the other two has 4 replicates each. The data matrix is named as 'GeneMat':
+.PP
+.Vb 1
+\& rsem\-run\-ebseq GeneMat 3,4,4 GeneMat.results
+.Ve
+.PP
+Three files, 'GeneMat.results', 'GeneMat.results.pattern', and 'GeneMat.results.condmeans', will be generated.
diff --git a/debian/rsem.manpages b/debian/rsem.manpages
new file mode 100644
index 0000000..0f65186
--- /dev/null
+++ b/debian/rsem.manpages
@@ -0,0 +1 @@
+debian/*.1
diff --git a/debian/rules b/debian/rules
index ad65319..1ba3f77 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,7 +3,7 @@
 DH_VERBOSE := 1
 
 %:
-	dh $@
+	dh $@ --parallel
 
 override_dh_auto_install:
 	find . -maxdepth 1 -type f -perm /u+x | xargs -n 1 -I{} dh_install {} /usr/bin/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/rsem.git



More information about the debian-med-commit mailing list