Bio-ToolBox
view release on metacpan or search on metacpan
lib/Bio/ToolBox.pm view on Meta::CPAN
=head2 Methods
=over 4
=item load_file
Open a tab-delimited text file as a L<Bio::ToolBox::Data> object.
Simply pass the file path as a single argument. It assumes the first
row is the column headers, and comment lines begin with C<#>.
Compressed files are transparently handled. See the
L<Bio::ToolBox::Data> C<new> method for more details or options.
$Data = Bio::ToolBox->load_file('myfile.txt');
For advanced options, pass key =E<gt> value pairs as arguments as
defined for L<Bio::ToolBox::Data> C<new()>.
=item parse_file
Parse an annotation file, such as BED, GTF, GFF3, UCSC genePred or
lib/Bio/ToolBox.pm view on Meta::CPAN
=item new_bed
Generate a new, empty L<Bio::ToolBox::Data> table formatted
as a BED format. Pass the number of columns desired (integer
in range 3..12 inclusive). Default is 6 (standard BED format).
$Data = Bio::ToolBox->new_bed(4);
=item read_file
Open a generic file handle for reading. It transparently handles
compression as necessary. Returns an L<IO::File> object. Pass the
file path as an argument.
$fh = Bio::ToolBox->read_file('mydata.txt.gz');
=item write_file
Open a generic file handle for writing. It transparently handles
compression as necessary based on filename extension or passed
options. It will use the C<pigz> multi-threaded, external, compression
utility if available. See the C<open_to_write_fh> method in
<Bio::ToolBox::Data::file> for more information.
$fh = Bio::ToolBox->write_file('mynewdata.txt.gz');
=item open_database
Open a binary database file, including Bam, bigWig, bigBed, Fasta,
L<Bio::DB::SeqFeature::Store> SQLite file or named MySQL connection,
USeq file, or any other supported binary or indexed file formats.
Database type is transparently and automatically checked by looking for
common file extensions, if present. See the C<open_db_connection> in
L<Bio::ToolBox::db_helper> for more information.
$db = Bio::ToolBox->open_database($database);
=back
=head1 REPOSITORY
Source code for the Bio::ToolBox package is maintained at
lib/Bio/ToolBox/Data.pm view on Meta::CPAN
name. If successful, it will return the name of the file saved.
=back
=head2 Verifying Datasets
When working with row Features and collecting scores, the dataset
from which you are collecting must be verified prior to collection.
This ensures that the proper database adaptor is available and loaded,
and that the dataset is correctly specified (otherwise nothing would be
collected). This verification is normally performed transparently when
you call L<get_score|Bio::ToolBox::Data::Feature/get_score> or
L<get_position_scores|Bio::ToolBox::Data::Feature/get_position_scores>.
However, datasets may be explicitly verified prior to calling the score
methods.
=over 4
=item verify_dataset
my $dataset = $Data->verify_dataset($dataset, $database);
scripts/manipulate_wig.pl view on Meta::CPAN
=item --help
Display the POD documentation using perldoc.
=back
=head1 DESCRIPTION
A program to manipulate the score value of wig files. This will process all
forms of text based wig files, including fixedStep, variableStep, and bedGraph.
Files may be gzip compressed. BigWig files are also transparently supported as
both input and output, provided that the appropriate UCSC utility files are
available.
B<NOTE:> More than one option may be specified! The options above are the order
in which the score is manipulated. If they are not in the order you want, you
may have to pipe to sequential instances. Use 'stdin' and 'stdout' for filenames.
=head1 AUTHOR
Timothy J. Parnell, PhD
( run in 0.666 second using v1.01-cache-2.11-cpan-a1d94b6210f )