pybedtools.bedtool.BedTool.bedpe_to_bam

BedTool.bedpe_to_bam(*args, **kwargs)[source]

Wraps bedtools bedpetobam.

For convenience, the file or stream this BedTool points to is implicitly passed as the -i argument to bedpeToBam

There are two alternatives for supplying a genome. Use g="genome.filename" if you have a genome’s chrom sizes saved as a file. This is the what BEDTools expects when using it from the command line. Alternatively, use the genome="assembly.name" (for example, genome="hg19") to use chrom sizes for that assembly without having to manage a separate file. The genome argument triggers a call pybedtools.chromsizes, so see that method for more details.

Original BEDTools help::

Tool:    bedtools bedpetobam (aka bedpeToBam)
Version: v2.31.1
Summary: Converts feature records to BAM format.

Usage:   bedpetobam [OPTIONS] -i <bed/gff/vcf> -g <genome>

Options: 
        -mapq   Set the mappinq quality for the BAM records.
                (INT) Default: 255

        -ubam   Write uncompressed BAM output. Default writes compressed BAM.

Notes: 
        (1)  BED files must be at least BED4 to create BAM (needs name field).