This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
def delta2paf(): | |
""" | |
Essentially a translation of paftools.js delta2paf | |
https://github.com/lh3/minimap2/tree/master/misc | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import gzip | |
import argparse | |
def main(): | |
message = """ | |
Summarize the rate of edits (insertion, deletion, mismatch) from minimap2 alignments of a query to a target. | |
For each alignment, the rate is defined as the number of edits divided by the alignment length | |
with respect to the query. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import argparse | |
from collections import defaultdict | |
""" | |
This utility converts a SAM file to a nucmer delta file. | |
SAM files must contain an NM tag, which is default in minimap2 alignments. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import re | |
import gzip | |
import argparse | |
from collections import defaultdict | |
class Alignment: | |
def __init__(self, in_r_start, in_r_end, in_q_start, in_q_end, in_cigar, in_strand, in_num_matches, in_aln_len, in_num_mismatches): |