Skip to content

Commit

Permalink
Merge branch 'hotfix/2.4.1'
Browse files Browse the repository at this point in the history
* added a topaht-fusion-post patch, in which the contig name bug #37 is fixed
  • Loading branch information
Yaobo Xu committed Oct 18, 2019
2 parents 43dd4fe + 8adce9c commit e8223cb
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGES

## 2.4.1

* added a patched topaht-fusion-post script, in which the contig name bug #37 is fixed

## 2.4.0

* Revised Dockerfile so that the builder stage is properly used and the image size is reduced. Resolved #28.
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ pkg-config \
zlib1g-dev \
zip \
unzip \
patch \
libpng-dev \
python3 python3-dev python3-pip python3-setuptools \
r-base r-base-dev \
Expand Down Expand Up @@ -78,7 +79,7 @@ ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8

# build tools from other repos
ADD build/opt-build.sh build/
ADD build build/
RUN bash build/opt-build.sh $OPT

# build the tools in this repo, separate to reduce build time on errors
Expand All @@ -90,7 +91,7 @@ FROM ubuntu:16.04

LABEL maintainer="cgphelp@sanger.ac.uk" \
uk.ac.sanger.cgp="Cancer, Ageing and Somatic Mutation, Wellcome Trust Sanger Institute" \
version="2.4.0" \
version="2.4.1" \
description="cgpRna docker"

# Version of tools that are installed in both stages, make sure they are consistent.
Expand Down
19 changes: 11 additions & 8 deletions build/opt-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,17 @@ if [ ! -e $SETUP_DIR/starfusion.success ]; then
touch $SETUP_DIR/starfusion.success
fi

# Install tophat
if [ ! -e $SETUP_DIR/tophat.success ]; then
curl -sSL --retry 10 https://ccb.jhu.edu/software/tophat/downloads/tophat-${VER_TOPHAT}.Linux_x86_64.tar.gz > distro.tar.gz
rm -rf distro/*
tar --strip-components 1 -C distro -zxf distro.tar.gz
rm -f distro/AUTHORS distro/LICENSE distro/README
cp -r distro/* $INST_PATH/bin/.
touch $SETUP_DIR/tophat.success
# Install tophat
if [ ! -e $SETUP_DIR/tophat.success ]; then
curl -sSL --retry 10 https://ccb.jhu.edu/software/tophat/downloads/tophat-${VER_TOPHAT}.Linux_x86_64.tar.gz > distro.tar.gz
rm -rf distro/*
tar --strip-components 1 -C distro -zxf distro.tar.gz
rm -f distro/AUTHORS distro/LICENSE distro/README
cp -r distro/* $INST_PATH/bin/.
# patch tophat-fusion-post
patch $INST_PATH/bin/tophat-fusion-post $SCRIPT_PATH/patches/tophat-fusion-post.patch
chmod +x $INST_PATH/bin/tophat-fusion-post
touch $SETUP_DIR/tophat.success
fi

# Install defuse
Expand Down
74 changes: 74 additions & 0 deletions build/patches/tophat-fusion-post.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
--- tophat-fusion-post 2019-10-17 16:06:48.338589724 +0000
+++ tophat-fusion-post.new 2019-10-17 16:08:30.131237030 +0000
@@ -788,7 +788,7 @@

same = False
for chr_coord in left_chrs:
- chr, coord = chr_coord.split(':')
+ chr, coord = chr_coord.rsplit(':', 1)
coord = int(coord)
if chr == chr2 and abs(coord - coord2) < max_intron_len:
same = True
@@ -798,7 +798,7 @@
continue

for chr_coord in right_chrs:
- chr, coord = chr_coord.split(':')
+ chr, coord = chr_coord.rsplit(':', 1)
coord = int(coord)
if chr == chr1 and abs(coord - coord1) < max_intron_len:
same = True
@@ -1225,7 +1225,7 @@
if line[0] == '@':
if line[1:3] == 'SQ':
line = line[:-1].split('\t')
- contig = line[1].split(':')[1]
+ contig = line[1].split(':', 1)[1]
if contig not in contigs:
contigs[contig] = len(contigs)

@@ -1533,7 +1533,7 @@
else:
chr1 = value_str

- chr1, chr1_coord = chr1.split(':')
+ chr1, chr1_coord = chr1.rsplit(':', 1)
chr1_left, chr1_right = chr1_coord.split('-')
chr1_left, chr1_right = int(chr1_left), int(chr1_right)
value_dic["chr1"] = chr1
@@ -1541,7 +1541,7 @@
value_dic["chr1_right"] = chr1_right

if chr2:
- chr2, chr2_coord = chr2.split(':')
+ chr2, chr2_coord = chr2.rsplit(':', 1)
chr2_left, chr2_right = chr2_coord.split('-')
chr2_left, chr2_right = int(chr2_left), int(chr2_right)
value_dic["chr2"] = chr2
@@ -1592,14 +1592,14 @@
exon_list = curr_transcript[-1]

if type == "exon":
- chr, chr_coord = fields[1].split(':')
+ chr, chr_coord = fields[1].rsplit(':', 1)
chr_left, chr_right = chr_coord.split('-')
chr_left, chr_right = int(chr_left), int(chr_right)
exon_list.append(["exon", chr, chr_left, chr_right])
else:
fusion_left, fusion_right = fields[1].split(' ')
- chr1, chr1_pos = fusion_left.split(':')
- chr2, chr2_pos = fusion_right.split(':')
+ chr1, chr1_pos = fusion_left.rsplit(':', 1)
+ chr2, chr2_pos = fusion_right.rsplit(':', 1)

chr1_pos, chr2_pos = int(chr1_pos), int(chr2_pos)
exon_list.append(["fusion", chr1, chr1_pos, chr2, chr2_pos])
@@ -2865,7 +2865,7 @@


def get_version():
- return "2.1.0"
+ return "2.1.0-cgpPatched"


def main(argv=None):
2 changes: 1 addition & 1 deletion cwls/tools/merge_and_mark_dups.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ doc: |

requirements:
- class: DockerRequirement
dockerPull: "quay.io/wtsicgp/cgprna:2.4.0"
dockerPull: "quay.io/wtsicgp/cgprna:2.4.1"

hints:
- class: ResourceRequirement
Expand Down
2 changes: 1 addition & 1 deletion cwls/tools/run-cgprna_bigwig.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ doc: |

requirements:
- class: DockerRequirement
dockerPull: "quay.io/wtsicgp/cgprna:2.4.0"
dockerPull: "quay.io/wtsicgp/cgprna:2.4.1"

hints:
- class: ResourceRequirement
Expand Down
2 changes: 1 addition & 1 deletion cwls/tools/run-cgprna_htseq-count.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ doc: |

requirements:
- class: DockerRequirement
dockerPull: "quay.io/wtsicgp/cgprna:2.4.0"
dockerPull: "quay.io/wtsicgp/cgprna:2.4.1"

hints:
- class: ResourceRequirement
Expand Down
2 changes: 1 addition & 1 deletion cwls/tools/run-cgprna_star-map.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ doc: |

requirements:
- class: DockerRequirement
dockerPull: "quay.io/wtsicgp/cgprna:2.4.0"
dockerPull: "quay.io/wtsicgp/cgprna:2.4.1"
- class: InlineJavascriptRequirement

hints:
Expand Down
2 changes: 1 addition & 1 deletion cwls/tools/run-cgprna_stats.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ doc: |

requirements:
- class: DockerRequirement
dockerPull: "quay.io/wtsicgp/cgprna:2.4.0"
dockerPull: "quay.io/wtsicgp/cgprna:2.4.1"

hints:
- class: ResourceRequirement
Expand Down
2 changes: 1 addition & 1 deletion perl/lib/Sanger/CGP/CgpRna.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use strict;
use Const::Fast qw(const);
use base 'Exporter';

our $VERSION = '2.4.0';
our $VERSION = '2.4.1';
our @EXPORT = qw($VERSION);

1;

0 comments on commit e8223cb

Please sign in to comment.