[Bioperl-l] PAML files

Albert Vilella avilella at gmail.com
Mon Dec 18 21:43:27 UTC 2006


Filipe, if you need to create the ctl file but not run the job, you
can use the "prepare" method in Codeml run.

Also, there is a tmpdir and save_tempfiles method that will keep the
files where you want. About the naming, you can add a ".tree" and
".aln" extension to the tempnames if you want, by altering the
$temptreefile and $tempseqfile variables in
bioperl-run/Bio/Tools/Run/Phylo/PAML/Codeml.pm (cvs head version).

If you want, you can also add a couple of getters/setters there:

sub alnfilename{
    my $self = shift;

    return $self->{'alnfilename'} = shift if @_;
    return $self->{'alnfilename'};
}

and subtitute those $tempseqfile io calls for you
$self->{'alnfilename'} io calls.

$codeml->alnfilename("/path/name");
$codeml->prepare;
...
$codeml->run;

What I use to do is to have the aln and tree files in a different
place. Codeml will create the tmp files for running somewhere, and
then delete all the stuff when done.

Cheers,

    Albert.

On 12/18/06, Filipe Garrett <fgarret at ub.edu> wrote:
>
> Hi Jason,
>
> This question is related with the one I made previously today.
> I need to run codeml with 3 tree topologies. I looked on codeml module
> but it only accepts one tree as input so I thought of using the codeml
> module to prepare all the files and then I would just have to run the
> codeml with the new tree file in batch. But for that I need to know
> which one is the ctl file.
>
> any idea?
> FG
>
> Jason Stajich wrote:
> > They are temporary names so they are deliberately random and there is no
> > intention of you needing them after a run since it to be cleaned up on
> > the fly. We use an internal method for generating tempfiles that takes
> > care of cleanup afterwards.  I suppose since we do all the work within a
> > temp directory that is cleaned up, one could have a fixed name for the
> > tree, alignment, and ctl files but honestly we never expect people to be
> > reading these filenames as they are intended to be transient.
> >
> > What problem are you having that you need the filename?
> >
> > -jason
> > On Dec 18, 2006, at 11:18 AM, Filipe Garrett wrote:
> >
> >> Hi all,
> >>
> >> does anyone knows how to get the name of the .ctl file created by the
> >> PAML module? Inside the tmp directory there are 2 files with random
> >> names (tree and ctl). Why do they have random names?? Wouldn't it be
> >> easier to assign them a fixed name?? For instance "codeml.ctl" and
> >> "tree.nwk"??
> >>
> >> thanks in adv,
> >> FG
> >> _______________________________________________
> >> Bioperl-l mailing list
> >> Bioperl-l at lists.open-bio.org <mailto:Bioperl-l at lists.open-bio.org>
> >> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> >
> > --
> > Jason Stajich
> > jason at bioperl.org <mailto:jason at bioperl.org>
> > http://jason.open-bio.org/
> >
> >
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>



More information about the Bioperl-l mailing list