Skip to content

Commit

Permalink
pullmerge
Browse files Browse the repository at this point in the history
Merge branch 'devel' of github.com:trinityrnaseq/trinityrnaseq into devel
  • Loading branch information
brianjohnhaas committed Jan 9, 2019
2 parents e69d897 + f833ab2 commit 3159f7c
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 48 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.o
*.pyc
*.swp
*~
/Chrysalis/bin
Expand Down
89 changes: 68 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ sudo: false
git:
depth: 1
language: generic
# Custom definitions
.conditions:
if: &secondary type = cron OR env(SECONDARY) = true
matrix:
include:
# http://www.cpan.org/src/
Expand All @@ -11,32 +14,57 @@ matrix:
- language: perl
perl: "5.26-shrplib"
env: CC=gcc-8 CXX=g++-8
# https://docs.travis-ci.com/user/languages/cpp/
- language: cpp
compiler: clang
# https://docs.travis-ci.com/user/languages/java/
- language: java
jdk: oraclejdk9
env: CC=gcc-6 CXX=g++-6
# https://docs.travis-ci.com/user/languages/python/
- language: python
python: "3.6"
- language: generic
env: CC=clang-3.9 CXX=clang++-3.9 LDFLAGS="-fopenmp=libiomp5"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.9
packages:
- clang-3.9
if: *secondary
- language: generic
# Open MP support is available from clang-3.7.
env: CC=clang-3.7 CXX=clang++-3.7 LDFLAGS="-fopenmp=libiomp5"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
packages:
- clang-3.7
if: *secondary
# Test old version of the dependency packages.
- language: perl
perl: "5.18-shrplib"
env: BOWTIE2_VERSION=2.2.6
if: *secondary
# https://docs.travis-ci.com/user/reference/osx
- os: osx
language: cpp
# Do not have to set "compiler: gcc" as it is actually clang on osx.
compiler: clang
- os: osx
osx_image: xcode9.4
env: CC=gcc-8 CXX=g++-8
- os: osx
osx_image: xcode9.4
# "clang++" installed by [email protected] instead of "clang++-3.9".
env: CC=clang-3.9 CXX=clang++
if: *secondary
- os: osx
osx_image: xcode9.4
env: CC=clang-3.7 CXX=clang++-3.7
if: *secondary
allow_failures:
- language: cpp
compiler: clang
- env: BOWTIE2_VERSION=2.2.6
- env: CC=clang-3.7 CXX=clang++-3.7 LDFLAGS="-fopenmp=libiomp5"
- os: osx
env: CC=clang-3.7 CXX=clang++-3.7
fast_finish: true
install:
- |
Expand All @@ -56,21 +84,33 @@ install:
echo "Installing ${CXX}."
sudo apt-get install -qq "${CXX}"
fi
if [[ "${CC}" =~ clang- ]]; then
echo "Installing ${CC}."
sudo apt-get install -qq "${CC}" libiomp-dev
fi
else
# osx
export HOMEBREW_NO_AUTO_UPDATE=1
if [[ "${CC}" =~ gcc- ]]; then
# Update command line tool to avoid an error:
# "_stdio.h: No such file or directory", when building samtools.
softwareupdate --list
softwareupdate --install "Command Line Tools (macOS High Sierra version 10.13) for Xcode-9.4"
softwareupdate --install "Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.1"
# Uninstall oclint to install gcc on OSX.
# https://github.com/travis-ci/travis-ci/issues/8826
brew cask uninstall oclint
CC_PKG="$(echo "${CC}" | sed -e 's/-/@/')"
echo "Installing ${CC_PKG}."
brew install "${CC_PKG}"
fi
if [[ "${CC}" =~ clang- ]]; then
echo "Installing ${CC}."
CC_VERSION=$(echo "${CC}" | sed -e 's/^clang-//')
brew install "llvm@${CC_VERSION}"
brew install libomp
CC_PREFIX=$(brew --prefix "llvm@${CC_VERSION}")
export PATH="${CC_PREFIX}/bin:$PATH"
export LDFLAGS="-L${CC_PREFIX}/lib -Wl,-rpath,${CC_PREFIX}/lib"
export CPPFLAGS="-I${CC_PREFIX}/include"
fi
fi
- pushd "${HOME}"
Expand All @@ -93,7 +133,7 @@ install:
- pushd samtools-1.9
- autoheader
- autoconf -Wno-syntax
- ./configure
- ./configure || (cat config.log; false)
- make
- sudo make install
- popd
Expand All @@ -118,7 +158,7 @@ install:
- wget https://github.com/gmarcais/Jellyfish/releases/download/v${JELLYFISH_VERSION}/jellyfish-${JELLYFISH_VERSION}.tar.gz
- tar xzf jellyfish-${JELLYFISH_VERSION}.tar.gz
- pushd jellyfish-${JELLYFISH_VERSION}
- ./configure
- ./configure || (cat config.log; false)
- make
- sudo make install
- popd
Expand Down Expand Up @@ -149,10 +189,17 @@ install:
- sudo pip install numpy

- popd
script:
before_script:
- |
export TRINITY_HOME=`pwd` && \
make && \
make plugins && \
sudo make install > /dev/null && \
make test -C sample_data/test_Trinity_Assembly
function show_log {
for file in $(find . -name config.log); do
echo "config.log File: ${file}"
cat "${file}"
done
}
- export TRINITY_HOME=`pwd`
- make || (show_log; false)
- make plugins || (show_log; false)
- sudo make install > /dev/null
script:
- make test -C sample_data/test_Trinity_Assembly
33 changes: 20 additions & 13 deletions Analysis/SuperTranscripts/AllelicVariants/run_variant_calling.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import logging
import re
import math
import glob

sys.path.insert(0, os.path.sep.join([os.path.dirname(os.path.realpath(__file__)),
"..", "..", "..", "PyLib"]))
Expand Down Expand Up @@ -88,7 +89,13 @@ def main():
GATK_HOME = os.getenv("GATK_HOME")
if not GATK_HOME:
exit("Error, missing path to GATK in $GATK.")


# identify gatk4_jar file
gatk4_jar = glob.glob(os.path.join(GATK_HOME, "gatk-package-4.*-local.jar"))
if len(gatk4_jar) != 1:
raise RuntimeError("Error, cannot locate single gatk-package-4.*-local.jar in {}".format(GATK_HOME))
gatk_path = os.path.abspath(gatk4_jar[0])

# get real paths before changing working directory in case they are relative paths
if args.paired_reads:
reads_paths = [os.path.realpath(f) for f in args.paired_reads]
Expand Down Expand Up @@ -231,10 +238,10 @@ def main():
Pipeliner.Command(UTILDIR + "/clean_bam.pl dedupped.bam dedupped.bam.validation dedupped.valid.bam",
"make_valid_dedupped_bam.ok"),

Pipeliner.Command("java -jar " + GATK_HOME + "/GenomeAnalysisTK.jar " +
"-T SplitNCigarReads -R " + st_fa_path +
" -I dedupped.valid.bam -o splitNCigar.bam " +
" -rf ReassignOneMappingQuality -RMQF 255 -RMQT 60 -U ALLOW_N_CIGAR_READS --validation_strictness LENIENT",
Pipeliner.Command("java -jar " + gatk_path +
" SplitNCigarReads -R " + st_fa_path +
" -I dedupped.valid.bam -O splitNCigar.bam " +
" --read-validation-stringency LENIENT",
"splitNCigarReads.ok")
])
pipeliner.run()
Expand All @@ -245,9 +252,9 @@ def main():
logger.info("Variant Calling using Haplotype Caller.")

pipeliner.add_commands([
Pipeliner.Command("java -jar " + GATK_HOME + "/GenomeAnalysisTK.jar " +
"-T HaplotypeCaller -R " + st_fa_path +
" -I ./splitNCigar.bam -dontUseSoftClippedBases -stand_call_conf 20.0 -o output.vcf",
Pipeliner.Command("java -jar " + gatk_path +
" HaplotypeCaller -R " + st_fa_path +
" -I ./splitNCigar.bam -dont-use-soft-clipped-bases -stand-call-conf 20.0 -O output.vcf",
"haplotypecaller.ok")
])
pipeliner.run()
Expand All @@ -256,16 +263,16 @@ def main():
logger.info("Doing some basic filtering of vcf.")

pipeliner.add_commands([
Pipeliner.Command("java -jar " + GATK_HOME + "/GenomeAnalysisTK.jar " +
"-T VariantFiltration -R " + st_fa_path +
Pipeliner.Command("java -jar " + gatk_path +
" VariantFiltration -R " + st_fa_path +
" -V output.vcf -window 35 -cluster 3 " +
"-filterName FS -filter \"FS > 30.0\" " +
"-filterName QD -filter \"QD < 2.0\" -o filtered_output.vcf",
"--filter-name FS -filter \"FS > 30.0\" " +
"--filter-name QD -filter \"QD < 2.0\" -O filtered_output.vcf",
"variant_filt.ok")
])

pipeliner.run()


logger.info("Done!")

Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
trinityrnaseq
=============

[![Build Status](https://travis-ci.org/trinityrnaseq/trinityrnaseq.svg?branch=master)](https://travis-ci.org/trinityrnaseq/trinityrnaseq)
[![Build Status](https://travis-ci.org/trinityrnaseq/trinityrnaseq.svg?branch=devel)](https://travis-ci.org/trinityrnaseq/trinityrnaseq)
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat-square)](https://bioconda.github.io/recipes/trinity/README.html)

Trinity RNA-Seq de novo transcriptome assembly see the main webpage [http://trinityrnaseq.github.io](http://trinityrnaseq.github.io)

## Contributing

We encourage you to contribute to Trinity! Please check out the [Contributing](https://github.com/trinityrnaseq/trinityrnaseq/wiki/Contributing) for the guidelines.
2 changes: 1 addition & 1 deletion Trinity
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ unless ($NO_RUN_INCHWORM_FLAG || $NO_RUN_CHRYSALIS_FLAG || $bypass_java_version_
if ($java_version =~ /(java|openjdk) version \"1\.(\d)\./) {
$version_id = $2;
}
elsif ($java_version =~ /java version \"(\d+)\" /) {
elsif ($java_version =~ /java version \"(\d+)(\.)?([._\d])+?\" ?/) {
$version_id = $1;
}
elsif ($java_version =~ /java (\d+) /) {
Expand Down
4 changes: 2 additions & 2 deletions trinity-plugins/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

OS := $(shell uname)

CXX=g++
CC=gcc
CXX ?= g++
CC ?= gcc
COLLECTL_CODE="collectl-4.1.0"
PARAFLY_CODE="ParaFly-0.1.0"
TRIMMOMATIC_CODE=Trimmomatic-0.36
Expand Down
2 changes: 1 addition & 1 deletion trinity-plugins/scaffold_iworm_contigs/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CXX = g++
CXX ?= g++
prefix = ../htslib

ScaffoldIwormContigs:
Expand Down
29 changes: 20 additions & 9 deletions util/misc/randomly_sample_PE_fastq.pl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@
srand();
my @selected_indices = &get_random_indices($num_entries, $num_total_records);


if (scalar(@selected_indices) != $num_entries) {
die "Error, get_random_indices returned " . scalar(@selected_indices) . " instead of $num_total_records";
}
else {
print STDERR "-selected $num_entries indices. Now outputting selected records\n";
}

my %selected = map { + $_ => 1 } @selected_indices;

@selected_indices = ();
Expand Down Expand Up @@ -62,8 +68,6 @@
. "Right: " . $right_entry->get_core_read_name() . "\n";
}

$counter++;

if ($selected{$counter}) {

print $left_ofh $left_entry->get_fastq_record();
Expand All @@ -73,18 +77,25 @@
delete($selected{$counter});

}
}

print STDERR " done.\n";

$counter++;
if ($counter % 100000 == 0) {
print STDERR "\r[$counter] ";
}
}

print STDERR "\n\ndone.\n";

close $left_ofh;
close $right_ofh;



if (%selected) {
die "Error, missing indices: " . Dumper(\%selected);
}

else {
print STDERR "-all records located and output.\n";
}

exit(0);
}

Expand Down

0 comments on commit 3159f7c

Please sign in to comment.