Skip to content

Commit

Permalink
Merge pull request #1736 from Clinical-Genomics/release/v9.1.0
Browse files Browse the repository at this point in the history
Release/v9.1.0
  • Loading branch information
jemten authored Dec 7, 2020
2 parents ba2764a + df33665 commit a4fbadf
Show file tree
Hide file tree
Showing 15 changed files with 734 additions and 63 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [9.1.0]
- PNGs generated by chromograph are now uniform in dpi and image size
- Adds chromograph recipe to generate images of rhocall viz output (regions of autozygosity and fraction of homozygous snps)

**Tools**
chromograph 0.3.3 -> 1.0.0

## [9.0.6]
- Use "PAN" key for slurm_jobs_ids file instead of "ALL" as "ALL" has a size constraint

Expand Down
14 changes: 7 additions & 7 deletions containers/chromograph/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ FROM clinicalgenomics/mip:2.0
################## METADATA ######################

LABEL base_image="clinicalgenomics/mip:2.0"
LABEL version="8"
LABEL version="9"
LABEL software="chromograph"
LABEL software.version="0.3.3"
LABEL software.version="1.0.0"
LABEL extra.binaries="chromograph"
LABEL maintainer="Clinical-Genomics/MIP"

Expand All @@ -17,14 +17,14 @@ RUN conda install pip python=3.7 matplotlib
RUN /opt/conda/bin/conda clean -tipsy

## Download release
RUN wget --no-verbose https://github.com/mikaell/chromograph/archive/v0.3.3.zip -O /opt/conda/share/chromograph-0.3.3.zip
RUN wget --no-verbose https://github.com/mikaell/chromograph/archive/v1.0.0.zip -O /opt/conda/share/chromograph-1.0.0.zip

## Extract
RUN unzip -o /opt/conda/share/chromograph-0.3.3.zip -d /opt/conda/share/ && \
rm /opt/conda/share/chromograph-0.3.3.zip
RUN unzip -o /opt/conda/share/chromograph-1.0.0.zip -d /opt/conda/share/ && \
rm /opt/conda/share/chromograph-1.0.0.zip

## Move to chromograph directory
RUN cd /opt/conda/share/chromograph-0.3.3 && \
python -m pip install --editable .
RUN cd /opt/conda/share/chromograph-1.0.0 && \
python -m pip install .

WORKDIR /data/
3 changes: 2 additions & 1 deletion definitions/rd_dna_initiation_map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ CHAIN_ALL:
- rhocall_ar
- vt_ar
- variant_annotation
- CHAIN_RHOCALL_VIZ:
- CHAIN_RHOVIZ:
- rhocall_viz
- chromograph_rhoviz
- CHAIN_UPD:
- upd_ar
- chromograph_upd
Expand Down
14 changes: 14 additions & 0 deletions definitions/rd_dna_parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ recipe_core_number:
cadd_ar: 13
chanjo_sexcheck: 1
chromograph_cov: 1
chromograph_rhoviz: 1
chromograph_upd: 1
cnvnator_ar: 13
delly_call: 36
Expand Down Expand Up @@ -209,6 +210,7 @@ recipe_memory:
cadd_ar: 6
chanjo_sexcheck: 2
chromograph_cov: 5
chromograph_rhoviz: 5
chromograph_upd: 5
delly_reformat: 3
endvariantannotationblock: 8
Expand Down Expand Up @@ -253,6 +255,7 @@ recipe_time:
cadd_ar: 10
chanjo_sexcheck: 2
chromograph_cov: 1
chromograph_rhoviz: 1
chromograph_upd: 1
cnvnator_ar: 1
delly_call: 20
Expand Down Expand Up @@ -1593,6 +1596,17 @@ chromograph_cov:
program_executables:
- chromograph
type: recipe
chromograph_rhoviz:
analysis_mode: sample
associated_recipe:
- mip
data_type: SCALAR
default: 1
file_tag: ""
outfile_suffix: ".png"
program_executables:
- chromograph
type: recipe
chromograph_upd:
analysis_mode: sample
associated_recipe:
Expand Down
23 changes: 16 additions & 7 deletions lib/MIP/Cli/Mip/Analyse/Rd_dna.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use Moose::Util::TypeConstraints;
## MIPs lib
use MIP::Main::Analyse qw{ mip_analyse };

our $VERSION = 1.61;
our $VERSION = 1.62;

extends(qw{ MIP::Cli::Mip::Analyse });

Expand Down Expand Up @@ -1565,20 +1565,29 @@ q{Prepare for variant annotation block by copying and splitting files per contig
);

option(
q{chromograph_ar} => (
q{chromograph_cov} => (
cmd_tags => [q{Analysis recipe switch}],
documentation => q{Chromograph},
documentation => q{Chromograph coverage},
is => q{rw},
isa => enum( [ 0, 1, 2 ] ),
)
);

option(
q{chromograph_cytoband_file} => (
cmd_tags => [q{Default: grch37_cytoband.bed}],
documentation => q{Cytoband bed file},
q{chromograph_rhoviz} => (
cmd_tags => [q{Analysis recipe switch}],
documentation => q{Chromograph on rhocall_viz output},
is => q{rw},
isa => Str,
isa => enum( [ 0, 1, 2 ] ),
)
);

option(
q{chromograph_upd} => (
cmd_tags => [q{Analysis recipe switch}],
documentation => q{Chromograph on upd output},
is => q{rw},
isa => enum( [ 0, 1, 2 ] ),
)
);

Expand Down
4 changes: 2 additions & 2 deletions lib/MIP/Constants.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ BEGIN {
use base qw{ Exporter };

# Set the version for version checking
our $VERSION = 1.26;
our $VERSION = 1.27;

# Functions and variables which can be optionally exported

Expand Down Expand Up @@ -80,7 +80,7 @@ Readonly our %ANALYSIS => (
);

## Set MIP version
Readonly our $MIP_VERSION => q{v9.0.6};
Readonly our $MIP_VERSION => q{v9.1.0};

## Cli
Readonly our $MOOSEX_APP_SCEEN_WIDTH => 160;
Expand Down
44 changes: 36 additions & 8 deletions lib/MIP/Program/Chromograph.pm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ BEGIN {
use base qw{ Exporter };

# Set the version for version checking
our $VERSION = 1.05;
our $VERSION = 1.06;

# Functions and variables which can be optionally exported
our @EXPORT_OK = qw{ chromograph };
Expand All @@ -35,10 +35,12 @@ sub chromograph {

## Function : Perl wrapper for chromograph.
## Returns : @commands
## Arguments: $coverage_file_path => Coverage data infile
## Arguments: $autozyg_file_path => Autozygosity data, bed file
## : $coverage_file_path => Coverage data infile
## : $euploid => Generate png files for all chromosomes
## : $filehandle => Filehandle to write to
## : $ideo_file_path => Bed file with ideogram data
## : $fracsnp_file_path => Fraction of homozygous SNP, wig file
## : $ideogram_file_path => Bed file with ideogram data
## : $outdir_path => Outdir path
## : $stderrfile_path => Stderrfile path
## : $stderrfile_path_append => Append stderr info to file path
Expand All @@ -51,10 +53,12 @@ sub chromograph {
my ($arg_href) = @_;

## Flatten argument(s)
my $autozyg_file_path;
my $coverage_file_path;
my $euploid;
my $filehandle;
my $ideo_file_path;
my $fracsnp_file_path;
my $ideogram_file_path;
my $outdir_path;
my $stderrfile_path;
my $stderrfile_path_append;
Expand All @@ -65,7 +69,13 @@ sub chromograph {
my $upd_sites_file_path;

my $tmpl = {
autozyg_file_path => {
allow => qr/ [.] bed \z /xms,
store => \$autozyg_file_path,
strict_type => 1,
},
coverage_file_path => {
allow => qr/ [.] wig \z /xms,
store => \$coverage_file_path,
strict_type => 1,
},
Expand All @@ -77,8 +87,14 @@ sub chromograph {
filehandle => {
store => \$filehandle,
},
ideo_file_path => {
store => \$ideo_file_path,
fracsnp_file_path => {
allow => qr/ [.] wig \z /xms,
store => \$fracsnp_file_path,
strict_type => 1,
},
ideogram_file_path => {
allow => qr/ [.] bed \z /xms,
store => \$ideogram_file_path,
strict_type => 1,
},
outdir_path => {
Expand Down Expand Up @@ -106,10 +122,12 @@ sub chromograph {
strict_type => 1,
},
upd_regions_file_path => {
allow => qr/ [.] bed \z /xms,
store => \$upd_regions_file_path,
strict_type => 1,
},
upd_sites_file_path => {
allow => qr/ [.] bed \z /xms,
store => \$upd_sites_file_path,
strict_type => 1,
},
Expand All @@ -120,6 +138,11 @@ sub chromograph {
## Stores commands depending on input parameters
my @commands = qw{ chromograph };

if ($autozyg_file_path) {

push @commands, q{--autozyg} . $SPACE . $autozyg_file_path;
}

if ($coverage_file_path) {

push @commands, q{--coverage} . $SPACE . $coverage_file_path;
Expand All @@ -130,9 +153,14 @@ sub chromograph {
push @commands, q{--euploid};
}

if ($ideo_file_path) {
if ($fracsnp_file_path) {

push @commands, q{--fracsnp} . $SPACE . $fracsnp_file_path;
}

if ($ideogram_file_path) {

push @commands, q{--ideo} . $SPACE . $ideo_file_path;
push @commands, q{--ideogram} . $SPACE . $ideogram_file_path;
}

push @commands, q{--outd} . $SPACE . $outdir_path;
Expand Down
Loading

0 comments on commit a4fbadf

Please sign in to comment.