Bio::T...amtools(3pm)
π Bio::Tools::Run::Samtools π
okay bestie, so this is a run wrapper for the samtools suite β and it's marked BETA, so like, it's giving "we're so back but also be careful" energy. It lives in the User Contributed Perl Documentation corner of the perl world, and it's a 3pm page. πΈ
β¨ NAME β¨
Bio::Tools::Run::Samtools β a run wrapper for the samtools suite BETA π
β¨ SYNOPSIS β¨
# convert a sam to a bam
$samt = Bio::Tools::Run::Samtools( -command => 'view',
-sam_input => 1,
-bam_output => 1 );
$samt->run( -bam => "mysam.sam", -out => "mysam.bam" );
# sort it
$samt = Bio::Tools::Run::Samtools( -command => 'sort' );
$samt->run( -bam => "mysam.bam", -pfx => "mysam.srt" );
# now create an assembly
$assy = Bio::IO::Assembly->new( -file => "mysam.srt.bam",
-refdb => "myref.fas" );
no cap, that's the whole vibe right there π¦
β¨ DESCRIPTION β¨
This is a wrapper for running samtools, a suite of large-alignment reading and manipulation programs, available at <http://samtools.sourceforge.net/>. literally the whole point, periodt π
β¨ RUNNING COMMANDS β¨
To run a "samtools" command, you construct a run factory β and you tell it which command you want using the -command argument in the factory constructor, plus whatever options are specific to that command (peep OPTIONS below, bestie):
$samt = Bio::Tools::Run::Samtools->new( -command => 'view',
-sam_input => 1,
-bam_output => 1);
Then to actually execute, you use the "run()" method. Input and output files go in the arguments of "run()", not the constructor (see FILES):
$samt->run( -bam => "mysam.sam", -out => "mysam.bam" );
go off π
β¨ OPTIONS β¨
"samtools" is complex, bestie. Like, many subprograms (commands), and each one has its own command-line options and file specs. This module tries to be comprehensive about commands and options. You can browse the choices like so:
$samt = Bio::Tools::Run::Samtools->new( -command => 'pileup' );
# all samtools commands
@all_commands = $samt->available_parameters('commands');
@all_commands = $samt->available_commands; # alias
# just for pileup
@pup_params = $samt->available_parameters('params');
@pup_switches = $samt->available_parameters('switches');
@pup_all_options = $samt->available_parameters();
Reasonably mnemonic names have been assigned to the single-letter command line options. These are the names returned by "available_parameters", and you can use them in the factory constructor just like typical BioPerl named parameters. iconic behavior honestly π
See <http://samtools.sourceforge.net/samtools.shtml> for the gory details. π
β¨ FILES β¨
When a command requires filenames, those go to the "run()" method β not the constructor ("new()"). To see the set of files a command needs, use "available_parameters('filespec')" or its alias "filespec()":
$samt = Bio::Tools::Run::Samtools->new( -command => 'view' );
@filespec = $samt->filespec;
This example returns the following array:
bam
>out
Which is telling you that the bam/sam file (bam) and the output file (out) MUST be specified in the "run()" argument list:
$samt->run( -bam => 'mysam.sam', -out => 'mysam.cvt' );
And if files are not specified per the filespec, then the text sent to STDOUT and STDERR gets saved, and you can reach it with "$bwafac-"stdout()> and "$bwafac-"stderr()>. π«Ά
β¨ FEEDBACK β¨
π Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated. fr fr, they wanna hear from you π
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
π©· Support
Please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible. (yes bestie, examples, they're not optional if you want the fast answer π )
π Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web:
http://redmine.open-bio.org/projects/bioperl/
β¨ AUTHOR - Mark A. Jensen β¨
Email maj -at- fortinbras -dot- us
β¨ APPENDIX β¨
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ (iykyk π₯).
π new
Title : new
Usage : my $obj = new Bio::Tools::Run::Samtools();
Function: Builds a new Bio::Tools::Run::Samtools object
Returns : an instance of Bio::Tools::Run::Samtools
Args :
and that's the whole page, bestie π§ this one's from perl v5.36.0, dated 2023-01-22, and it's the Bio::T...amtools(3pm) page β you ate that read, periodt π
π¦ where this page comes from
- debian bookworm: libbio-perl-run-perl 1.7.3-9 Β· Perl
- ubuntu noble: libbio-perl-run-perl 1.7.3-9 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms