Skip to content

Commit

Permalink
feat(rna_mt): enables mt for rna
Browse files Browse the repository at this point in the history
  • Loading branch information
jemten committed Apr 29, 2021
1 parent 5fedd16 commit a982aea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/MIP/Contigs.pm
Expand Up @@ -201,7 +201,8 @@ sub delete_non_wes_contig {
use MIP::List qw{ check_allowed_array_values };
use MIP::Contigs qw{ delete_contig_elements };

return @{$contigs_ref} if ( $consensus_analysis_type eq q{wgs} );
return @{$contigs_ref}
if ( $consensus_analysis_type eq q{wgs} || $consensus_analysis_type eq q{wts} );

## Removes contig M | chrMT from contigs
my @contigs = delete_contig_elements(
Expand Down
12 changes: 11 additions & 1 deletion t/delete_non_wes_contig.t
Expand Up @@ -91,6 +91,16 @@ my @has_wes_contigs = delete_non_wes_contig(
my @expected_wes_contigs = qw{ 1 2 3 4 MT };

## Then keep the non wes contigs
is_deeply( \@has_wes_contigs, \@expected_wes_contigs, q{Keept non wes contigs} );
is_deeply( \@has_wes_contigs, \@expected_wes_contigs, q{Keept non wes contigs for wgs} );

## Given contigs, when a wts consensus type of run
@has_wes_contigs = delete_non_wes_contig(
{
consensus_analysis_type => q{wts},
contigs_ref => \@contigs,
}
);

## Then keep the non wes contigs
is_deeply( \@has_wes_contigs, \@expected_wes_contigs, q{Keept non wes contigs for wts} );
done_testing();

0 comments on commit a982aea

Please sign in to comment.