Run Unafold Melting.Pl From Matlab
1
0
Entering edit mode
13.3 years ago
Mike • 0

Hello,

i'm have been trying to get matlab run the UNAFold melt.pl pearl script and to retrieve the results.

But i'm stuck right now.

One approach was to generate a batch-file with the syntax, but this did not worked out:

UNAFoldDir = 'C:\UNAFold\bin\';

Seq1Name = 'Seq1'; Seq1Sequence = 'CTGCTTTCCTGAGAGCAGTACCTCATTAGTTTCCCTGAATTTGGGGGGGGGGG'; Seq1 = struct('Header', Seq1Name, 'Sequence', Seq1Sequence); fastawrite(strcat(UNAFoldDir, 'Seq1.fas'), Seq1);

% Write StartUNA File fid = fopen(strcat(UNAFoldDir, 'StartUNA.bat'),'w'); fwrite(fid, ['perl ..\bin\melt.pl -n DNA -C 0.1 Seq1.fas Seq1.fas > Seq1-Seq2-Results.txt']); fclose(fid);

Then i tryed it with the Matlab in-build pearl commando:

perl('C:\UNAFold\bin\melt.pl','-n DNA -C 0.1 Seq1.fas Seq1.fas')

But all i get are error messages like this one: ??? Error using ==> perl at 82 System error: Error: file not specified Run 'melt.pl -h' for help Command executed: perl C:\UNAFold\bin\melt.pl "-n DNA -C 0.1 C:\UNAFold\bin\Seq1.fas C:\UNAFold\bin\Seq1.fas"

Running perl('C:\UNAFold\bin\melt.pl','-h') works fine, so there should be no problem with the directory-path from unafold.

I have never worked with UNAFold/Pearl-scripts before.

I would be grateful for every suggestion! :-)

Best regards, Mike

matlab dna • 3.0k views
ADD COMMENT
0
Entering edit mode

Does the file "C:UNAFoldbinSeq1.fas" exist? If so, are you sure melt.pl does not require any other files to be specified on the command line?

ADD REPLY
0
Entering edit mode
13.2 years ago
Mike • 0

Hello Lars,

i found an solution, there was only a mistake in the syntax (on both sides, perl- & matlab-code):

perl('C:UNAFoldbinmelt.pl', '-n', 'DNA', '-C', '0.01', 'Seq1.fas', 'Seq1.fas)

works now, and it does not need a batch file to work so no "painful" data in via matlab and some files generated by unafold. ;-)

br, mike

ADD COMMENT

Login before adding your answer.

Traffic: 1913 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6