MACS3.Signal.RACollection module

All Parser classes

class MACS3.Signal.RACollection.RACollection(chrom, peak, RAlist_T, RAlist_C=[])

Bases: object

A collection of ReadAlignment objects and the corresponding PeakIO.

RAlists: list
RAs_left: typedef
RAs_right: typedef
add_to_unitig_list(unitig_list, unitigs_2nd)
Return type:

list

align_unitig_to_REFSEQ(unitig_list)

Note: we use smith waterman, but we don’t use linear gap penalty at this time.

Also, if unitig is mapped to - strand, we will revcomp the unitig. So the unitig_will: list be changed in this case.

Return type:

tuple

build_unitig_collection(fermiMinOverlap)

unitig_and: list tuple_alns are in the same order!

return UnitigCollection object.

chrom: bytes
fermi_assemble(fermiMinOverlap, opt_flag=128)

A wrapper function to call Fermi unitig building functions.

Return type:

list

filter_unitig_with_bad_aln(unitig_list, target_alns, reference_alns, gratio=0.25)

Remove unitigs that has too much gaps (both on target and reference) during alignments.

Return type:

tuple

get_FASTQ()

Get FASTQ file for all reads in RACollection.

Return type:

bytearray

get_PosReadsInfo_ref_pos(ref_pos, ref_nt, Q=20)

Generate a PosReadsInfo for: object a given reference genome position.

Return a PosReadsInfo object.

left: typedef
length: typedef
n_edits_sum()
Return type:

typedef

peak: PeakIO
peak_refseq: bytes
peak_refseq_ext: bytes
remap_RAs_w_unitigs(unitig_list)

Remap RAs to unitigs, requiring perfect match.

Return RAlists_T, RAlists_C, unmapped_racollection.

Return type:

list

remove_outliers(percent=5)

Remove outliers with too many n_edits. The outliers with n_edits in top p% will be removed.

Default: remove top 5% of reads that have too many differences with reference genome.

right: typedef
sort()

Sort RAs according to lpos. Should be used after realignment.

sorted: _fake_callable
verify_alns(unitig_list, unitig_alns, reference_alns, aln_scores, markup_alns, min_score_100=150)

Remove aln/unitig if it contains too many edits in a small region

default min score is 150, which means under 2/-3/-5/-2 scoring schema, there are 10 mismatches within 100bps region.

MACS3.Signal.RACollection.bool(*args, **kwargs)
MACS3.Signal.RACollection.free(*args, **kwargs)
MACS3.Signal.RACollection.malloc(*args, **kwargs)