Key file related methods¶
-
biscot.Key.
extend_key_dict
(key_dict, reference_maps_dict)[source]¶ Adds the reference id to the key_dict key as a contig can be placed multiple times and we don’t want to modify its key informations erroneously in case of contained alignments
- Parameters
key_dict (dict((int, int), (str, int, int, int))) – Dict containing the correspondance between contigs and contig maps
reference_maps_dict (dict(int, Map)) – Dict containing reference anchor maps
- Returns
Key dict containing the correspondance between contigs and contig maps, with the added information of reference id
- Return type
dict((int, int, int), (str, int, int, int))
-
biscot.Key.
get_max_id
(key_dict)[source]¶ Gets the max id found inside a key_dict keys
- Parameters
key_dict (dict((int, int, int), (str, int, int, int))) – Dict containing the correspondance between contigs and contig maps
- Returns
Maximum value of the key_dict keys
- Return type
int
-
biscot.Key.
parse_key
(key_file_path)[source]¶ Parses a Bionano ‘.key’ file and extracts informations about contigs and their contig map counterparts
- Parameters
key_file_path (str) – Path to a ‘.key’ file
- Returns
Dict containing the correspondance between contigs and contig maps
- Return type
dict((id: int, channel: int), (contig_name: str, start: int, end:int, size: int))