smftools.informatics.bed_functions

smftools.informatics.bed_functions#

Functions

aligned_BAM_to_bed(aligned_BAM, out_dir, ...)

Takes an aligned BAM as input and writes a BED file of reads as output.

extract_read_lengths_from_bed(file_path)

Load a dict of read names that points to the read length

smftools.informatics.bed_functions.aligned_BAM_to_bed(aligned_BAM, out_dir, fasta, make_bigwigs, threads=None, *, samtools_backend='auto', bedtools_backend='auto', bigwig_backend='auto')#

Takes an aligned BAM as input and writes a BED file of reads as output. Bed columns are: Record name, start position, end position, read length, read name, mapping quality, read quality.

Parameters:
  • aligned_BAM (str) -- Path to an input aligned_BAM to extract to a BED file.

  • out_dir (str) -- Directory to output files.

  • fasta (str) -- File path to the reference genome.

  • make_bigwigs (bool) -- Whether to generate bigwig files.

  • threads (int) -- Number of threads to use.

Returns:

None

smftools.informatics.bed_functions.extract_read_lengths_from_bed(file_path)#

Load a dict of read names that points to the read length

Parameters:

file_path (str) -- file path to a bed file

Returns:

read_dict (dict)