G::Tools

Fasta

Included libraries Package variables General documentation Methods

Package variables top
Globals (from use vars definitions)
@EXPORT
$VERSION
@EXPORT_OK
Included modulestop
G::Messenger
SubOpt
strict
Inherit top
AutoLoader Exporter
Synopsistop
No synopsis!
Descriptiontop
No description!
Methodstop
_fastaNo descriptionCode
newNo descriptionCode

Methods description


Methods code

_fastadescriptiontopprevnext
sub _fasta {
    &opt_default(qr=>'off',input=>"file");
    my @param;
    my @tmp;
    foreach(@_){
        if($_ eq '-a' || $_ eq '-A' || $_ eq '-B' || $_ eq '-f' || $_ eq '-g' ||
           $_ eq '-h' || $_ eq '-H' || $_ eq '-i' || $_ eq '-L' || $_ eq '-n' || 
           $_ eq '-o' || $_ eq '-p' || $_ eq '-Q' || $_ eq '-q' || $_ eq '-r' ||
           $_ eq '-S' || $_ eq '-1' || $_ eq '-3' ){
	    push(@param,$_);
        }
        else{
            push(@tmp,$_);
        }
    }
    @_=@tmp;
    my @args=opt_get(@_);

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

    $data=shift @args;
    if($input eq 'seq'){
	$seq=shift @args;
	opendir(DIR,'/tmp');
	@tmp=readdir(DIR);
	$num=$##tmp+1+time;
@tmp=keys(%$seq); open(FILE,'>/tmp/fasta_'.$num.'.seq'); print FILE ">$tmp[0]\n"; print FILE $$seq{"$tmp[0]"},"\n"; close(FILE); $file='/tmp/fasta_'.$num.'.seq'; } else{ $file=shift @args; } $opt{E}=&opt_val("E"); $opt{O}=&opt_val("O"); $opt{b}=&opt_val("b"); $opt{c}=&opt_val("c"); $opt{d}=&opt_val("d"); $opt{F}=&opt_val("F"); $opt{j}=&opt_val("j"); $opt{l}=&opt_val("l"); $opt{M}=&opt_val("M"); $opt{m}=&opt_val("m");
$opt{R}=&opt_val("R"); $opt{s}=&opt_val("s");
$opt{w}=&opt_val("w");
$opt{x}=&opt_val("x"); $opt{X}=&opt_val("X"); $opt{y}=&opt_val("y"); $opt{z}=&opt_val("z"); foreach(sort keys(%opt)){ next if($opt{$_} eq ''); push(@param,'-'.$_); push(@param,$opt{$_}); } $param=join(' ',@param); system('fasta33',"$data","$file",@param) if($qr eq "off"); system('qr',"fasta33 $data $file $param") if($qr eq "on"); unlink('/tmp/fasta_'.$num.'.seq') if($input eq 'seq' && $qr ne 'on'); return "$data $file $param"; } sub DESTROY { my $self = shift; } 1; __END__ ## Below is the stub of documentation for your module. You better edit it!
=head1 NAME G::Tools::Fasta - Perl extension for blah blah blah =head1 SYNOPSIS use G::Tools::Fasta; blah blah blah =head1 DESCRIPTION Stub documentation for G::Tools::Fasta was created by h2xs. It looks like the author of the extension was negligent enough to leave the stub unedited. Blah blah blah. =head1 AUTHOR A. U. Thor, a.u.thor@a.galaxy.far.far.away =head1 SEE ALSO perl(1). =cut
}
newdescriptiontopprevnext
sub new {
    my $pkg = shift;
    my $filename = shift;
    my $option = shift;
    my $this;

    return $this;
}

General documentation

No general documentation available.