Commit 504963e3 authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 5.2.0

parent dd890a80
Loading
Loading
Loading
Loading

BIN/melting.hlp

deleted100644 → 0
+0 −661

File deleted.

Preview size limit exceeded, changes collapsed.

BIN/multi.pl

deleted100755 → 0
+0 −83
Original line number Diff line number Diff line
#!/usr/bin/perl -w

##############################################################################
#                                   MELTING                                  #
# This program   computes for a nucleotide probe, the enthalpie, the entropy #
# of the helix-coil transition, and then its melting temperature.            #
# Three types of hybridisation are possible: DNA/DNA, DNA/RNA, and RNA/RNA.  #
#         Copyright (C) Nicolas Le Novère and Marine Dumousseau 1997-2013    #
##############################################################################
#     This program is free software; you can redistribute it and/or modify
#     it under the terms of the GNU General Public License as published by
#     the Free Software Foundation; either version 2 of the License, or
#     (at your option) any later version.
#
#     This program is distributed in the hope that it will be useful,
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#     GNU General Public License for more details.
#
#     You should have received a copy of the GNU General Public License
#     along with this program; if not, write to the Free Software
#     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA#
#
#     Nicolas Le Novere
#     Babraham Institute, Babraham Research Campus
#     Babraham CB22 3AT Cambridge United-Kingdom.
#     n.lenovere@gmail.com
#      
#     Marine Dumousseau
#     EMBL-EBI, Wellcome-Trust Genome Campus
#     Hinxton CB10 1SD Cambridge United-Kingdom. 
#     marine@ebi.ac.uk  

       ###################################################################
       # Usage is: ./multi.pl config_file < inputfile > outputfile       #
       # Where inputfile contains one sequence per line. No space before #
       # sequence and at least one space before extra information        # 
       # Write the parameters of melting in an input file. See manual.   #
       ###################################################################

use strict;

my @linecontent; # contains the elements of a line generated by the function split

my $infile;      # contains the parameters of the run except the sequence
my @sequences;   # contains all the sequences from which to predict the Tm
my $seq;         # one sequence

my @rawresults;  # contains the raw output of MELTING
my ($tm,$H,$S);  

if (not defined $ARGV[0]){
    print "Except the sequences, all parameters have to be contained in a \n",
    "configuration file, and the script run as:\n",
    "  prompt> ./multi.pl config_file < inputfile > outputfile\n";
    exit;
}
# Read the sequences to analise
while (<STDIN>){
    if ( $_ !~ /^(\s*\#.*|\s+)$/){ # do not take into account comment and blank lines
	chomp;
	@linecontent = split(" ");          # Note that each line could contain
	push(@sequences,$linecontent[0]); # other elements used in derived programs
    }
}

print "sequences                        DeltaH   DeltaS  Tm (deg C) \n";
foreach $seq (@sequences){
    @rawresults = `melting -I$ARGV[0] -S$seq -q`;
    foreach (@rawresults){
	@linecontent = split(" ");   
	if ($linecontent[0] =~ /melting/i ){ $tm = $linecontent[2];    
	} elsif ($linecontent[0] =~ /enthalpy/i ){ $H = $linecontent[1];    
	} elsif ($linecontent[0] =~ /entropy/i ){ $S = $linecontent[1];    
	}
    }
    printf "%-30s  %6.0f  %5.1f  %4.1f\n",$seq, $H, $S, $tm;
}




BIN/profil.pl

deleted100755 → 0
+0 −202
Original line number Diff line number Diff line
#!/usr/bin/perl -w

##############################################################################
#                                   MELTING                                  #
# This program   computes for a nucleotide probe, the enthalpie, the entropy #
# of the helix-coil transition, and then its melting temperature.            #
# Three types of hybridisation are possible: DNA/DNA, DNA/RNA, and RNA/RNA.  #
#         Copyright (C) Nicolas Le Novère and Marine Dumousseau 1997-2013    #
##############################################################################
#     This program is free software; you can redistribute it and/or modify
#     it under the terms of the GNU General Public License as published by
#     the Free Software Foundation; either version 2 of the License, or
#     (at your option) any later version.
#
#     This program is distributed in the hope that it will be useful,
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#     GNU General Public License for more details.
#
#     You should have received a copy of the GNU General Public License
#     along with this program; if not, write to the Free Software
#     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA#
#
#     Nicolas Le Novere
#     Babraham Institute, Babraham Research Campus
#     Babraham CB22 3AT Cambridge United-Kingdom.
#     n.lenovere@gmail.com
#      
#     Marine Dumousseau
#     EMBL-EBI, Wellcome-Trust Genome Campus
#     Hinxton CB10 1SD Cambridge United-Kingdom. 
#     marine@ebi.ac.uk  

       ###################################################################
       # Usage is: profil.pl -Iinfile -Wwindow < inputfile > outputfile  #
       # Where inputfile contains one sequence per line. No space before #
       # sequence and at least one space before extra information        # 
       # Write the parameters of melting in an input file. See manual.   #
       ###################################################################

use strict;

my $VERSION = 2;

my $argument;          # one of the arguments
my $infile = "infile"; # contains the parameters of the run except the sequence
my $window = 10;       # contains the length of the window to analise
my %nucleic_acid ;     # the nucleic acid of the analysis

##########################
# Processes the arguments 
##########################

if (not @ARGV){
    usage();
    exit();
}

if (join("",@ARGV) =~ /-H/i){
    usage();
    exit();
}
foreach $argument (@ARGV){
    if ($argument =~ /^-I/i){        # infile specification
	$argument =~ /^-I([\w\.]*)/i;
	if (defined $1){$infile = $1;}
	else {warning_infile();}
    } elsif ($argument =~ /^-W/i){   # window width specification
	$argument =~ /^-W(\d*)/i;
	if (defined $1){$window = $1;}
	else {warning_window();}
    } else {
	print "Oups! I did not recognise the option $argument.\n";
	print "I do not take it into account\n";
    }
}

#################################
# Reads the sequences to analyse
#################################
# it would be desirable to treat a multisequence FASTA file as
# a set of independant sequences rather than to concatenate 
# everything.


while (<STDIN>){
    if (/^\s*>/){next;}            # remove the fasta info line
    chomp();                       # remove end of line
    s/#.*//;                       # remove the comments
    s/[^AGCTU]//g;                 # keeps only AGCTU, case insensitive
    $_ = uc($_);                   # switch everything uppercase
    $nucleic_acid{"sequence"}.=$_; # append
}
#print "DEBUG--> sequence is: ",$nucleic_acid{"sequence"},"\n";
# Note that each line could contain other elements used in derived programs, but separed by spaces

#############
# Here we go
#############

@{$nucleic_acid{"results"}}=compute_tm($nucleic_acid{"sequence"},$window);
#print "DEBUG--> results: ",$nucleic_acid{"results"},"\n";
print_result();

sub usage{
    print <<EOU;
Usage is: profil.pl [-H] -Iinfile -Wwindow < inputfile > outputfile
where   
    -H, -h, -help print this message;
    -Iinfile      file containing the parameters
    -Wwindow      width of the window analysed at each run
    inputfile     file containing the sequence
    outputfile    file containing the results
EOU
}

sub warning_infile{
    print <<EOWI;
Except the sequences, all parameters have to be contained a configuration
       file, and the script run as:
       prompt> ./profil.pl -Iconfig_file -Wwindow < inputfile > outputfile)
Since no configuration file has been provided (option -I), the file infile
is assumed. See the user-guide of melting for the format of this file.
EOWI
}

sub warning_window{
    print "Since no window length specification has been entered (option -W), a default\n";
    print "length of 10 nucleotides is assumed\n";
}

sub compute_tm{
    my ($sequence,$window)=@_;
    my $i;                     # loop counter
    my @results;               # array of hashes containing the results of one nucleic acid
    
    my $seqlength = length $sequence;
#    print "DEBUG--> length of the sequence is: ",$seqlength,"\n";
    if ($seqlength < $window){$window = $seqlength;} # in case of very short sequences
    
    my $half_window = sprintf ("%d",$window / 2);    # absolute value. 
#    print "DEBUG--> half of the window is: ",$half_window,"\n";
    # Tm is reported to the middle of the string, we have to populate the first half
    # Note the '<', index beginning at 0
    for ($i=0 ; $i<$half_window ; $i++){
	$results[$i]->{"subsequence"} = 'X'x$window;   
	$results[$i]->{"enthalpy"}    = "000000";   
       	$results[$i]->{"entropy"}     = "000.00";   
	$results[$i]->{"tm"}          = "-274";   
#	print "DEBUG--> results[",$i,"] is: ",%{$results[$i]},"\n";
    }
    
    # Now we begin the actual analysis. The sequence move from the beginning, but the
    # temperatures from the middle of the first substring
    my $offset = 0;
    while (($offset+$window) <= $seqlength){
	my $subsequence = substr($sequence,$offset,$window);
#	print "DEBUG--> subsequence is: ",$subsequence,"\n";
	$results[$half_window+$offset]->{"subsequence"} = $subsequence;   
	my @rawresults = `melting -I$infile -S$subsequence -q`;
	foreach (@rawresults){
	    if (/Enthalpy/ ){
		($results[$half_window+$offset]->{"enthalpy"}) = (split)[1];   
	    } elsif (/Entropy/ ){
		($results[$half_window+$offset]->{"entropy"})  = (split)[1];   
	    } elsif (/Melting/ ){
		($results[$half_window+$offset]->{"tm"})       = (split)[2];   
	    } else { # do nothing, this is not suppose to occur but ...
	    } 
	}
#	print "DEBUG--> results[",$half_window+$offset,"] is: ",%{$results[$half_window+$offset]},"\n";
	$offset++;
    }
	
    # fill the remaining position of the array
    # Note that $offset is incremented just before to quit the loop,
    # hence the $half_window+$offset, identical to that of the while loop.
    
    for ( $i = $half_window + $offset ; $i < $seqlength ; $i++ ){ 
	$results[$i]->{"subsequence"} = 'X'x$window;   
	$results[$i]->{"enthalpy"}    = "000000";   
       	$results[$i]->{"entropy"}     = "000.00";   
	$results[$i]->{"tm"}          = "-274";   
#	print "DEBUG--> results[",$i,"] is: ",%{$results[$i]},"\n";
    }
    return @results;
}

sub print_result{
    my $i;         # loop counter
    print ("Base,Enthalpy,Entropy,Tm\n");
    my $seqlength = length $nucleic_acid{"sequence"};
#    print "DEBUG--> length of the sequence is: ",$seqlength,"\n";
    for ($i=0 ; $i<$seqlength ; $i++){
	printf "%s\t", $nucleic_acid{"results"}[$i]->{"subsequence"};
	printf "%7d\t    ",$nucleic_acid{"results"}[$i]->{"enthalpy"};
	printf "%7.2f\t",$nucleic_acid{"results"}[$i]->{"entropy"};
	printf "%7.2f    ",$nucleic_acid{"results"}[$i]->{"tm"};
	print "\n";
    }
}

BIN/tkmelting.pl

deleted100755 → 0
+0 −594

File deleted.

Preview size limit exceeded, changes collapsed.

+70 −32
Original line number Diff line number Diff line
[01/05/2013] Nicolas Le Novère (n.lenovere@gmail.com)

	Upgraded the TkMELTING interface to cover for version 4.3
        Code was provided by Markus Piotrowski (Markus.Piotrowski@ruhr-uni-bochum.de)
        version 4.3.1

[05/08/2014]Marine Dumousseau (marine@ebi.ac.uk)
	Added parameters for consecutive locked nucleic acids and single mismatch in consecutive locked nucleic acids from Owczarzy et al. 2011
	Updated version to 5.2.0
[23/05/2014]Marine Dumousseau (marine@ebi.ac.uk)
	Fixed a bug in Locked nucleic acids formula which did not deal with terminal locked nucleic acids
	Updated version to 5.1.2
[06/02/2014]Marine Dumousseau (marine@ebi.ac.uk)
	Update documentation
	Added batch script to run MELTING 5 with a file containing different sequences
[04/10/2013]William John Gowers (gowersj@babraham.ac.uk)
   Added MELTING GUI for MELTING 5.x.
   Updated version to 5.1.1
[09/08/2013]William John Gowers (gowersj@babraham.ac.uk)
   Added new thermodynamic parameters for DNA/RNA duplexes from Watkins et al. (2010). Nucl. Acids Res. 39, 1894-1902.
[10/02/2013]Marine Dumousseau (marine@ebi.ac.uk)
Thanks to Richard Owczarzy:
	Fixed typos in some thermodynamic parameters:
	- bom00 model. GA/C- parameters are dH = -2.1 kcal/mol and dS = -3.9 in the paper
	- san05 inosing model. Paramaters rounded to -6.0 kcal/mol. The paper reports -5.6 kcal/mol enthalpy.
	- xia98 model. Parameters rounded into -6.8 kcal/mol. published -6.82 kcal/mol
    - san04 bulge loop model. The sign of the entropy parameters are wrong.
    - ser08 dangling ends model. The sign of some parameters (5' dangling ends) are wrong.
    Added new GU parameters from from Serra et al., Biochemistry (2012) 51, 3508-3522. They are now the default parameters for GU base pairs.
	version 5.1.0
[06/11/2012]Marine Dumousseau (marine@ebi.ac.uk)
	Fix default path to NN files
	version 5.0.6
[07/03/2012]Marine Dumousseau (marine@ebi.ac.uk)
	Updated the documentation. The factor F cannot be 2 when the oligonucleotides are not self complementary and
	one strand is in excess. In this case, F should be 1.
	version 5.0.5
[07/01/2011]Marine Dumousseau (marine@ebi.ac.uk)
	Changed the installation script
	When melting is used without arguments, now displays the help
	version 5.0.4
[02/11/2009] Marine Dumousseau (marine@ebi.ac.uk)
	Changed the MELTING 5 documentations (references and acknoledgement)
	Changed the files in the testResults folder.
	version 5.0.3
[23/10/2009] Marine Dumousseau (marine@ebi.ac.uk)

	Fixed a bug in bre07a.nn.
	version 4.3c

	Fixed some bugs in the inosine and single mismatch files.
	Added other tests.
	Changed the JAR File.
	Fixed a bug for the hydroxyadenine model.
	Put by 'all97' as default DNA Crick's pair thermodynamic model
	version 5.0.2
[14/10/2009] Marine Dumousseau (marine@ebi.ac.uk)
	Fixed some bugs in the melting.bib file.
	version 5.0.1
[08/10/09] Marine Dumousseau (marine@ebi.ac.uk)
	Fixed some bugs in the Javadoc.
	Created a build.xml file and buildProject.sh to build the project.
[28/08/09] Marine Dumousseau (marine@ebi.ac.uk)
	Fixed a bug for the option -O in OptionManagement.
	Created the CompatibleMain class which allow a compatibility
	between MELTING 4 and MELTING 5 options (except for the option '-q').
[17/08/09] Marine Dumousseau (marine@ebi.ac.uk)
	Version 5 in Java.
	New thermodynamic models and parameters for : Crick's pair,
	single mismatch, tandem mismatch, internal loop, single 
	dangling end, double dangling end, long dangling end (only poly A),
	inosine, hydroxyadenine, azobenzene, locked nucleic acids, single
	bulge loop, long bulge loop.
	New corrections for sodium, magnesium or mixed Na, Mg.
	New corrections for DMSO and formamide.
[01/JUN/2009] Marine Dumousseau (marine@ebi.ac.uk)

	tkmelting.1, tkmelting.1.xml and melting-gui.desktop added.
	acknoledgements updated in the different documentation files.
	version 4.3b

[15/APR/2009] Marine Dumousseau (marine@ebi.ac.uk)

	mac executable added.

[14/APR/2009] Marine Dumousseau (marine@ebi.ac.uk)

	Index.html added to the DOC folder.
	linux 64 bits executable added.

[03/APR/2009] Marine Dumousseau (marine@ebi.ac.uk)

	Documentation modified. 

[31/MAR/2009] Marine Dumousseau (marine@ebi.ac.uk)

	mistakes in the thermodynamic tables corrected. Documentation
	modification. 

[31/MAR/2009] Marine Dumousseau (marine@ebi.ac.uk)

	inosine parameters added

[30/MAR/2009] Marine Dumousseau (marine@ebi.ac.uk)

	Perl interface bugs correction and move some files. Calcul.c and
	melting.c bugs correction.

[27/MAR/2009] Marine Dumousseau (marine@ebi.ac.uk)

	Correction of the function which computes the fraction of GC base pairs.
	We can now take in account the mismatches CXor GX and inosine mismatches 
	IG or IC.
	New parameters of Santalucia added

[26/MAR/2009] Marine Dumousseau (marine@ebi.ac.uk)

	add the inosine parameters. (from Santalucia 2005 for DNA duplexes and
	from Brent M. Znosko 2007 for RNA duplexes (only IU base pairs)).
	add the option -i for enter a new set of inosine parameters. 
	
	version 4.3
[25/MAR/2009] Marine Dumousseau (marine@ebi.ac.uk)

	add the magnesium correction. (algorithm from Owczarzy 2008, only for
	DNA/DNA duplexes)
	add the options -k, -t, -G for the potassium, tris and magnesium
	concentration.
	The Tris+ concentration is about the half of total Tris concentration.
	version 4.3
	
	version 4.3
[24/MAR/2009] Marine Dumousseau (marine@ebi.ac.uk)

	Fix mistakes in the calorimetric table sug95a.nn.
	version 4.2i
	
	version 4.2i
[08/AUG/2007] Nicolas Le Novère (lenov@ebi.ac.uk)

	Move from isolatin-1 to utf-8

	version 4.2h

[06/SEP/2004] Nicolas Le Novère (lenov@ebi.ac.uk)

	Fix mistakes in the calorimetric table xia98a.nn.

	version 4.2g
	
[20/MAY/2004] Nicolas Le Novère (lenov@ebi.ac.uk)
Loading