G::Tools

Repeat

Summary Included libraries Package variables Synopsis Description General documentation Methods

Summary
G::Tools::Repeat - Perl extension for blah blah blah
Package variables top
Globals (from use vars definitions)
@EXPORT
$VERSION
@EXPORT_OK
Included modulestop
G::Messenger
SubOpt
strict
Inherit top
AutoLoader Exporter
Synopsistop
  use G::Tools::Repeat;
blah blah blah
Descriptiontop
Stub documentation for G::Tools::Repeat was created by h2xs. It looks like the
author of the extension was negligent enough to leave the stub
unedited.

Blah blah blah.
Methodstop
DESTROYNo descriptionCode
_repeatmaskerNo descriptionCode
_trfNo descriptionCode
newNo descriptionCode

Methods description


Methods code

DESTROYdescriptiontopprevnext
sub DESTROY {
    my $self = shift;
}
_repeatmaskerdescriptiontopprevnext
sub _repeatmasker {
    &opt_default(input=>"file",qr=>"off");
    my @param;
    my @tmp;
    foreach(@_){
	if($_ eq '-nolow' || $_ eq '-l' || $_ eq '-int' || $_ eq '-norna' ||
           $_ eq '-alu' || $_ eq '-m' || $_ eq '-rod' || $_ eq '-mam' ||
           $_ eq '-cow' || $_ eq '-ar' || $_ eq '-dr' || $_ eq '-el' ||
	   $_ eq '-is_only' || $_ eq '-is_clip' || $_ eq '-no_is' ||
	   $_ eq '-rodspec' || $_ eq '-primspec' || $_ eq '-w' || $_ eq '-s'||
	   $_ eq '-q' || $_ eq '-qq' || $_ eq '-gccalc' || $_ eq '-nocut' ||
	   $_ eq '-noisy' || $_ eq '-a' || $_ eq '-cut' || $_ eq '-small' ||
	   $_ eq '-xsmall' || $_ eq '-x' || $_ eq '-poly' || $_ eq '-ace' ||
	   $_ eq '-gff' || $_ eq '-u' || $_ eq '-xm' || $_ eq '-fixed' ||
	   $_ eq '-no_id' || $_ eq '-e'){
	    push(@param,$_);
	}
	else{
	    push(@tmp,$_);
	}
    }
    @_=@tmp;
    my @args=opt_get(@_);

    my $input=&opt_val("input");
    my $qr=&opt_val("qr");
    my $file;
    my $seq;
    my $param;
    my %opt;
    my $num;

    if($input eq "seq"){
	$seq=shift @args;
	opendir(DIR,'/tmp');
	@tmp=readdir(DIR);
	$num=$##tmp+1+time;
@tmp=keys(%$seq); open(FILE,'>/tmp/repeatmasker_'.$num.'.seq'); print FILE ">$tmp[0]\n"; print FILE $$seq{$tmp[0]},"\n"; close(FILE); $file='/tmp/repeatmasker_'.$num.'.seq'; &opt_default(dir=>'.'); } else{ $file=shift @args; } $opt{div}=&opt_val("div"); $opt{lib}=&opt_val("lib"); $opt{cutoff}=&opt_val("cutoff"); $opt{pa}=&opt_val("pa"); $opt{gc}=&opt_val('gc'); $opt{frag}=&opt_val('frag'); $opt{dir}=&opt_val('dir'); foreach(sort keys(%opt)){ next if($opt{$_} eq ''); push(@param,'-'.$_); push(@param,$opt{$_}); } $param=join(" ",@param); system("RepeatMasker $param $file") if($qr ne 'on'); system('qr',"RepeatMasker $param $file") if($qr eq 'on'); unlink('/tmp/repeatmasker_'.$num.'.seq') if($input eq "seq" && $qr ne 'on'); return "$param $file";
}
_trfdescriptiontopprevnext
sub _trf {
    &opt_default(qr=>'off',input=>"file",Match=>"2",Mismatch=>"7",Delta=>"7",PM=>"80",PI=>"10",Minscore=>"50",MaxPeriod=>"500");
    my @param;
    my @tmp;
    foreach(@_){
        if($_ eq '-m' || $_ eq '-f' || $_ eq '-d'){
            push(@param,$_);
        }
        else{
            push(@tmp,$_);
        }
    }
    @_=@tmp;
    my @args=opt_get(@_);

    my $qr=&opt_val("qr");
    my $input=&opt_val("input");
    my $filename=&opt_val("filename");
    my $file;
    my $seq;
    my $param;
    my %opt;
    my $num;

    if($input eq "seq"){
        $seq=shift @args;
	if($filename eq ''){
	    opendir(DIR,'/tmp');
	    @tmp=readdir(DIR);
	    $num=$##tmp+1+time;
$filename='/tmp/trf_'.$num.'.seq'; } @tmp=keys(%$seq); open(FILE,'>'."$filename"); print FILE ">$tmp[0]\n"; print FILE $$seq{$tmp[0]},"\n"; close(FILE); $file=$filename; } else{ $file=shift @args; } @param=(&opt_val("Match"),&opt_val("Mismatch"),&opt_val("Delta"),&opt_val("PM"),&opt_val("PI"),&opt_val("Minscore"),&opt_val("MaxPeriod"),@param); foreach(sort keys(%opt)){ next if($opt{$_} eq ''); push(@param,'-'.$_); push(@param,$opt{$_}); } $param=join(" ",@param); system("trf $file $param") if($qr ne 'on'); system('qr',"trf $file $param") if($qr eq 'on'); unlink("$filename") if($input eq "seq" && $qr ne 'on'); return "$file $param";
}
newdescriptiontopprevnext
sub new {
    my $pkg = shift;
    my $filename = shift;
    my $option = shift;
    my $this;

    return $this;
}

General documentation

AUTHOR top
A. U. Thor, a.u.thor@a.galaxy.far.far.away
SEE ALSO top
perl(1).