Skip to content

Commit

Permalink
Merge pull request #93 from wtsi-npg/devel
Browse files Browse the repository at this point in the history
merge to master for release 50.12
  • Loading branch information
dozy authored Dec 9, 2016
2 parents cf12a49 + ff32f75 commit 4e3463f
Show file tree
Hide file tree
Showing 16 changed files with 223 additions and 73 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ language: perl

perl:
- "5.16"
- "5.22-shrplib"

env:
global:
Expand Down
3 changes: 2 additions & 1 deletion Build.PL
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ my $requires = {
'Math::Round' => '0.06',
'MIME::Lite' => '3.024',
'Moose' => '0.93',
'Moose::Meta::Class' => '0',
'Moose::Role' => '0.93',
'Moose::Util::TypeConstraints' => 0,
'MooseX::ClassAttribute' => 0,
'MooseX::Storage' => 0,
'MooseX::StrictConstructor' => '0.08',
'Parallel::ForkManager' => 0,
'Perl6::Slurp' => '0.03',
'Pod::Usage' => '0',
'POSIX' => '1.09',
'Readonly' => '1.03',
'Readonly::XS' => 0,
Expand Down
10 changes: 10 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
LIST OF CHANGES

- RefMaker: added extra dict symlink for RNA SeQc
- code changes to reduce number of warnings under Perl 5.22.2

release 50.11
- seqchksum_merge.pl:
updated to generate chksums on the fly is given a bam file
added new column class (partition) to partition data when merging.
modified and extended tests. N.B. running the script on multiple bam files
should generate the same values as bamcat + bamseqchksum but the
order is no longer guaranteed to be the same
- RefMaker: added function for longranger mkref and extended test

release 50.10
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ t/data/fastq_split/2518_2_5_merge_part.sam
t/data/fastq_split/Homo_sapiens.NCBI36.48.dna.all.fa
t/data/fastq_split/seq_ids.txt
t/data/good.sam
t/data/seqchksum_merge/merged.different.seqchksum
t/data/seqchksum_merge/group1.seqchksum
t/data/seqchksum_merge/group2.seqchksum
t/data/java
t/data/mixed.sam
t/data/references/Homo_sapiens/1000Genomes_hs37d5/all/fasta/hs37d5.fa
Expand Down
2 changes: 1 addition & 1 deletion bin/FastaFormat
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ foreach (@ARGV) {
next;
}

( -e $_ )
( -e )
? ( push @fasta_list, $_ )
: ( warn "$_ not found. Skipping...\n" );
}
Expand Down
44 changes: 31 additions & 13 deletions bin/Ref_Maker
Original file line number Diff line number Diff line change
Expand Up @@ -150,21 +150,15 @@ sub main { ##no critic (Subroutines::ProhibitExcessComplexity)
# samtools requires its index file to be in the same directory as the fasta
# Check first that the samtools command worked above.
if ($build{'samtools'}) {
eval {
my $source = "samtools/$files[0].fai";
my $target = "fasta/$files[0].fai";
croak 'samtools .fai file not found' if !-e $source;

# This can fail if $target is a broken link.
( -e $target ) && ( unlink $target );

symlink qq{../$source}, $target;
1;
} or do {
carp "Error symlinking fai file: $EVAL_ERROR $SKIP_STRING";
};
create_symlink("samtools/$files[0].fai","fasta/$files[0].fai");
}

# RNA SeQc requires dict file in same directory as the fasta
if ($build{'picard'}) {
create_symlink("picard/$files[0].dict","fasta/$files[0].dict");
}


if (@failed) {
my $message = 'WARNING: Task(s) failed, see Ref_Maker output for '.
'details: '.join(', ', @failed)."\n";
Expand Down Expand Up @@ -337,6 +331,26 @@ sub log_timestamp {
return;
}


sub create_symlink{

my($source,$target) = @_;

eval {
croak qq{$source file not found} if !-e $source;

# This can fail if $target is a broken link.
( -e $target ) && ( unlink $target );

symlink qq{../$source}, $target;
1;
} or do {
carp "Error symlinking $target file: $EVAL_ERROR $SKIP_STRING";
};

return;
}

sub _get_rm {
my $rm_class = Moose::Meta::Class->create_anon_class(
roles => [qw/npg_common::roles::software_location/]);
Expand Down Expand Up @@ -437,6 +451,10 @@ Delete and previous version/attempt and create a fresh directory.
Log a timestamp for the start or end (normal or aborted) of an aligner job.
=head2 create_symlink
Create a symlink between a source and target
=head1 REQUIRED ARGUMENTS
=head1 OPTIONS
Expand Down
Loading

0 comments on commit 4e3463f

Please sign in to comment.