DoubleStrandAlignment¶
pycyseq.DoubleStrandAlignment
dataclass
¶
Alignment of a double-strand DNA molecule.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fwd
|
Alignment
|
Alignment object referring to the forward aligning strand |
required |
rev
|
Alignment
|
Alignment object referring to the reverse aligning strand |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
if the input fails validation |
endrepair_filled_bases: int
property
¶
Number of bases that would be filled at the 5' overhangs by end repair.
Click to expand for visual representations of each type
Examples show the original double strand DNA molecule before (left) and after
in silico end repair (right). F characters indicate filled bases. R symbols
indicate removed bases. Numbers between parenthesis indicate the number of
filled bases (after end repair).
Fwd 5' -> 3'
Rev 3' <- 5'
blunt_double (0)
NNNNNNNNNNNN -> NNNNNNNNNNNN
NNNNNNNNNNNN -> NNNNNNNNNNNN
blunt_fiveprime_fwd_overhang (0)
NNNNNNNNNNNN -> NNNNNNNNNRRR
NNNNNNNNN___ -> NNNNNNNNN___
blunt_fiveprime_rev_overhang (3)
NNNNNNNNN___ -> NNNNNNNNNFFF
NNNNNNNNNNNN -> NNNNNNNNNNNN
blunt_threeprime_fwd_overhang (0)
___NNNNNNNNN -> ___NNNNNNNNN
NNNNNNNNNNNN -> RRRNNNNNNNNN
blunt_threeprime_rev_overhang (3)
NNNNNNNNNNNN -> NNNNNNNNNNNN
___NNNNNNNNN -> FFFNNNNNNNNN
jagged_shifted_fiveprime (6)
NNNNNNNNN___ -> NNNNNNNNNFFF
___NNNNNNNNN -> FFFNNNNNNNNN
jagged_shifted_threeprime (0)
___NNNNNNNNN -> ___NNNNNNRRR
NNNNNNNNN___ -> RRRNNNNNN___
jagged_encompassing_fwd_overhang (3)
NNNNNNNNNNNN -> NNNNNNNNNRRR
___NNNNNN___ -> FFFNNNNNN___
jagged_encompassing_rev_overhang (3)
___NNNNNN___ -> ___NNNNNNFFF
NNNNNNNNNNNN -> RRRNNNNNNNNN
endrepair_removed_bases: int
property
¶
Number of bases that would be removed at the 3' overhangs by end repair.
Click to expand for visual representations of each type
Examples show the original double strand DNA molecule before (left) and after
in silico end repair (right). F characters indicate filled bases. R symbols
indicate removed bases. Numbers between parenthesis indicate the number of
removed bases (after end repair).
Fwd 5' -> 3'
Rev 3' <- 5'
blunt_double (0)
NNNNNNNNNNNN -> NNNNNNNNNNNN
NNNNNNNNNNNN -> NNNNNNNNNNNN
blunt_fiveprime_fwd_overhang (3)
NNNNNNNNNNNN -> NNNNNNNNNRRR
NNNNNNNNN___ -> NNNNNNNNN___
blunt_fiveprime_rev_overhang (0)
NNNNNNNNN___ -> NNNNNNNNNFFF
NNNNNNNNNNNN -> NNNNNNNNNNNN
blunt_threeprime_fwd_overhang (3)
___NNNNNNNNN -> ___NNNNNNNNN
NNNNNNNNNNNN -> RRRNNNNNNNNN
blunt_threeprime_rev_overhang (0)
NNNNNNNNNNNN -> NNNNNNNNNNNN
___NNNNNNNNN -> FFFNNNNNNNNN
jagged_shifted_fiveprime (0)
NNNNNNNNN___ -> NNNNNNNNNFFF
___NNNNNNNNN -> FFFNNNNNNNNN
jagged_shifted_threeprime (6)
___NNNNNNNNN -> ___NNNNNNRRR
NNNNNNNNN___ -> RRRNNNNNN___
jagged_encompassing_fwd_overhang (3)
NNNNNNNNNNNN -> NNNNNNNNNRRR
___NNNNNN___ -> FFFNNNNNN___
jagged_encompassing_rev_overhang (3)
___NNNNNN___ -> ___NNNNNNFFF
NNNNNNNNNNNN -> RRRNNNNNNNNN
fwd: Alignment
property
¶
Access the Alignment object of the forward mapping strand.
has_rotations: bool
property
¶
Return true if the read has more than one possible rotation
is_duplicate: bool
property
¶
Return true if read is marked as duplicate
len_doublestrand: int
property
¶
Length of the double strand portion between the two mapping strands.
Click to expand for visual representations of each type
Ref 5' -> 3'
Fwd 5' -> 3'
Rev 3' <- 5'
blunt_double (12)
NNNNNNNNNNNN
NNNNNNNNNNNN
blunt_fiveprime_fwd_overhang (9)
NNNNNNNNNNNN
NNNNNNNNN___
blunt_fiveprime_rev_overhang (9)
NNNNNNNNN___
NNNNNNNNNNNN
blunt_threeprime_fwd_overhang (9)
NNNNNNNNNNNN
___NNNNNNNNN
blunt_threeprime_rev_overhang (9)
___NNNNNNNNN
NNNNNNNNNNNN
jagged_shifted_fiveprime (6)
NNNNNNNNN___
___NNNNNNNNN
jagged_shifted_threeprime (6)
___NNNNNNNNN
NNNNNNNNN___
jagged_encompassing_fwd_overhang (6)
NNNNNNNNNNNN
___NNNNNN___
jagged_encompassing_rev_overhang (6)
___NNNNNN___
NNNNNNNNNNNN
len_endrepair: int
property
¶
Length of the molecule if end repair was done
End repairs blunts a double stranded DNA molecule by filling the 5' overhang and excising single strand bases from the 3' ends.
Click to expand for visual representations of each type
Examples below show the original double strand DNA molecule before (left) and
after (right) *in silico* end repair. Numbers between parenthesis indicate the
calculated length (after end repair).
Fwd 5' -> 3'
Rev 3' <- 5'
blunt_double (12)
NNNNNNNNNNNN -> NNNNNNNNNNNN
NNNNNNNNNNNN -> NNNNNNNNNNNN
blunt_fiveprime_fwd_overhang (9)
NNNNNNNNNNNN -> NNNNNNNNN___
NNNNNNNNN___ -> NNNNNNNNN___
blunt_fiveprime_rev_overhang (12)
NNNNNNNNN___ -> NNNNNNNNNNNN
NNNNNNNNNNNN -> NNNNNNNNNNNN
blunt_threeprime_fwd_overhang (9)
___NNNNNNNNN -> ___NNNNNNNNN
NNNNNNNNNNNN -> ___NNNNNNNNN
blunt_threeprime_rev_overhang (12)
NNNNNNNNNNNN -> NNNNNNNNNNNN
___NNNNNNNNN -> NNNNNNNNNNNN
jagged_shifted_fiveprime (12)
NNNNNNNNN___ -> NNNNNNNNNNNN
___NNNNNNNNN -> NNNNNNNNNNNN
jagged_shifted_threeprime (6)
___NNNNNNNNN -> ___NNNNNN___
NNNNNNNNN___ -> ___NNNNNN___
jagged_encompassing_fwd_overhang (9)
NNNNNNNNNNNN -> NNNNNNNNN___
___NNNNNN___ -> NNNNNNNNN___
jagged_encompassing_rev_overhang (9)
___NNNNNN___ -> ___NNNNNNNNN
NNNNNNNNNNNN -> ___NNNNNNNNN
len_fwd: int
property
¶
Length of the forward mapping strand.
len_long: int
property
¶
Length of the longest of the two mapping strands.
len_ref_fiveprime: int
property
¶
Length of the overhang of the 5' reference overhang, regardless of the strand
len_ref_fiveprime_fwd: int
property
¶
Length of the overhang of the 5' reference overhang on the forward strand
len_ref_fiveprime_rev: int
property
¶
Length of the overhang of the 5' reference overhang on the reverse strand
len_ref_threeprime: int
property
¶
Length of the overhang of the 3' reference overhang, regardless of the strand
len_ref_threeprime_fwd: int
property
¶
Length of the overhang of the 3' reference overhang on the forward strand
len_ref_threeprime_rev: int
property
¶
Length of the overhang of the 3' reference overhang on the reverse strand
len_rev: int
property
¶
Length of the reverse mapping strand.
len_short: int
property
¶
Length of the shortest of the two mapping strands.
len_span: int
property
¶
Length of from the most 5' aligned based to the 3' most aligned based on either strand.
Click to expand for visual representations of each type
Ref 5' -> 3'
Fwd 5' -> 3'
Rev 3' <- 5'
blunt_double (12)
NNNNNNNNNNNN
NNNNNNNNNNNN
blunt_fiveprime_fwd_overhang (12)
NNNNNNNNNNNN
NNNNNNNNN___
blunt_fiveprime_rev_overhang (12)
NNNNNNNNN___
NNNNNNNNNNNN
blunt_threeprime_fwd_overhang (12)
NNNNNNNNNNNN
___NNNNNNNNN
blunt_threeprime_rev_overhang (12)
___NNNNNNNNN
NNNNNNNNNNNN
jagged_shifted_fiveprime (12)
NNNNNNNNN___
___NNNNNNNNN
jagged_shifted_threeprime (12)
___NNNNNNNNN
NNNNNNNNN___
jagged_encompassing_fwd_overhang (12)
NNNNNNNNNNNN
___NNNNNN___
jagged_encompassing_rev_overhang (12)
___NNNNNN___
NNNNNNNNNNNN
len_sum: int
property
¶
Length of the forward and reverse mapping strands summed.
longest_strand: str
property
¶
Return the direction of the longest strand.
Can be 'fwd', 'rev', or 'both' if both strands are equally long.
name: str | None
property
¶
Name of the read
rev: Alignment
property
¶
Access the Alignment object of the reverse mapping strand.
rotation_num: int
property
¶
Rotation index of this read
shortest_strand: str
property
¶
Return the direction of the shortest strand.
Can be 'fwd', 'rev', or 'both' if both strands are equally short.
type: str
cached
property
¶
Type of dsDNA molecule
We classify the dsDNA molecule into nine different types based on the location of the overhangs.
Types of dsDNA
- blunt_double: there are no overhangs on either end.
- blunt_fiveprime_fwd_overhang: the reference 5' end is blunt, with a forward strand overhang on the reference 3'
- blunt_fiveprime_rev_overhang: the reference 5' end is blunt, with a reverse strand overhang on the reference 3'
- blunt_threeprime_fwd_overhang: the reference 3' end is blunt, with a forward strand overhang on the reference 5'
- blunt_threeprime_rev_overhang: the reference 3' end is blunt, with a reverse strand overhang on the reference 5'
- jagged_shifted_fiveprime: there are overhangs on both strand 5' ends
- jagged_shifted_threeprime: there are overhangs on both strand 3' ends
- jagged_encompassing_fwd_overhang: both overhangs are on the forward strand
- jagged_encompassing_rev_overhang: both overhangs are on the reverse strand
Note that the naming, we use reference 5'/3' and strand 5'/3' to refer to the ends relative to the reference or to the strand.
Click to expand for visual representations of each type
Ref 5' -> 3'
Fwd 5' -> 3'
Rev 3' <- 5'
blunt_double
NNNNNNNNNNNN
NNNNNNNNNNNN
blunt_fiveprime_fwd_overhang
NNNNNNNNNNNN
NNNNNNNNN___
blunt_fiveprime_rev_overhang
NNNNNNNNN___
NNNNNNNNNNNN
blunt_threeprime_fwd_overhang
NNNNNNNNNNNN
___NNNNNNNNN
blunt_threeprime_rev_overhang
___NNNNNNNNN
NNNNNNNNNNNN
jagged_shifted_fiveprime
NNNNNNNNN___
___NNNNNNNNN
jagged_shifted_threeprime
___NNNNNNNNN
NNNNNNNNN___
jagged_encompassing_fwd_overhang
NNNNNNNNNNNN
___NNNNNN___
jagged_encompassing_rev_overhang
___NNNNNN___
NNNNNNNNNNNN
get_structure_strings() -> Tuple[str, str]
¶
print_structure()
¶
Print the dsDNA sequences, for overhang visualization