Skip to content

Commit

Permalink
Merge pull request #4 from MattOates/feature/update_data_download
Browse files Browse the repository at this point in the history
Make timeout waiting for ELM ten minutes to try and improve chance of…
  • Loading branch information
MattOates authored May 17, 2019
2 parents 2e38793 + 12df509 commit 340a26a
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 40 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ inc/
nytprof.out
pm_to_blib
pod2htm*.tmp
fatlib/
32 changes: 32 additions & 0 deletions Build.PL
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
use strict;
use warnings;
use Module::Build;

use 5.008;


my $builder = Module::Build->new(
module_name => 'ELM',
license => 'lgpl_3',
dist_author => 'Matt Oates <[email protected]>',
dist_abstract => 'CLI tool for assigning Eukaryotic Linear Motifs from the ELM.eu.org database',
create_makefile_pl => 0, #'traditional',
script_files => 'bin/melm',
create_readme => 0,
requires => {
'LWP::UserAgent' => '6.15',
'BioPerl' => '1.7.2',
'Class::Tiny' => '1.004',
'Pod::Usage' => '1.69'
},
build_requires => {
'Test::More' => '0.47',
'Test::Pod::Coverage' => '1.10',
'Test::Pod' => '1.51',
'Devel::Cover' => '1.23',
'Devel::Cover::Report::Coveralls' => '0.11'
},
);

$builder->create_build_script();

37 changes: 21 additions & 16 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
###2014-08-30
* First features added.
###2019-05-17
* Updated timeout so that downloads from ELM.eu.org are more likely to succeed.
* Cut a new maintenance release 1.4.2

###2014-09-05
* Masking with only specific ELM classes included based on expect value and motif type
###2016-07-05
* Majority of refactor complete

###2014-09-08
* ELM instance downloading
* False Positive logic filtering based on ELM instances library.
* GFF3 and assignment output
###2016-06-25
* Huge refactor into split packages allowing more ELM based tools, releases now are fatpack

###2016-05-23
* Removed bitrot due to changes at ELM.eu.org and enabled support for v1.4 of ELM

###2014-09-10
* Allowed for the script to upgrade itself from GitHub and made it a bit more friendly to use

###2014-09-09
* Integrated ANCHOR predictions if this is installed on the system (independent of OS)
* Limit motif assignment to predicted binding regions (MoRF)
* Limit motif assignment to predicted disordered regions

###2014-09-10
* Allowed for the script to upgrade itself from GitHub and made it a bit more friendly to use
###2014-09-08
* ELM instance downloading
* False Positive logic filtering based on ELM instances library.
* GFF3 and assignment output

###2016-05-23
* Removed bitrot due to changes at ELM.eu.org and enabled support for v1.4 of ELM
###2014-09-05
* Masking with only specific ELM classes included based on expect value and motif type

###2016-06-25
* Huge refactor into split packages allowing more ELM based tools, releases now are fatpack
###2014-08-30
* First features added.

###2016-07-05
* Majority of refactor complete
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ License
=======

melm - Mask and assign ELM motifs in protein sequence libraries
(C) 2014-2016 Dr Matt E. Oates
(C) 2014-2019 Dr Matt E. Oates

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
Expand Down
22 changes: 18 additions & 4 deletions bin/melm
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ If you have used mELM with ANCHOR predictions please cite the following:
=head1 EXAMPLES
First time running the script, get the ELM library locally installed to your home
melm --update
Soft mask regions of a protein that do not contain any plausible ELM motifs
melm human_proteins.fa > human_proteins_motifs.fa
Expand All @@ -80,10 +84,14 @@ Mask all PTM sites with 'X' in a set of seqences
melm --hard-mask --mask-motifs --type=MOD human_proteins.fa > human_no_ptms.fa
Get a GFF3 file for a whole genomes worth of protein annotations
Get a GFF3 file for a whole genome's worth of protein annotations
melm --assign --GFF3 human_proteins.fa > human_motifs.gff3
Get another GFF3 file but this time be strict on assignment to those active in native disordered state
melm --assign --GFF3 --logic-filter --disorder-filter human_proteins.fa > disordered_hiqual_human_motifs.gff3
Get the latest ELM classes library for use in another script or by yourself
melm --update --list-classes
Expand All @@ -99,7 +107,7 @@ B<Matt Oates> - I<[email protected]>
=head1 LICENSE
melm - Mask and assign ELM motifs in protein sequence libraries
(C) 2014-2016 Dr Matt E. Oates
(C) 2014-2019 Dr Matt E. Oates
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
Expand All @@ -116,6 +124,10 @@ B<Matt Oates> - I<[email protected]>
=head1 EDIT HISTORY
2019-05-17
* Updated timeout so that downloads from ELM.eu.org are more likely to succeed.
* Cut a new maintenance release 1.4.2
2016-07-05 - Matt Oates
* Majority of refactor complete
Expand Down Expand Up @@ -147,6 +159,8 @@ B<Matt Oates> - I<[email protected]>
=head1 TODO
* Create an HTML output report with everything in
* Get the interaction partner data and report on it
* Do some domain assignment and match up the PDB interaction partners
=cut

Expand All @@ -167,7 +181,7 @@ use ELM;
use ELM::Utils 'get_www';

#Current version of the script
our $VERSION = "v1.4.1";
our $VERSION = "v1.4.2";

#User options
my $help;
Expand Down Expand Up @@ -220,7 +234,7 @@ my @fasta_files = @ARGV;
#Print out some help if it was asked for or if no arguments were given.
pod2usage(-exitstatus => 0, -verbose => 2) if $help;

pod2usage(-exitstatus => 0, -verbose => 1, -msg => "mELM version $VERSION by Matt Oates (C) 2014-2016. Please provide some sequence files to mask or assign ELM motifs to.")
pod2usage(-exitstatus => 0, -verbose => 1, -msg => "mELM version $VERSION by Matt Oates (C) 2014-2019. Please provide some sequence files to mask or assign ELM motifs to.")
unless $update or $upgrade or $list_classes or $list_instances or scalar @fasta_files >= 1;

my $elm = ELM->new(
Expand Down
6 changes: 3 additions & 3 deletions lib/ELM.pm
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package ELM v1.4.1;
package ELM v1.4.2;
=encoding UTF-8
=head1 NAME
ELM - Class to do analysis with the ELM regex library
=head1 VERSION
Version v1.4.1
Version v1.4.2
=cut

Expand Down Expand Up @@ -219,7 +219,7 @@ If you have used mELM with ANCHOR predictions please cite the following:
=head1 LICENSE AND COPYRIGHT
Copyright 2016 Matt Oates.
Copyright 2019 Matt Oates.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
Expand Down
6 changes: 3 additions & 3 deletions lib/ELM/AminoAcids.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ELM::AminoAcids v1.4.1;
package ELM::AminoAcids v1.4.2;
require Exporter;
=encoding UTF-8
=head1 NAME
Expand All @@ -7,7 +7,7 @@ ELM::AminoAcids - Functions for dealing with amino acid specific calculations
=head1 VERSION
Version v1.4.1
Version v1.4.2
=cut

Expand Down Expand Up @@ -142,7 +142,7 @@ If you have used mELM with ANCHOR predictions please cite the following:
=head1 LICENSE AND COPYRIGHT
Copyright 2016 Matt Oates.
Copyright 2019 Matt Oates.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
Expand Down
6 changes: 3 additions & 3 deletions lib/ELM/Anchor.pm
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package ELM::Anchor v1.4.1;
package ELM::Anchor v1.4.2;
=encoding UTF-8
=head1 NAME
ELM::Anchor - Class to wrap ANCHOR and get assignments
=head1 VERSION
Version v1.4.1
Version v1.4.2
=cut

Expand Down Expand Up @@ -194,7 +194,7 @@ If you have used mELM with ANCHOR predictions please cite the following:
=head1 LICENSE AND COPYRIGHT
Copyright 2016 Matt Oates.
Copyright 2019 Matt Oates.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
Expand Down
6 changes: 3 additions & 3 deletions lib/ELM/Calc.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ELM::Calc v1.4.1;
package ELM::Calc v1.4.2;
require Exporter;
=encoding UTF-8
=head1 NAME
Expand All @@ -7,7 +7,7 @@ ELM::Calc - Functions for calculating sequence assignment specific tasks
=head1 VERSION
Version v1.4.1
Version v1.4.2
=cut

Expand Down Expand Up @@ -138,7 +138,7 @@ If you have used mELM with ANCHOR predictions please cite the following:
=head1 LICENSE AND COPYRIGHT
Copyright 2016 Matt Oates.
Copyright 2019 Matt Oates.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
Expand Down
8 changes: 4 additions & 4 deletions lib/ELM/Library.pm
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package ELM::Library v1.4.1;
package ELM::Library v1.4.2;
=encoding UTF-8
=head1 NAME
ELM::Library - Class to hold the ELM regex library
=head1 VERSION
Version v1.4.1
Version v1.4.2
=cut

Expand Down Expand Up @@ -170,7 +170,7 @@ sub _get_instance_seqs($self) {
sub _update_elm_instances($self) {
my $instances_version;
my %instance_logic = ('false positive' => 'FP','true negative' => 'TN','true positive', => 'TP', 'unknown' => 'U');
my $instances_tsv = get_www('http://elm.eu.org/instances.tsv?q=*&taxon=&instance_logic=');
my $instances_tsv = get_www('http://elm.eu.org/instances.tsv?q=*');
my %uniprot_sequences = $self->_get_instance_seqs();
#Each record looks like:
#Accession, ELMType, ELMIdentifier, ProteinName, Primary_Acc, Accessions, Start, End, References, Methods, InstanceLogic, PDB, Organism
Expand Down Expand Up @@ -234,7 +234,7 @@ If you have used mELM with ANCHOR predictions please cite the following:
=head1 LICENSE AND COPYRIGHT
Copyright 2016 Matt Oates.
Copyright 2019 Matt Oates.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
Expand Down
7 changes: 4 additions & 3 deletions lib/ELM/Utils.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ELM::Utils v1.4.1;
package ELM::Utils v1.4.2;
require Exporter;
=encoding UTF-8
=head1 NAME
Expand All @@ -7,7 +7,7 @@ ELM::Utils - Common helper functions
=head1 VERSION
Version v1.4.1
Version v1.4.2
=cut

Expand Down Expand Up @@ -49,6 +49,7 @@ sub get_www($url) {
}
#Decided to localise this and just handle checking for deps properly
my $ua = LWP::UserAgent->new;
$ua->timeout(600); # Wait at least 10 minutes, ELM can be very slow to respond

my $response = $ua->get($url);
if ($response->is_success) {
Expand Down Expand Up @@ -105,7 +106,7 @@ If you have used mELM with ANCHOR predictions please cite the following:
=head1 LICENSE AND COPYRIGHT
Copyright 2016 Matt Oates.
Copyright 2019 Matt Oates.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
Expand Down

0 comments on commit 340a26a

Please sign in to comment.