.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Bio::Tools::Run::BEDTools 3pm" .TH Bio::Tools::Run::BEDTools 3pm "2023-01-22" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::Tools::Run::BEDTools \- Run wrapper for the BEDTools suite of programs *BETA* .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& # use a BEDTools program \& $bedtools_fac = Bio::Tools::Run::BEDTools\->new( \-command => \*(Aqsubtract\*(Aq ); \& $result_file = $bedtools_fac\->run( \-bed1 => \*(Aqgenes.bed\*(Aq, \-bed2 => \*(Aqmask.bed\*(Aq ); \& \& # if IO::Uncompress::Gunzip is available... \& $result_file = $bedtools_fac\->run( \-bed1 => \*(Aqgenes.bed.gz\*(Aq, \-bed2 => \*(Aqmask.bed.gz\*(Aq ); \& \& # be more strict \& $bedtools_fac\->set_parameters( \-strandedness => 1 ); \& \& # and even more... \& $bedtools_fac\->set_parameters( \-minimum_overlap => 1e\-6 ); \& \& # create a Bio::SeqFeature::Collection object \& $features = $bedtools_fac\->result( \-want => \*(AqBio::SeqFeature::Collection\*(Aq ); .Ve .SH "DEPRECATION WARNING" .IX Header "DEPRECATION WARNING" Most executables from BEDTools v>=2.10.1 can read \s-1GFF\s0 and \s-1VCF\s0 formats in addition to \s-1BED\s0 format. This requires the use of a new input file param, shown in the following documentation, '\-bgv', in place of '\-bed' for the executables that can do this. .PP This behaviour breaks existing scripts. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module provides a wrapper interface for Aaron R. Quinlan and Ira M. Hall's utilities \f(CW\*(C`BEDTools\*(C'\fR that allow for (among other things): .IP "\(bu" 4 Intersecting two \s-1BED\s0 files in search of overlapping features. .IP "\(bu" 4 Merging overlapping features. .IP "\(bu" 4 Screening for paired-end (\s-1PE\s0) overlaps between \s-1PE\s0 sequences and existing genomic features. .IP "\(bu" 4 Calculating the depth and breadth of sequence coverage across defined \*(L"windows\*(R" in a genome. .PP (see for manuals and downloads). .SH "OPTIONS" .IX Header "OPTIONS" \&\f(CW\*(C`BEDTools\*(C'\fR is a suite of 17 commandline executable. This module attempts to provide and options comprehensively. You can browse the choices like so: .PP .Vb 1 \& $bedtools_fac = Bio::Tools::Run::BEDTools\->new; \& \& # all bowtie commands \& @all_commands = $bedtools_fac\->available_parameters(\*(Aqcommands\*(Aq); \& @all_commands = $bedtools_fac\->available_commands; # alias \& \& # just for default command (\*(Aqbam_to_bed\*(Aq) \& @btb_params = $bedtools_fac\->available_parameters(\*(Aqparams\*(Aq); \& @btb_switches = $bedtools_fac\->available_parameters(\*(Aqswitches\*(Aq); \& @btb_all_options = $bedtools_fac\->available_parameters(); .Ve .PP Reasonably mnemonic names have been assigned to the single-letter command line options. These are the names returned by \&\f(CW\*(C`available_parameters\*(C'\fR, and can be used in the factory constructor like typical BioPerl named parameters. .PP As a number of options are mutually exclusive, and the interpretation of intent is based on last-pass option reaching bowtie with potentially unpredicted results. This module will prevent inconsistent switches and parameters from being passed. .PP See for details of BEDTools options. .SH "FILES" .IX Header "FILES" When a command requires filenames, these are provided to the \f(CW\*(C`run\*(C'\fR method, not the constructor (\f(CW\*(C`new()\*(C'\fR). To see the set of files required by a command, use \&\f(CW\*(C`available_parameters(\*(Aqfilespec\*(Aq)\*(C'\fR or the alias \f(CW\*(C`filespec()\*(C'\fR: .PP .Vb 2 \& $bedtools_fac = Bio::Tools::Run::BEDTools\->new( \-command => \*(Aqpair_to_bed\*(Aq ); \& @filespec = $bedtools_fac\->filespec; .Ve .PP This example returns the following array: .PP .Vb 4 \& #bedpe \& #bam \& bed \& #out .Ve .PP This indicates that the bed (\f(CW\*(C`BEDTools\*(C'\fR \s-1BED\s0 format) file \s-1MUST\s0 be specified, and that the out, bedpe (\f(CW\*(C`BEDTools\*(C'\fR \s-1BEDPE\s0 format) and bam (\f(CW\*(C`SAM\*(C'\fR binary format) file \s-1MAY\s0 be specified (Note that in this case you \&\s-1MUST\s0 provide \s-1ONE\s0 of bedpe \s-1OR\s0 bam, the module at this stage does not allow this information to be queried). Use these in the \f(CW\*(C`run\*(C'\fR call like so: .PP .Vb 3 \& $bedtools_fac\->run( \-bedpe => \*(Aqpaired.bedpe\*(Aq, \& \-bgv => \*(Aqgenes.bed\*(Aq, \& \-out => \*(Aqoverlap\*(Aq ); .Ve .PP The object will store the programs \s-1STDERR\s0 output for you in the \f(CW\*(C`stderr()\*(C'\fR attribute: .PP .Vb 1 \& handle_bed_warning($bedtools_fac) if ($bedtools_fac\->stderr =~ /Usage:/); .Ve .PP For the commands 'fasta_from_bed' and 'mask_fasta_from_bed' \s-1STDOUT\s0 will also be captured in the \f(CW\*(C`stdout()\*(C'\fR attribute by default and all other commands can be forced to capture program output in \s-1STDOUT\s0 by setting the \-out filespec parameter to '\-'. .SH "FEEDBACK" .IX Header "FEEDBACK" .SS "Mailing Lists" .IX Subsection "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. .PP .Vb 2 \& bioperl\-l@bioperl.org \- General discussion \& http://bioperl.org/wiki/Mailing_lists \- About the mailing lists .Ve .SS "Support" .IX Subsection "Support" Please direct usage questions or support issues to the mailing list: .PP bioperl\-l@bioperl.org .PP 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. .SS "Reporting Bugs" .IX Subsection "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: .PP .Vb 1 \& http://redmine.open\-bio.org/projects/bioperl/ .Ve .SH "AUTHOR \- Dan Kortschak" .IX Header "AUTHOR - Dan Kortschak" .Vb 1 \& Email dan.kortschak adelaide.edu.au .Ve .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" Additional contributors names and emails here .SH "APPENDIX" .IX Header "APPENDIX" The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ .SS "\fBnew()\fP" .IX Subsection "new()" .Vb 5 \& Title : new \& Usage : my $obj = new Bio::Tools::Run::BEDTools(); \& Function: Builds a new Bio::Tools::Run::BEDTools object \& Returns : an instance of Bio::Tools::Run::BEDTools \& Args : .Ve .SS "\fBrun()\fP" .IX Subsection "run()" .Vb 9 \& Title : run \& Usage : $result = $bedtools_fac\->run(%params); \& Function: Run a BEDTools command. \& Returns : Command results (file, IO object or Bio object) \& Args : Dependent on filespec for command. \& See $bedtools_fac\->filespec and BEDTools Manual. \& Also accepts \-want => \*(Aq(raw|format|)\*(Aq \- see want(). \& Note : gzipped inputs are allowed if IO::Uncompress::Gunzip \& is available .Ve .PP .Vb 1 \& Command \& \& annotate bgv ann(s) #out .Ve .PP .Vb 1 \& graph_union bg_files #out .Ve .PP .Vb 1 \& fasta_from_bed seq bgv #out \& \& mask_fasta_from_bed seq bgv #out .Ve .PP .Vb 1 \& bam_to_bed bam #out .Ve .PP .Vb 1 \& bed_to_IGV bgv #out \& \& merge bgv #out \& \& sort bgv #out \& \& links bgv #out .Ve .PP .Vb 1 \& b12_to_b6 bed #out \& \& overlap bed #out \& \& group_by bed #out .Ve .PP .Vb 1 \& bed_to_bam bgv #out \& \& shuffle bgv genome #out \& \& slop bgv genome #out \& \& complement bgv genome #out .Ve .PP .Vb 1 \& genome_coverage bed genome #out .Ve .PP .Vb 1 \& window bgv1 bgv2 #out \& \& closest bgv1 bgv2 #out \& \& coverage bgv1 bgv2 #out \& \& subtract bgv1 bgv2 #out .Ve .PP .Vb 1 \& pair_to_pair bedpe1 bedpe2 #out .Ve .PP .Vb 1 \& intersect bgv1|bam bgv2 #out .Ve .PP .Vb 1 \& pair_to_bed bedpe|bam bgv #out \& \& bgv* signifies any of BED, GFF or VCF. ann is a bgv. \& \& NOTE: Replace \*(Aqbgv\*(Aq with \*(Aqbed\*(Aq unless $use_bgv is set. .Ve .SS "\fBwant()\fP" .IX Subsection "want()" .Vb 10 \& Title : want \& Usage : $bowtiefac\->want( $class ) \& Function: make factory return $class, or \*(Aqraw\*(Aq results in file \& or \*(Aqformat\*(Aq for result format \& All commands can return Bio::Root::IO \& commands returning: can return object: \& \- BED or BEDPE \- Bio::SeqFeature::Collection \& \- sequence \- Bio::SeqIO \& Returns : return wanted type \& Args : [optional] string indicating class or raw of wanted result .Ve .SS "\fBresult()\fP" .IX Subsection "result()" .Vb 7 \& Title : result \& Usage : $bedtoolsfac\->result( [\-want => $type|$format] ) \& Function: return result in wanted format \& Returns : results \& Args : [optional] hashref of wanted type \& Note : \-want arg does not persist between result() call when \& specified in result(), for persistence, use want() .Ve .SS "\fB_determine_format()\fP" .IX Subsection "_determine_format()" .Vb 5 \& Title : _determine_format( $has_run ) \& Usage : $bedtools\-fac\->_determine_format \& Function: determine the format of output for current options \& Returns : format of bowtie output \& Args : [optional] boolean to indicate result exists .Ve .SS "\fB_read_bed()\fP" .IX Subsection "_read_bed()" .Vb 5 \& Title : _read_bed() \& Usage : $bedtools_fac\->_read_bed \& Function: return a Bio::SeqFeature::Collection object from a BED file \& Returns : Bio::SeqFeature::Collection \& Args : .Ve .SS "\fB_read_bedpe()\fP" .IX Subsection "_read_bedpe()" .Vb 5 \& Title : _read_bedpe() \& Usage : $bedtools_fac\->_read_bedpe \& Function: return a Bio::SeqFeature::Collection object from a BEDPE file \& Returns : Bio::SeqFeature::Collection \& Args : .Ve .SS "\fB_validate_file_input()\fP" .IX Subsection "_validate_file_input()" .Vb 5 \& Title : _validate_file_input \& Usage : $bedtools_fac\->_validate_file_input( \-type => $file ) \& Function: validate file type for file spec \& Returns : file type if valid type for file spec \& Args : hash of filespec => file_name .Ve .SS "\fBversion()\fP" .IX Subsection "version()" .Vb 4 \& Title : version \& Usage : $version = $bedtools_fac\->version() \& Function: Returns the program version (if available) \& Returns : string representing location and version of the program .Ve