Skip to content
Snippets Groups Projects
Commit ff5dbe26 authored by Web Group's avatar Web Group
Browse files

Copy is_patch onto branch 66 now that anacode have moved on. -- ds23

parent 891d5015
No related merge requests found
......@@ -1194,6 +1194,31 @@ sub split_chromosomes_by_size {
return $chr_slices;
}
=head2 is_patch
Arg[1] : B::E::Slice
Example : if ($support->is_patch($slice)) { ...
Description : Looks at seq_region attributes to decide if a slice is a patch or not
If PATCH seq_region_attrib is not there check to see if name suggests it is a PATCH
Return type : true/false
=cut
sub is_patch {
my ($self,$slice) = @_;
my @patch_attrib_types = qw(patch_fix patch_novel); #seq_region_attribs used to define a patch
foreach my $attrib_type (@patch_attrib_types) {
if (@{$slice->get_all_Attributes($attrib_type)}) {
return 1;
}
}
if ($slice->seq_region_name =~ /PATCH/) {
$self->log_warning($slice->seq_region_name . " has a PATCH name does not have a patch seq_region_attrib, please check if it was present in loutre\n");
return 1;
}
return 0;
}
=head2 log
Arg[1] : String $txt - the text to log
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment