Permalink
Browse files

merged

  • Loading branch information...
ratsch committed Sep 25, 2012
2 parents 2aceb5f + be266f5 commit 24e586c797aa1b5a7126bb40f501896621663c18
Showing with 17,616 additions and 5 deletions.
  1. +2 −1 .gitignore
  2. +11 −0 AUTHORS
  3. +3 −0 COPYRIGHT
  4. +10 −0 INSTALL
  5. +674 −0 LICENSE
  6. +66 −0 NEWS
  7. +57 −4 README
  8. +1 −0 VERSION
  9. +21 −0 bin/genarglist.sh
  10. +1 −0 bin/genes_cell2struct
  11. +1 −0 bin/read_stats
  12. +1 −0 bin/rquant
  13. +27 −0 bin/rquant_config.sh
  14. +1 −0 bin/rquant_gendata
  15. +20 −0 bin/rquant_wrapper.sh
  16. +34 −0 bin/start_interpreter.sh
  17. +50 −0 doc/read_stats.txt
  18. +68 −0 doc/rquant_web.txt
  19. +102 −0 doc/rquant_web_instructions.txt
  20. +29 −0 examples/get_data.sh
  21. +106 −0 examples/run_example.sh
  22. +90 −0 galaxy/read_stats.xml
  23. +181 −0 galaxy/rquant_web.xml
  24. +159 −0 galaxy/rquant_web_instructions.xml
  25. +38 −0 mex/Makefile
  26. +216 −0 mex/get_bam_properties.cpp
  27. +307 −0 mex/get_reads.cpp
  28. +306 −0 mex/get_reads_direct.cpp
  29. +30 −0 mex/get_reads_direct.h
  30. +217 −0 mex/interval_overlap.cpp
  31. +60 −0 mex/mex_input.cpp
  32. +20 −0 mex/mex_input.h
  33. +215 −0 mex/read.cpp
  34. +115 −0 mex/read.h
  35. +210 −0 setup_rquant.sh
  36. +116 −0 src/build_splice_graph_caller.m
  37. +165 −0 src/define_segments.m
  38. +63 −0 src/estimate_ins_size_distr.m
  39. +130 −0 src/find_overlapping_regions.m
  40. +116 −0 src/gen_exon_features.m
  41. +46 −0 src/gen_exon_mask.m
  42. +65 −0 src/gen_paired_segments.m
  43. +56 −0 src/gen_segments.m
  44. +53 −0 src/gen_sequence_features.m
  45. +61 −0 src/gen_sequence_targets.m
  46. +39 −0 src/genes_cell2struct.m
  47. +38 −0 src/get_adj_bins.m
  48. +181 −0 src/get_coverage_per_read.m
  49. +49 −0 src/get_empirical_profiles.m
  50. +31 −0 src/get_included_thetas.m
  51. +113 −0 src/get_intron_data.m
  52. +28 −0 src/get_limits.m
  53. +116 −0 src/get_paired_data.m
  54. +27 −0 src/mean_var_coeff.m
  55. +122 −0 src/merge_transcripts_by_colocation.m
  56. +46 −0 src/norm_sequence.m
  57. +344 −0 src/opt_density.m
  58. +198 −0 src/opt_profiles_descent.m
  59. +89 −0 src/opt_seq_descent.m
  60. +198 −0 src/opt_transcripts_caller.m
  61. +207 −0 src/opt_transcripts_descent.m
  62. +29 −0 src/predict_Ridge.m
  63. +25 −0 src/quad_fun.m
  64. +39 −0 src/read_density_model.m
  65. +191 −0 src/read_stats.m
  66. +68 −0 src/read_stats.sh
  67. +211 −0 src/rquant.m
  68. +93 −0 src/rquant.sh
  69. +55 −0 src/rquant_config.m
  70. +207 −0 src/rquant_core.m
  71. +57 −0 src/rquant_gendata.m
  72. +26 −0 src/rquant_gendata.sh
  73. +50 −0 src/rquant_rproc.m
  74. +93 −0 src/run_rquant_alyrata.m
  75. +101 −0 src/run_rquant_arabidopsis_christina.m
  76. +92 −0 src/run_rquant_celegans.m
  77. +144 −0 src/run_rquant_data_sim.m
  78. +114 −0 src/run_rquant_mip_jonas.m
  79. +117 −0 src/run_rquant_rgasp.m
  80. +120 −0 src/sanitise_genes.m
  81. +72 −0 src/seq_2_kmers.m
  82. +33 −0 src/train_Ridge.m
  83. +67 −0 src/train_norm_sequence.m
  84. +39 −0 src/write_density_model.m
  85. +32 −0 src/write_parameters.m
  86. +84 −0 src/write_rquant_gff3.m
  87. BIN test_data/rquant_nGASP-Train-I.bam
  88. +973 −0 test_data/rquant_nGASP-Train-I.gff3
  89. +8 −0 test_data/rquant_nGASP-Train-I.info
  90. +5,979 −0 test_data/rquant_nGASP-Train-I_genes.mat
  91. +18 −0 test_data/rquant_nGASP-Train-I_read_stats.txt
  92. +783 −0 test_data/rquant_nGASP-Train-I_rquant_case0.gff3
  93. +783 −0 test_data/rquant_nGASP-Train-I_rquant_case1.gff3
  94. +50 −0 test_data/rquant_profiles.txt
  95. +388 −0 tools/ParseGFF.py
  96. +116 −0 tools/build_splice_graph_caller.m
  97. +57 −0 tools/determine_engine.m
  98. +40 −0 tools/prctile.m
  99. +51 −0 tools/sam_to_bam.sh
  100. +33 −0 tools/separate.m
  101. +32 −0 tools/whoami.m
View
@@ -1 +1,2 @@
-*~.branch
+*~
+.branch
View
11 AUTHORS
@@ -0,0 +1,11 @@
+rQuant:
+Regina Bohnert <regina.bohnert@tuebingen.mpg.de>
+Gunnar Raetsch <gunnar.raetsch@tuebingen.mpg.de>
+
+Gff2Anno:
+Vipin T Sreedharan <vipin.ts@tuebingen.mpg.de>
+
+BAM file processing:
+Regina Bohnert <regina.bohnert@tuebingen.mpg.de>
+Jonas Behr <jonas.behr@tuebingen.mpg.de>
+Gunnar Raetsch <gunnar.raetsch@tuebingen.mpg.de>
View
@@ -0,0 +1,3 @@
+GPL:
+====
+rQuant is licensed under the GNU General Public License version 3 or at your option any later version.
View
10 INSTALL
@@ -0,0 +1,10 @@
+To setup rQuant, please follow these steps:
+
+1. Download the SAMTools (version 0.1.7) from http://samtools.sourceforge.net/ and install it. You need to add the flag -fPIC in the SAMTools Makefile for compilation.
+2. Add the SAMTools directory to ./mex/Makefile, go to ./mex and run make ('make octave' for Octave and 'make matlab' for Matlab).
+3. Run ./setup_rquant.sh and setup paths and configuration options for rQuant.
+
+Optional
+4. Download the example data with ./get_data.sh in ./examples.
+5. Run an example by executing ./run_example.sh with input 'small' or 'big' to work on a small (55 examples) and big (1865 examples) C. elegans data set, respectively in the examples directory.
+
View
674 LICENSE

Large diffs are not rendered by default.

Oops, something went wrong.
View
66 NEWS
@@ -0,0 +1,66 @@
+rQuant version 2.1 (Aug 30, 2011)
+----------------------------------------
+
+New features:
+- Profiles can now also be estimated empirically instead of using the
+optimisation approach (CFG.learn_profiles=1: empirically estimated,
+CFG.learn_profiles=2: optimised), which is considerably faster.
+- The usage of information from paired-end reads has been implemented
+and can be used during abundance estimation (CFG.paired = 1).
+
+
+rQuant version 2.0 (May 24, 2011)
+----------------------------------------
+
+New features:
+- The optimisation of the transcript and profile variables has been
+newly implemented. The optimisation problems are now solved via
+coordinate descent and the analytical solution, making the
+calculations much faster than in the old releases and making rQuant
+independent of a commercial solving software.
+- The profile functions are now modelled with piecewise linear
+functions instead of piecewise constant functions.
+
+Bug fixes:
+- ParseGFF.py: assertion for a GFF file without 9 columns
+
+
+rQuant version 1.2 (May 18, 2011)
+----------------------------------------
+
+New features:
+- transcripts from overlapping loci are merged for quantitation
+- additional option allowing genome annotation to be in AGS format
+
+Other changes:
+- ParseGFF.py: now also parses multiple mappings of parent IDs of GFF
+features
+
+
+rQuant version 1.1 (March 11, 2011)
+----------------------------------------
+
+New features:
+- tool ReadStats: generates a statistic about the read alignments and
+the covered genes
+
+Other changes:
+- prctiles.m: replaced function by own implementation
+- ParseGFF.py: now also parses non-coding transcripts; exons
+coordinates always in ascending order (for both strands)
+
+Bug fixes:
+- get_reads: fixed a memory leak and segmentation faults
+- sanitise_genes.m: adapted to closed intervals in gene structure from
+ParseGFF.py
+- rquant_core.m: corrected initialisation of transcript length bins
+
+
+rQuant version 1.0 (December 17, 2010)
+----------------------------------------
+
+This is the first release of the quantitation tool rQuant, which
+determines abundances of multiple transcripts per gene locus from
+RNA-Seq measurements.
+Please also visit http://fml.mpg.de/raetsch/suppl/rquant for more
+information about this software.
View
61 README
@@ -1,4 +1,57 @@
-Software: <name>
-Description: <description>
-Authors: <authors>
-URL: <url>
+----------------------
+ rQuant version 2.1
+----------------------
+
+DESCRIPTION
+rQuant is a programme to determine abundances of multiple transcripts
+per gene locus from RNA-Seq measurements. It can simultaneously
+estimate the effect of biases introduced by experimental settings.
+
+REQUIREMENTS
+- Octave or Matlab
+- Python >=2.6.5 and Scipy >=0.7.1
+- SAMTools >= 0.1.7
+
+GETTING STARTED
+To install rQuant and the required software please follow the
+instructions in INSTALL in this directory.
+
+CONTENTS
+All relevant scripts for rQuant are located in the subdirectory src.
+rquant.sh is the main script to start rQuant.
+In the same subdirectory you find the script read_stats.sh that
+generates a statistic about the read alignments and the covered genes.
+
+GALAXY
+rQuant can be used as a web service embedded in a Galaxy instance
+(cf. http://galaxy.fml.tuebingen.mpg.de/tool_runner?tool_id=rquantweb).
+The Galaxy tool configuration file of rQuant is located in the
+subdirectory galaxy along with XML file for loading example data and
+instructions (rquant_web.xml and rquant_web_instructions.xml,
+respectively). Please adapt the paths to the respective tools in
+command section of the XML files as indicated.
+The subdirectory test_data contains all data for running a functional
+test in Galaxy (e.g. with sh run_functional_test.sh -id rquantweb). You
+may need to move these test files into the Galaxy test-data directory.
+
+DOCUMENTATION
+More information is available in doc/rquant_web_instructions.txt,
+doc/rquant_web.txt, and doc/read_stats.txt. Examples for running
+rQuant can be found in examples/./run_example.sh.
+You can also find information on rQuant.web and rQuant on
+http://fml.mpg.de/raetsch/suppl/rquant/web and
+http://fml.mpg.de/raetsch/suppl/rquant, respectively.
+
+LICENSE
+rQuant is licensed under the GPL version 3 or any later version
+(cf. LICENSE).
+
+CITE US
+If you use rQuant in your research you are kindly asked to cite the
+following publications:
+* Regina Bohnert and Gunnar Raetsch: rQuant.web: A tool for
+RNA-Seq-based transcript quantitation. Nucleic Acids Research,
+38(Suppl 2):W348-51, July 2010.
+* Regina Bohnert, Jonas Behr, and Gunnar Raetsch: Transcript quantification
+with RNA-Seq data. BMC Bioinformatics, 10(S13):P5, October 2009.
+
View
@@ -0,0 +1 @@
+2.1
View
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# Written (W) 2009-2010 Regina Bohnert, Gunnar Raetsch
+# Copyright (C) 2009-2010 Max Planck Society
+#
+
+until [ -z $1 ] ; do
+ if [ $# != 1 ];
+ then
+ echo -n "'$1', "
+ else
+ echo -n "'$1'"
+ fi
+ shift
+done
View
View
View
View
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# Written (W) 2009-2011 Regina Bohnert, Gunnar Raetsch
+# Copyright (C) 2009-2011 Max Planck Society
+#
+
+
+export RQUANT_VERSION=2.1
+export RQUANT_PATH=
+export RQUANT_SRC_PATH=
+export INTERPRETER=
+export MATLAB_BIN_PATH=
+export MATLAB_MEX_PATH=
+export MATLAB_INCLUDE_DIR=
+export OCTAVE_BIN_PATH=
+export OCTAVE_MKOCT=
+export SAMTOOLS_DIR=
+export PYTHON_PATH=
+export SCIPY_PATH=
+
+if [ -z "${RQUANT_PATH}" ]; then echo Warning: variable RQUANT_PATH not set\; consider running ./setup_rquant.sh ; fi
View
View
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# Written (W) 2009-2010 Regina Bohnert, Gunnar Raetsch
+# Copyright (C) 2009-2010 Max Planck Society
+#
+
+# rQuant wrapper script to start the interpreter with the correct list of arguments
+
+set -e
+
+PROG=`basename $0`
+DIR=`dirname $0`
+
+exec ${DIR}/start_interpreter.sh ${PROG} "`${DIR}/genarglist.sh $@`"
View
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# Written (W) 2009-2010 Regina Bohnert, Gunnar Raetsch
+# Copyright (C) 2009-2010 Max Planck Society
+#
+
+set -e
+
+. `dirname $0`/rquant_config.sh
+
+export MATLAB_RETURN_FILE=`tempfile`
+
+if [ "$INTERPRETER" == 'octave' ];
+then
+ echo exit | ${OCTAVE_BIN_PATH} --eval "global SHELL_INTERPRETER_INVOKE; SHELL_INTERPRETER_INVOKE=1; addpath $RQUANT_SRC_PATH; rquant_config; $1($2); exit;" || (echo starting Octave failed; rm -f $MATLAB_RETURN_FILE; exit -1) ;
+fi
+
+if [ "$INTERPRETER" == 'matlab' ];
+then
+ echo exit | ${MATLAB_BIN_PATH} -nodisplay -r "global SHELL_INTERPRETER_INVOKE; SHELL_INTERPRETER_INVOKE=1; addpath $RQUANT_SRC_PATH; rquant_config; $1($2); exit;" || (echo starting Matlab failed; rm -f $MATLAB_RETURN_FILE; exit -1) ;
+fi
+
+test -f $MATLAB_RETURN_FILE || exit 0
+ret=`cat $MATLAB_RETURN_FILE` ;
+rm -f $MATLAB_RETURN_FILE
+exit $ret
+
+
View
@@ -0,0 +1,50 @@
+**What it does**
+
+`ReadStats` generates a statistic about the read alignments (number of reads) and the covered genes (read coverage, number of covered introns, intron coverage). It can be used to perform a sanity check of the read alignments file and the annotation.
+
+**Inputs**
+
+`ReadStats` requires three input files to run:
+
+1. The Genome Information Object, containing essential information about the genome (sequence, size, etc). It can be created using the `GenomeTool` from a fasta file.
+2. The Genome Annotation Object, containing the necessary information about the transcripts that are to be quantified. It can be constructed using the `GFF2Anno` tool from an annotation in GFF3 format.
+3. The BAM alignment file, which stores the read alignments in a compressed format. It can be generated using the `SAM-to-BAM` tool in the NGS: SAM Tools section.
+
+
+**Output**
+
+`ReadStats` writes an output file (Read Statistic) containing
+
+1. the number of reads,
+2. the read coverage of the given genes,
+3. the number of covered introns, and
+4. the intron coverage.
+
+------
+
+.. class:: infomark
+
+**About formats**
+
+**GFF3 format** General Feature Format is a format for describing genes
+and other features associated with DNA, RNA and protein
+sequences. GFF3 lines have nine tab-separated fields:
+
+1. seqid - The name of a chromosome or scaffold.
+2. source - The program that generated this feature.
+3. type - The name of this type of feature. Some examples of standard feature types are "gene", "CDS", "protein", "mRNA", and "exon".
+4. start - The starting position of the feature in the sequence. The first base is numbered 1.
+5. stop - The ending position of the feature (inclusive).
+6. score - A score between 0 and 1000. If there is no score value, enter ".".
+7. strand - Valid entries include '+', '-', or '.' (for don't know/care).
+8. phase - If the feature is a coding exon, frame should be a number between 0-2 that represents the reading frame of the first base. If the feature is not a coding exon, the value should be '.'.
+9. attributes - All lines with the same group are linked together into a single item.
+
+For more information see http://www.sequenceontology.org/gff3.shtml
+
+**SAM/BAM format** The Sequence Alignment/Map (SAM) format is a
+tab-limited text format that stores large nucleotide sequence
+alignments. BAM is the binary version of a SAM file that allows for
+fast and intensive data processing. The format specification and the
+description of SAMtools can be found on
+http://samtools.sourceforge.net/.
View
@@ -0,0 +1,68 @@
+**What it does**
+
+`rQuant` determines the abundances of a given set transcripts based on aligned reads from an RNA-Seq experiment.
+
+**Inputs**
+
+`rQuant` requires two input files to run:
+
+1. Annotation file either in GFF3 or AGS format, containing the necessary information about the transcripts that are to be quantified.
+2. The BAM alignment file, which stores the read alignments in a compressed format. It can be generated using the `SAM-to-BAM` tool in the NGS: SAM Tools section.
+
+For the feature Transcript Profiles you have three options:
+
+1. "No profiles": This disables the estimation of the density model.
+2. "Load profiles": You can load a pre-learned density model (consisting of transcripts profiles).
+3. "Learn profiles": This enables the estimation of the density model. You can specify the number of iterations. As an additional output one file describing the density model (transcripts profiles) is generated in your history.
+
+
+**Output**
+
+`rQuant` generates a GFF3 file with the attributes `ARC` and `RPKM` that describe the abundance of a transcript in ARC (estimated average read coverage) and RPKM (reads per kilobase of exon model per million mapped reads), respectively.
+
+------
+
+**Licenses**
+
+If **rQuant.web** is used to obtain results for scientific publications it
+should be cited as [1]_ or [2]_.
+
+**References**
+
+.. [1] Bohnert, R, and Raetsch, G (2010): `rQuant.web. A tool for RNA-Seq-based transcript quantitation`_. Nucleic Acids Research, 38(Suppl 2):W348-51.
+
+.. [2] Bohnert, R, Behr, J, and Raetsch, G (2009): `Transcript quantification with RNA-Seq data`_. BMC Bioinformatics, 10(S13):P5.
+
+.. _rQuant.web. A tool for RNA-Seq-based transcript quantitation: http://nar.oxfordjournals.org/cgi/content/abstract/38/suppl_2/W348
+.. _Transcript quantification with RNA-Seq data: http://www.biomedcentral.com/1471-2105/10/S13/P5
+
+------
+
+.. class:: infomark
+
+**About formats**
+
+**GFF3 format** General Feature Format is a format for describing genes and other features associated with DNA, RNA and protein sequences. GFF3 lines have nine tab-separated fields:
+
+1. seqid - The name of a chromosome or scaffold.
+2. source - The program that generated this feature.
+3. type - The name of this type of feature. Some examples of standard feature types are "gene", "CDS", "protein", "mRNA", and "exon".
+4. start - The starting position of the feature in the sequence. The first base is numbered 1.
+5. stop - The ending position of the feature (inclusive).
+6. score - A score between 0 and 1000. If there is no score value, enter ".".
+7. strand - Valid entries include '+', '-', or '.' (for don't know/care).
+8. phase - If the feature is a coding exon, frame should be a number between 0-2 that represents the reading frame of the first base. If the feature is not a coding exon, the value should be '.'.
+9. attributes - All lines with the same group are linked together into a single item.
+
+For the quantitation we provide two additional attributes:
+
+1. ARC: estimated average read coverage (direct output from rQuant)
+2. RPKM: the number of reads per thousand bases per million mapped reads
+
+describing the estimated expression value for each transcript.
+
+For more information see http://www.sequenceontology.org/gff3.shtml
+
+**AGS format** Annotation Gene Structure Object is an internal structure that efficiently stores the information from a GFF3 file.
+
+**SAM/BAM format** The Sequence Alignment/Map (SAM) format is a tab-limited text format that stores large nucleotide sequence alignments. BAM is the binary version of a SAM file that allows for fast and intensive data processing. The format specification and the description of SAMtools can be found on http://samtools.sourceforge.net/.
Oops, something went wrong.

0 comments on commit 24e586c

Please sign in to comment.