Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

go::utils(3pm) [debian man page]

GO::Utils(3pm)						User Contributed Perl Documentation					    GO::Utils(3pm)

NAME
GO::Utils - utilities for GO modules rearrange() Usage : n/a Function : Rearranges named parameters to requested order. Returns : @params - an array of parameters in the requested order. Argument : $order : a reference to an array which describes the desired order of the named parameters. @param : an array of parameters, either as a list (in which case the function simply returns the list), or as an associative array (in which case the function sorts the values according to @{$order} and returns that new array. Exceptions : carps if a non-recognised parameter is sent get_param() Usage : get_param('name',(-att1=>'ben',-name=>'the_name')) Function : Fetches a named parameter. Returns : The value of the requested parameter. Argument : $name : The name of the the parameter desired @param : an array of parameters, as an associative array Exceptions : carps if a non-recognised parameter is sent Based on rearrange(), which is originally from CGI.pm by Lincoln Stein and BioPerl by Richard Resnick. See rearrange() for details. remove_duplicates remove duplicate items from an array usage: remove_duplicates(@arr) affects the array passed in, and returns the modified array merge_hashes joins two hashes together usage: merge_hashes(\%h1, \%h2); %h1 will now contain the key/val pairs of %h2 as well. if there are key conflicts, %h2 values will take precedence. get_method_ref returns a pointer to a particular objects method e.g. my $length_f = get_method_ref($seq, 'length'); $len = &$length_f(); pset2hash Usage - my $h = pset2hash([{name=>"id", value=>"56"}, {name=>"name", value=>"jim"}]); Returns - hashref Args - arrayref of name/value keyed hashrefs spell_greek takes a word as a parameter and spells out any greek symbols encoded within (eg s/&agr;/alpha/g) check_obj_graph Usage - Returns - true if cycle detected Args - any object perl v5.14.2 2013-02-07 GO::Utils(3pm)

Check Out this Related Man Page

Grinder::KmerCollection(3pm)				User Contributed Perl Documentation			      Grinder::KmerCollection(3pm)

NAME
Grinder::KmerCollection - A collection of kmers from sequences SYNOPSIS
my $col = Grinder::KmerCollection->new( -k => 10, -file => 'seqs.fa' ); DESCRIPTION
Manage a collection of kmers found in various sequences. Store information about what sequence a kmer was found in and its starting position on the sequence. AUTHOR
Florent Angly <florent.angly@gmail.com> APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ new Title : new Usage : my $col = Grinder::KmerCollection->new( -k => 10, -file => 'seqs.fa', -revcom => 1 ); Function: Build a new kmer collection Args : -k set the kmer length (default: 10 bp) -revcom count kmers before and after reverse-complementing sequences (default: 0) -seqs count kmers in the provided arrayref of sequences (Bio::Seq objects) -ids if specified, index the sequences provided to -seq using the use the IDs in this arrayref instead of using the sequences $seq->id() method -file count kmers in the provided file of sequences -weights if specified, assign the abundance of each sequence from the values in this arrayref Returns : Grinder::KmerCollection object k Usage : $col->k; Function: Get the length of the kmers Args : None Returns : Positive integer weights Usage : $col->weights({'seq1' => 3, 'seq10' => 0.45}); Function: Get or set the weight of each sequence. Each sequence is given a weight of 1 by default. Args : hashref where the keys are sequence IDs and the values are the weight of the corresponding (e.g. their relative abundance) Returns : Grinder::KmerCollection object collection_by_kmer Usage : $col->collection_by_kmer; Function: Get the collection of kmers, indexed by kmer Args : None Returns : A hashref of hashref of arrayref: hash->{kmer}->{ID of sequences with this kmer}->[starts of kmer on sequence] collection_by_seq Usage : $col->collection_by_seq; Function: Get the collection of kmers, indexed by sequence ID Args : None Returns : A hashref of hashref of arrayref: hash->{ID of sequences with this kmer}->{kmer}->[starts of kmer on sequence] add_file Usage : $col->add_file('seqs.fa'); Function: Process the kmers in the given file of sequences. Args : filename Returns : Grinder::KmerCollection object add_seqs Usage : $col->add_seqs([$seq1, $seq2]); Function: Process the kmers in the given sequences. Args : * arrayref of Bio::Seq objects * arrayref of IDs to use for the indexing of the sequences Returns : Grinder::KmerCollection object filter_rare Usage : $col->filter_rare( 2 ); Function: Remove kmers occurring at less than the (weighted) abundance specified Args : integer Returns : Grinder::KmerCollection object filter_shared Usage : $col->filter_shared( 2 ); Function: Remove kmers occurring in less than the number of sequences specified Args : integer Returns : Grinder::KmerCollection object counts Usage : $col->counts Function: Calculate the total count of each kmer. Counts are affected by the weights you gave to the sequences. Args : * restrict sequences to search to specified sequence ID (optional) * starting position from which counting should start (optional) * 0 to report counts (default), 1 to report frequencies (normalize to 1) Returns : * arrayref of the different kmers * arrayref of the corresponding total counts sources Usage : $col->sources() Function: Return the sources of a kmer and their (weighted) abundance. Args : * kmer to get the sources of * sources to exclude from the results (optional) * 0 to report counts (default), 1 to report frequencies (normalize to 1) Returns : * arrayref of the different sources * arrayref of the corresponding total counts If the kmer requested does not exist, the array will be empty. kmers Usage : $col->kmers('seq1'); Function: This is the inverse of sources(). Return the kmers found in a sequence (given its ID) and their (weighted) abundance. Args : * sequence ID to get the kmers of * 0 to report counts (default), 1 to report frequencies (normalize to 1) Returns : * arrayref of sequence IDs * arrayref of the corresponding total counts If the sequence ID requested does not exist, the arrays will be empty. positions Usage : $col->positions() Function: Return the positions of the given kmer on a given sequence. An error is reported if the kmer requested does not exist Args : * desired kmer * desired sequence with this kmer Returns : Arrayref of the different positions. The arrays will be empty if the desired combination of kmer and sequence was not found. perl v5.14.2 2012-01-17 Grinder::KmerCollection(3pm)
Man Page