Change encoding for scripts in repeatmasker (#14358)

This PR converts ISO-8859 encoding to UTF-8 encoding for three scripts in
repeatmasker.

- the main RepeatMasker script
- SimpleBatcher.pm
- wublastToCrossmatch.pl

The ISO-8859 encoding prevented the sbang replacement of long paths when
spack uses python3.
This commit is contained in:
Glenn Johnson 2020-01-15 11:31:51 -06:00 committed by Adam J. Stewart
parent b69cf08cfb
commit 726a662c2c
2 changed files with 200 additions and 0 deletions

View file

@ -29,6 +29,8 @@ class Repeatmasker(Package):
depends_on('phrap-crossmatch-swat', type=('build', 'run'), depends_on('phrap-crossmatch-swat', type=('build', 'run'),
when='+crossmatch') when='+crossmatch')
patch('utf8.patch')
def url_for_version(self, version): def url_for_version(self, version):
url = 'http://www.repeatmasker.org/RepeatMasker-open-{0}.tar.gz' url = 'http://www.repeatmasker.org/RepeatMasker-open-{0}.tar.gz'
return url.format(version.dashed) return url.format(version.dashed)

View file

@ -0,0 +1,198 @@
diff -ru a/RepeatMasker b/RepeatMasker
--- a/RepeatMasker 2020-01-01 16:16:26.201675025 -0600
+++ b/RepeatMasker 2020-01-01 16:18:02.059526821 -0600
@@ -1347,7 +1347,7 @@
##
## Globals Used: None
##
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub adjustFragmentPositions {
my $batcher = shift;
my $catfile = shift;
@@ -1456,7 +1456,7 @@
## to decypher this subroutine.
##
## Globals Used: none
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub locateISElements {
my %options = %{ shift() };
my $batcher = shift;
@@ -2951,7 +2951,7 @@
##
## Globals Used: None
## Globals Modified: None
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub runLowComplexTests {
my %options = %{ shift() }; # The RepeatMasker option hashtable
my $DIRECTORY = shift;
@@ -3988,7 +3988,7 @@
##
## Globals Used: None
## Globals Modified: None
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub runSearchStages {
my %options = %{ shift() }; # The RepeatMasker option hashtable
my $DIRECTORY = shift;
@@ -4707,7 +4707,7 @@
## Returns
##
## Globals Used: None
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub chooseMatrices {
my $GC_frac = shift;
@@ -4910,7 +4910,7 @@
##
## Globals Used: None
##
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub preMaskLevelFilter {
my $searchResults = shift;
@@ -4999,7 +4999,7 @@
##
## Globals Used: None
##
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub filterResults {
my %options = %{ shift() };
my $chooseClass = shift;
@@ -5860,7 +5860,7 @@
## Returns
##
## Globals Used: None
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub calcSimpleRepeatComplexityFromName {
my %num = ( "A", 0, "C", 0, "G", 0, "T", 0 );
my %log = ( "A", 0, "C", 0, "G", 0, "T", 0 );
@@ -5902,7 +5902,7 @@
## revamped to use a SearchResultCollection.
##
## NO Globals Used
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub getSegments {
my $resultsCollection = shift;
@@ -6661,7 +6661,7 @@
## Returns
##
## Globals Used: None
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub saveOldFiles {
my $fijl = shift;
my $fileend = shift;
@@ -6708,7 +6708,7 @@
## Returns
##
## Globals Used: None
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub SkipFile {
my $file = shift;
@@ -6734,7 +6734,7 @@
## about how files are passed to repeatmasker etc..
##
## Globals Used: ARGV[0]
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub createTempDir {
my %options = %{ shift() };
my $date = shift;
@@ -6792,7 +6792,7 @@
## Returns
##
## Globals Used: None
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
### Interrupt handler used by systemint() ###
sub handler {
my ( $sig ) = @_;
@@ -6808,7 +6808,7 @@
## Returns
##
## Globals Used: None
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
### systemint -- Interruptible system call routine. ###
sub systemint {
my ( $cmd ) = @_;
@@ -6869,7 +6869,7 @@
## Expects $options{'dir'} ( if set ) to already exist.
##
## Globals Used: None
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub cleanUp {
my %options = %{ shift() };
my $runnumber = shift;
@@ -6987,7 +6987,7 @@
## matching sequences.
##
## Globals Used: None
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub createLib {
my $options = %{ shift() };
my $db = shift;
@@ -7322,7 +7322,7 @@
## will create the frozen databases for WUBlast.
##
## Globals Used: None
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub processCustomLib {
my $options = %{ shift() };
my $tempdir = shift;
@@ -7416,7 +7416,7 @@
## refined.
##
## Globals Used: None
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub buildRefineableHash {
my $db = shift;
@@ -7447,7 +7447,7 @@
## Returns
##
## Globals Used: None
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub initLibraries {
my %options = %{ shift() };
my $rmLibDir = shift;
diff -ru a/SimpleBatcher.pm b/SimpleBatcher.pm
--- a/SimpleBatcher.pm 2020-01-01 16:16:26.203675022 -0600
+++ b/SimpleBatcher.pm 2020-01-01 16:17:24.464585016 -0600
@@ -559,7 +559,7 @@
## }
## };
##
-##------------------------------------------------------------------------##·
+##------------------------------------------------------------------------##·
sub _packBatches {
my $this = shift;
my $seqDBObj = shift;
diff -ru a/util/wublastToCrossmatch.pl b/util/wublastToCrossmatch.pl
--- a/util/wublastToCrossmatch.pl 2020-01-01 16:16:26.202675024 -0600
+++ b/util/wublastToCrossmatch.pl 2020-01-01 16:17:38.181563793 -0600
@@ -244,7 +244,7 @@
=cut
-##-------------------------------------------------------------------------##·
+##-------------------------------------------------------------------------##·
sub publicMethod {
my %parameters = @_;