Skip to content

Instantly share code, notes, and snippets.

@seandavi
seandavi / bamsplit.py
Created March 11, 2012 01:58
Split a BAM file by Read Group ID
#!/usr/bin/env python
# split a bam file by read group ID
# Sean Davis <[email protected]>
# March 10, 2012
#
import pysam
import argparse
import logging
logging.basicConfig(level=logging.INFO)
@mdshw5
mdshw5 / Snakefile
Created April 14, 2019 22:04
IGV headless screenshots
rule screenshot_config:
input: bam="{dataset}.sort.bam", bai="{dataset}.sort.bam.bai", calls="{dataset}.calls"
output: batch="{dataset}.igv.batch"
params: runtime="600", memory="1G", filename="{dataset}.alignments.png"
run:
import os.path
batch_template = """load {bam}
preference SAM.SHOW_CENTER_LINE false
snapshotDirectory {directory}
genome hg38