Skip to content
Commits on Source (8)
......@@ -6,6 +6,7 @@ auxprogs/utrrnaseq/Debug/src/*.o
auxprogs/utrrnaseq/Debug/utrrnaseq
auxprogs/utrrnaseq/*.gff
src/*.o
src/googletest/*.o
auxprogs/bam2hints/bam2hints
auxprogs/bam2hints/bam2hints.o
auxprogs/bam2wig/bam2wig
......
language: generic
matrix:
include:
- os: linux
dist: xenial
sudo: required
- os: linux
dist: trusty
sudo: required
sudo: required
addons:
apt:
packages:
- doxygen
- doxygen-doc
- doxygen-latex
- doxygen-gui
- graphviz
services:
- docker
......@@ -8,4 +27,16 @@ before_install:
- printenv | grep -E '^TRAVIS_' > .env
script:
- docker build -t augustus .
- docker build -f Dockerfile -t augustus .
- docker build -f Dockerfile-cgp-file -t augustus-cgp-file .
- docker build -f Dockerfile-cgp-mysql -t augustus-cgp-mysql .
- docker build -f Dockerfile-cgp-sqlite -t augustus-cgp-sqlite .
- doxygen doxygen.conf
deploy:
provider: pages
skip-cleanup: true
local-dir: $TRAVIS_BUILD_DIR/doxygen/html
github-token: $GITHUB_API_KEY
on:
branch: master
......@@ -18,10 +18,7 @@ RUN apt-get install -y libncurses5-dev
# Install additional dependencies for bam2wig
RUN apt-get install -y libssl-dev libcurl3-dev
# Clone AUGUSTUS repository
RUN git clone --recursive https://github.com/Gaius-Augustus/Augustus /root/augustus
# Build bam2wig dependencies (htslib, bfctools, tabix, samtools)
# Build bam2wig dependencies (htslib, bfctools, samtools)
RUN git clone https://github.com/samtools/htslib.git /root/htslib
WORKDIR "/root/htslib"
RUN autoheader
......@@ -36,9 +33,6 @@ RUN autoconf
RUN ./configure
RUN make
RUN make install
RUN git clone https://github.com/samtools/tabix.git /root/tabix
WORKDIR "/root/tabix"
RUN make
RUN git clone https://github.com/samtools/samtools.git /root/samtools
WORKDIR "/root/samtools"
RUN autoheader
......@@ -48,8 +42,11 @@ RUN make
RUN make install
ENV TOOLDIR="/root"
# Clone AUGUSTUS repository
ADD / /root/augustus
# Build bam2wig
RUN mkdir /root/augustus/bin
RUN mkdir -p /root/augustus/bin
WORKDIR "/root/augustus/auxprogs/bam2wig"
RUN make
......@@ -57,6 +54,7 @@ RUN make
WORKDIR "/root/augustus"
RUN make
RUN make install
ENV PATH="/root/augustus/bin:${PATH}"
# Test AUGUSTUS
RUN make test
FROM ubuntu:18.04
# Install required packages
RUN apt-get update
RUN apt-get install -y build-essential wget git autoconf
# Install dependencies for AUGUSTUS
RUN apt-get install -y libboost-iostreams-dev zlib1g-dev
RUN apt-get install -y libgsl-dev libboost-graph-dev libsuitesparse-dev liblpsolve55-dev libsqlite3-dev libmysql++-dev
RUN apt-get install -y libbamtools-dev
RUN apt-get install -y libboost-all-dev
# Install additional dependencies for htslib and samtools
RUN apt-get install -y libbz2-dev liblzma-dev
RUN apt-get install -y libncurses5-dev
# Install additional dependencies for bam2wig
RUN apt-get install -y libssl-dev libcurl3-dev
# Build bam2wig dependencies (htslib, bfctools, samtools)
RUN git clone https://github.com/samtools/htslib.git /root/htslib
WORKDIR "/root/htslib"
RUN autoheader
RUN autoconf
RUN ./configure
RUN make
RUN make install
RUN git clone https://github.com/samtools/bcftools.git /root/bcftools
WORKDIR "/root/bcftools"
RUN autoheader
RUN autoconf
RUN ./configure
RUN make
RUN make install
RUN git clone https://github.com/samtools/samtools.git /root/samtools
WORKDIR "/root/samtools"
RUN autoheader
RUN autoconf -Wno-syntax
RUN ./configure
RUN make
RUN make install
ENV TOOLDIR="/root"
# Clone AUGUSTUS repository
ADD / /root/augustus
WORKDIR "/root/augustus"
RUN sed -i "s/# COMPGENEPRED = true/COMPGENEPRED = true/g" /root/augustus/common.mk
# Build bam2wig
RUN mkdir -p /root/augustus/bin
WORKDIR "/root/augustus/auxprogs/bam2wig"
RUN make
# Build AUGUSTUS
WORKDIR "/root/augustus"
RUN make
RUN make install
# Test AUGUSTUS
RUN make test
FROM ubuntu:18.04
# Install required packages
RUN apt-get update
RUN apt-get install -y build-essential wget git autoconf
# Install dependencies for AUGUSTUS
RUN apt-get install -y libboost-iostreams-dev zlib1g-dev
RUN apt-get install -y libgsl-dev libboost-graph-dev libsuitesparse-dev liblpsolve55-dev libsqlite3-dev libmysql++-dev
RUN apt-get install -y libbamtools-dev
RUN apt-get install -y libboost-all-dev
# Install additional dependencies for htslib and samtools
RUN apt-get install -y libbz2-dev liblzma-dev
RUN apt-get install -y libncurses5-dev
# Install additional dependencies for bam2wig
RUN apt-get install -y libssl-dev libcurl3-dev
# Build bam2wig dependencies (htslib, bfctools, samtools)
RUN git clone https://github.com/samtools/htslib.git /root/htslib
WORKDIR "/root/htslib"
RUN autoheader
RUN autoconf
RUN ./configure
RUN make
RUN make install
RUN git clone https://github.com/samtools/bcftools.git /root/bcftools
WORKDIR "/root/bcftools"
RUN autoheader
RUN autoconf
RUN ./configure
RUN make
RUN make install
RUN git clone https://github.com/samtools/samtools.git /root/samtools
WORKDIR "/root/samtools"
RUN autoheader
RUN autoconf -Wno-syntax
RUN ./configure
RUN make
RUN make install
ENV TOOLDIR="/root"
# Clone AUGUSTUS repository
ADD / /root/augustus
RUN sed -i "s/#.*MYSQL = true/MYSQL = true/g" /root/augustus/common.mk
RUN sed -i "s/# COMPGENEPRED = true/COMPGENEPRED = true/g" /root/augustus/common.mk
# Build bam2wig
RUN mkdir -p /root/augustus/bin
WORKDIR "/root/augustus/auxprogs/bam2wig"
RUN make
# Build AUGUSTUS
WORKDIR "/root/augustus"
RUN make
RUN make install
# Test AUGUSTUS
RUN make test
FROM ubuntu:18.04
# Install required packages
RUN apt-get update
RUN apt-get install -y build-essential wget git autoconf
# Install dependencies for AUGUSTUS
RUN apt-get install -y libboost-iostreams-dev zlib1g-dev
RUN apt-get install -y libgsl-dev libboost-graph-dev libsuitesparse-dev liblpsolve55-dev libsqlite3-dev libmysql++-dev
RUN apt-get install -y libbamtools-dev
RUN apt-get install -y libboost-all-dev
# Install additional dependencies for htslib and samtools
RUN apt-get install -y libbz2-dev liblzma-dev
RUN apt-get install -y libncurses5-dev
# Install additional dependencies for bam2wig
RUN apt-get install -y libssl-dev libcurl3-dev
# Build bam2wig dependencies (htslib, bfctools, samtools)
RUN git clone https://github.com/samtools/htslib.git /root/htslib
WORKDIR "/root/htslib"
RUN autoheader
RUN autoconf
RUN ./configure
RUN make
RUN make install
RUN git clone https://github.com/samtools/bcftools.git /root/bcftools
WORKDIR "/root/bcftools"
RUN autoheader
RUN autoconf
RUN ./configure
RUN make
RUN make install
RUN git clone https://github.com/samtools/samtools.git /root/samtools
WORKDIR "/root/samtools"
RUN autoheader
RUN autoconf -Wno-syntax
RUN ./configure
RUN make
RUN make install
ENV TOOLDIR="/root"
# Clone AUGUSTUS repository
ADD / /root/augustus
RUN sed -i "s/# SQLITE = true/SQLITE = true/g" /root/augustus/common.mk
RUN sed -i "s/# COMPGENEPRED = true/COMPGENEPRED = true/g" /root/augustus/common.mk
# Build bam2wig
RUN mkdir -p /root/augustus/bin
WORKDIR "/root/augustus/auxprogs/bam2wig"
RUN make
# Build AUGUSTUS
WORKDIR "/root/augustus"
RUN make
RUN make install
# Test AUGUSTUS
RUN make test
List of changes from version 3.3.2 to 3.3.3 (until Sep 13th, 2019)
- docker container
- new script tfix_in_frame_stop_codon_genes.py that replaces genes where spliced in-frame stop codons were predicted
- new scripts: compare_masking.pl, merge_masking.pl
- new program bamToWig.py as alternarive to bam2wig C++ binary
- fix warnings on new GCC compiler (8.3)
- introduced unit tests of C++ code (make test)
- bugfixes (lex.cc, autoAug.pl)
- DIAMOND as alternative to BLAST in aa2nonred.pl
List of changes from version 3.3.1 to 3.3.2 (until Oct 5th, 2018)
- bugfixes in comparative augustus, utrrnaseq
- new species Chiloscyllium punctatum (bamboo shark), Scyliorhinus torazame (cat shark), Rhincodon typus (whale shark)
......@@ -42,7 +51,7 @@ List of changes from version 3.2 to 3.2.1 (until October 23rd, 2015)
- comparative gene prediction (CGP): make the parameters from the GCB proceedings paper match again
- new CGP default parameters (tested on 5 clades)
- CGP version penalizes very long introns equivalently to a geometric distribution
- code now under artistic licence only
- code now under artistic license only
List of changes from version 3.1 to 3.2 (until September 25th, 2015)
- comparative gene prediction (CGP option) has sensible default parameters of the logistic regression model
- new tool hal2maf_split.pl for splitting an alignment for parallel comparative prediction
......@@ -85,10 +94,10 @@ List of changes from version 3.0.2 to 3.0.3 (until August 28th, 2014)
- other bugfixes in comparative mode
- removal of mysql++ code from package: this is available as Debian/Ubuntu package
List of changes from version 3.0 to 3.0.2 (until February 22nd, 2014)
- inclusion of scanner and parser code for Newick tree format (GPL licence), easier installation of
- inclusion of scanner and parser code for Newick tree format (GPL license), easier installation of
comparative augustus functionality
- therefore release under more restrictive GPL licence (the plan is to replace this later
and switch back to the more permissive and non-viral artistic open source licence)
- therefore release under more restrictive GPL license (the plan is to replace this later
and switch back to the more permissive and non-viral artistic open source license)
- drop requirement to set environment variable AUGUSTUS_CONFIG_PATH
- bugfixes (etraining: "not Genbank format", gtf2gff.pl, compilation warning)
List of changes from version 2.7 to 3.0 (until January 8th, 2014)
......@@ -153,7 +162,7 @@ List of changes from version 2.4 to 2.5 (until Nov 13th, 2010)
- new species pneumocystis (fungus), user contributed by Marco Pagni
List of changes from version 2.3.1 to 2.4 (until July 27, 2010)
- improved human parameter set: roughly 13 percent points better on CDS exon level
- improved fly paramter set
- improved fly parameter set
- added new species 'lamprey', contributed by Falk Hildebrand and Shigehiro Kuraku
- added new species Leishmania tarentolae, Trichinella spiralis
- added maize5 parameter set, better than 'maize' and with UTR model
......@@ -274,7 +283,7 @@ List of changes from version 1.6 to version 1.7 (until October 5th, 2005):
List of changes from version 1.5 to version 1.6 (until August 3rd, 2005):
- The source code is now freely available (Artistic Licence).
- The source code is now freely available (Artistic License).
- New species: Tribolium castaneum, Aedes aegypti, Coprinus cinereus
- Bugfix: Wrong interpretation of reading frame for reverse strand exon hints.
- Training of hints possible with nested genes.
......
......@@ -29,7 +29,6 @@ install:
release:
find . -name "*~" | xargs rm -f
rm -f src/makedepend.pl
rm -r augustus-training
cd docs/tutorial2015/results; ls | grep -v do.sh | grep -v README | xargs rm; cd -
rm -r auxprogs/utrrnaseq/input/human-chr19
rm -r docs/tutorial-cgp/results/cactusout
......@@ -39,6 +38,8 @@ release:
cd ..; tar -czf augustus-$(AUGVERSION).tar.gz augustus-$(AUGVERSION)
test:
cd src && ${MAKE} unittest
cd src/unittests && ./unittests
./bin/augustus --species=human --UTR=on examples/example.fa
# remove -static from src/Makefile for MAC users
......
[![Build Status](https://travis-ci.org/Gaius-Augustus/Augustus.svg?branch=master)](https://travis-ci.org/Gaius-Augustus/Augustus)
# Gene Prediction with AUGUSTUS in comparative gene prediction (cgp) mode
genes are predicted simultaneously in several aligned genomes
[INTRODUCTION](#introduction)
[INSTALLATION](#installation)
[RUNNING AUGUSTUS IN CGP MODE](docs/RUNNING-AUGUSTUS-IN-CGP-MODE.md)
[BUILDING THE NEWICK PARSER FROM SCRATCH](docs/CHANGE-TREE-PARSER.md)
(not needed unless you run into compiler errors related to 'parse.cc' or 'lex.cc')
[AUTHORS AND CONTACT](docs/CONTACT.md)
[REFERENCES](README.md#references)
[LICENSES](README.md#licenses)
# INTRODUCTION
The cgp mode is an extension to AUGUSTUS that takes an alignment of two or more genomes
and simultaneously predicts genes in all of them.
Beside the genomes and the alignment, a phylogenetic tree of the species is required input.
AUGUSTUS-cgp can either be used
- de novo, or
- with extrinsic evidence for any subset of species
Such evidence includes for example already existing and trusted gene structures
or hints from RNA-Seq alignments.
Both genomes and extrinsic evidence can either be read in from a flat file or
alternatively retrieved from a MySQL or SQLite database.
All three approaches are described below in more detail.
This manual assumes that you are already familiar with AUGUSTUS
and that you know how to use AUGUSTUS for gene prediction in a single genome.
# INSTALLATION
## Install dependencies
See [these instructions](README.md#install-dependencies) for a complete overview.
## Enable cgp mode
Open the file [common.mk](./common.mk) with a text editor and uncomment the
following lines to enable comparative gene prediction.
COMPGENEPRED = true
To support a SQLite database uncomment this line
SQLite = true
or for MySQL this
MYSQL = true
## Compile from sources
Once all dependencies are available, you can compile AUGUSTUS using make.
make
In case you had previously compiled AUGUSTUS with disabled cgp mode first you
have to call
make clean
After compilation has finished, the command bin/augustus should be executable
and print a usage message.
This diff is collapsed.
This diff is collapsed.
......@@ -20,7 +20,8 @@ LINK.cc = g++
# $@: full target name of current target.
# $<: .c file of target.
bam2hints : $(OBJECTS)
$(LINK.cc) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
$(LINK.cc) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
mkdir -p ../../bin
cp bam2hints ../../bin
all:$(OBJECTS) # Compiles each foo.cc into foo.o
......
......@@ -541,7 +541,7 @@ int main(int argc, char* argv[])
<< " CACW21662.g1 3 C2 5TNS Unknown\n"
<< " CACW25491.g1 3 F21 5TNS 3TNS-NP\n"
*/
<< " --maxgenelen=n -G alignments of the same clone are considered to be of the same gene if not separeted by more than this (set to " << MaxGeneLen << ")\n"
<< " --maxgenelen=n -G alignments of the same clone are considered to be of the same gene if not separated by more than this (set to " << MaxGeneLen << ")\n"
<< " Alignments that span more than this are ignored, but better filter long introns through an alignment program.\n"
<< " --help -h show this help text\n"
<< "\n";
......@@ -560,7 +560,7 @@ int main(int argc, char* argv[])
// Estimating the right value of the arrays: PSLb; PSLq; PSLt; BlockBegins; BlockEnds and FolOK;
// This is done by sweeping through all the alignments and calculating the maxBlock size.
cout << "Wait a moment, calculating maximum block size that needs to be allocated... ";
// cout << "Wait a moment, calculating maximum block size that needs to be allocated... ";
int alignmentBlock, maxBlock=0;
while (BAM.GetNextAlignment(*pal))
{
......@@ -576,7 +576,7 @@ int main(int argc, char* argv[])
if (alignmentBlock >= maxBlock) maxBlock = alignmentBlock;
} // end while
cout << ".. done" << endl;
// cout << ".. done" << endl;
// closing and opening handle of BAM file
BAM.Close();
......@@ -587,7 +587,7 @@ int main(int argc, char* argv[])
SamHeader header = BAM.GetHeader();
if(header.HasSortOrder() && header.SortOrder == "unsorted" && IntOnly && Mult)
{
cout << "\nBAM file MUST be sorted by target sequence names when 'intronsonly' and 'mult' options are active\n";
cout << "\nBAM file MUST be sorted by read names (samtools sort -n) when 'intronsonly' and 'mult' options are active\n";
return -1;
}
......@@ -820,13 +820,13 @@ int main(int argc, char* argv[])
// check if there is a proper old target
if(OldTargetID >= 0) // -1 <-> "*"(unknown reference), -2 <-> uninitialized
{
// check previous occurence of that target
// check previous occurrence of that target
if(seenRefSet.find(TargetName) != seenRefSet.end())
{
if(IntOnly && Mult)
{
// require sorting and abort
cout << "\nBAM file MUST be sorted by target sequence names when 'intronsonly' and 'mult' options are active\n";
cout << "\nBAM file MUST be sorted by read names (samtools sort -n) when 'intronsonly' and 'mult' options are active\n";
return -1;
}
}
......@@ -1069,11 +1069,11 @@ int main(int argc, char* argv[])
// TASK: else store alignment pointer into map
// TASK: set new or reuse "pal"
} // end while (parsing through bam aligment lines)
} // end while (parsing through bam alignment lines)
// newline after display of the line count
cout << "\n";
// newline after display of the line count, has been commented out above
//cout << "\n";
// print the last hints
printHints(GFF, "");
......
# Makefile of bam2wig
#
# NOTE: Modify the variable TOOLDIR according to where your samtools/htslib/bcftools/tabix software has been installed
#
# Created: 12-June-2012
# Last modified: 10-NOV-2017
# NOTE: Modify the variable TOOLDIR according to where your samtools/htslib/bcftools software has been installed
#
# License: Artistic License, see file LICENSE.TXT or
# https://opensource.org/licenses/artistic-license-1.0
#
ifndef TOOLDIR
TOOLDIR=$(HOME)/tools
# replace with your own parent directory of samtools, htslib, bcftools, tabix
# replace with your own parent directory of samtools, htslib, bcftools
# if TOOLDIR is not specified as environment variable
endif
PROGRAM = bam2wig
SOURCES = $(PROGRAM)
OBJECTS = $(SOURCES:.c=.o)
SAMTOOLS=$(TOOLDIR)/samtools/
HTSLIB=$(TOOLDIR)/htslib/
BCFTOOLS=$(TOOLDIR)/bcftools/
TABIX=$(TOOLDIR)/tabix/
INCLUDES=-I$(SAMTOOLS) -I. -I$(HTSLIB) -I$(BCFTOOLS) -I$(TABIX)
SAMTOOLS=$(TOOLDIR)/samtools
HTSLIB=$(TOOLDIR)/htslib
BCFTOOLS=$(TOOLDIR)/bcftools
INCLUDES=-I$(SAMTOOLS) -I. -I$(HTSLIB) -I$(BCFTOOLS)
VPATH=$(SAMTOOLS)
LIBS=$(SAMTOOLS)/libbam.a $(HTSLIB)/libhts.a -lcurses -lm -lz -lpthread -lcurl -lssl -lcrypto
CFLAGS=-Wall -O2 $(INCLUDES)
......@@ -27,6 +26,7 @@ CC=gcc
$(PROGRAM) : bam2wig.o
$(CC) $(CFLAGS) $^ -o $@ $(LIBS) -lbz2 -llzma
mkdir -p ../../bin
cp bam2wig ../../bin/bam2wig
bam2wig.o : bam2wig.c
......
......@@ -4,12 +4,11 @@ Installation instructions:
* bcftools
* htslib
* samtools
* tabix
You find those tools at https://github.com/samtools . bam2wig has been tested with samtools 0.2.0-rc7
We recommend that you install all four tools into one directory that we will further refer to as the
We recommend that you install all three tools into one directory that we will further refer to as the
TOOLDIR. For example, you can install all tools into your home directory, which will result into
four folders in your home directory: bcftools, htslib, samtools and tabix.
three folders in your home directory: bcftools, htslib and samtools.
Installation example:
......@@ -29,10 +28,6 @@ Installation instructions:
make
sudo make install
cd ..
git clone https://github.com/samtools/tabix.git
cd tabix
make
cd ..
git clone https://github.com/samtools/samtools.git
cd samtools
autoheader
......@@ -61,6 +56,3 @@ b) ./bam2wig -t "my_specified_track" -r chr3L test.s.bam
Example (b) can only be done if an index file for test.s.bam exists.
Do "samtools index test.s.bam" and a file "test.s.bam.bai" will be generated.
Tonatiuh Pena Centeno, Katharina Hoff
29 November 2017
......@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
}
// Initialising auxiliary data structures
// Initializing auxiliary data structures
data = calloc(1, sizeof(void*)); // data[0] is array for just one BAM file
// set the default region. left-shift "end" by appending 30 zeros (i.e. end=1073741824)
beg = 0; end = 1<<30; tid = -1;
......@@ -116,6 +116,14 @@ int main(int argc, char *argv[])
if (tid >= 0)
{ // if a region is specified and parsed successfully
bam_index_t *idx = bam_index_load(argv[optind]); // load the index
if (idx == NULL)
{
fprintf(stderr, "Missing indexed BAM file!\n");
fprintf(stderr, "See: samtools index\n");
exit(1);
}
data[0]->iter = bam_iter_query(idx, tid, beg, end); // set the iterator
bam_index_destroy(idx); // the index is not needed any more; phase out of the memory
}
......
......@@ -149,7 +149,7 @@ int main(int argc, char *argv[])
optionalCounters.outPaired = outPaired;
optionalCounters.outUniq = outUniq;
optionalCounters.outBest = outBest;
// Initialising options
// Initializing options
struct globalOptions_t globalOptions;
globalOptions = initOptions(argc, argv);
bool best = globalOptions.best;
......
......@@ -55,7 +55,7 @@ MatePairs::MatePairs(const MatePairs &copyin) // Copy constructor to handle pa
this->score = copyin.score;
}
// Initialisation method
// Initialization method
MatePairs::MatePairs(int it, int jit, float score)
{
this->alIt = it;
......@@ -63,7 +63,7 @@ MatePairs::MatePairs(int it, int jit, float score)
this->score = score;
}
// Initialisation method
// Initialization method
void MatePairs::setValues(int it, int jit, float score)
{
this->alIt = it;
......
......@@ -51,7 +51,7 @@ PairednessCoverage::PairednessCoverage(const PairednessCoverage &copyin) // Co
this->chr = copyin.chr;
}
// Initialisation method
// Initialization method
PairednessCoverage::PairednessCoverage(int coord, int label, string chr)
{
this->coord = coord;
......@@ -60,7 +60,7 @@ PairednessCoverage::PairednessCoverage(int coord, int label, string chr)
}
// Initialisation method
// Initialization method
void PairednessCoverage::setValues(int coord, int label, string chr)
{
this->coord = coord;
......
......@@ -75,7 +75,7 @@ SingleAlignment::SingleAlignment(BamAlignment *al, float coverage, float percId,
}
// Initialisation method
// Initialization method
void SingleAlignment::setValues(BamAlignment *al, float coverage, float percId, const RefVector *refData)
{
this->al = al;
......