pybedtools.bedtool.BedTool.to_bam

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

Wraps bedtools bedtobam

If self.fn is in BED/VCF/GFF format, call BEDTools’ bedToBam. If self.fn is in SAM format, then create a header out of the genome file and then convert using samtools.