剪辑sam/bam文件的读取伙伴中的重叠区域。
clipoverlap的Python项目详细描述
夹子
剪辑sam/bam文件的读取伙伴中的重叠区域。
安装:pip install clipoverlap 或:
git clone git@github.com:innovate-invent/clip.git cd clip python3 setup.py install
运行:
$ clip -h Clip Overlap v1.0 Clip overlapping reads from SAM/BAM/CRAM file Use: clip [-tmabcosv] [input file path | < infile > outfile] [output file path] If no paths are given stdin and stdout are used. -t # Threads to use for processing (Default=1) -m # Maximum template length guaranteeing no read overlap (Default=1000) -a Alternate strand being clipped to avoid strand bias (RAM intensive) -b Trim tails of reads that extend past end of mate. Used to trim barcode remnants. -c Clip only, do not merge clipped region into mate. -o [sbuc] Output format: s=SAM (Default), b=BAM compressed, bu=BAM uncompressed, c=CRAM -s Maintain input order (High depth regions may fill RAM), if not set will output in arbitrary order (Minimal RAM) -v Verbose status output
您可能会注意到,如果您只运行clip而没有参数,那么它只会坐在那里无所事事。 这是因为默认设置是监听stdin输入。
注:
clip至少使用两个子进程,而不考虑-t选项。
-a将在剪断最左侧链的尾部和剪断最右侧链的头部之间交替。 这是为了避免以后在加工管道中可能出现的钢绞线偏差。
如果正在处理已绑定条形码的读取,并在上一步中删除了5'条形码(请参见ProDuSe:trim) 然后使用-b选项删除任何可能的3'条形码序列,如果序列运行到分子的末端,则会附加这些序列。
同时使用-s和-a将强制clip尝试按起始引用坐标排序。 如果输入的是未排序的数据,则可能会耗尽RAM。
合并算法
假设mate read雪茄将1-1与由参考起始位置的差异确定的偏移量对齐。
- 如果-c未设置,则clip将在配对重叠区域的给定位置保留最高质量的基。
- 如果基质量相等,则它将保留与引用不匹配的基。
- 如果基础质量相等,且两个基础都是不同的变体,则质量分数设置为3(3=每个基础的50%概率)。
- 如果对齐雪茄之间的操作不匹配,则保留来自校准成本最低的伴侣的操作。
仅计算重叠区域的对齐成本。 使用这些值来计算成本:
Operation | Value |
---|---|
M, X, =, N | -1 |
I | 6 to start, +1 to lengthen |
D | 3 to start, +1 to lengthen |
待办事项:
计划进行显著的速度和内存优化。 首先需要消除pysam依赖关系。