Skip to content

Instantly share code, notes, and snippets.

@bpow
Created March 21, 2013 01:27
Show Gist options
  • Save bpow/5209995 to your computer and use it in GitHub Desktop.
Save bpow/5209995 to your computer and use it in GitHub Desktop.
Makefile for running lumpy-sv
.SECONDARY:
LUMPY:=./lumpy-sv
YAHADB:=./refs/hg19.X11_01_65525S
YAHA:=./yaha
BWA:=./bwa-0.6.2/bin/bwa
BWADB:=./refs/hg19.fa
READ_LENGTH=100
%.um.fq : %.bam
samtools view $< | $(LUMPY)/scripts/split_unmapped_to_fasta.pl -b 20 > $@
%.yaha.sr.bam : %.um.fq
$(YAHA) -x $(YAHADB) -q $< -osh stdout -M 15 -H 2000 -L 11 | samtools view -Sb - > $@
%.sr.bam : %.um.fq
$(BWA) bwasw -H $(BWADB) $< | samtools view -Sb - > $@
%.pe.histo : %.bam
samtools view $< | $(LUMPY)/scripts/pairend_distro.pl -rl $(READ_LENGTH) -X 4 -N 10000 -o $@
%.sr.bedpe : %.sr.bam
$(LUMPY)/bin/lumpy -mw 4 -tt 1e-3 -sr bam_file:$<,back_distance:20,weight:1,id:1,min_mapping_threshold:1 > $@
##########
# FIXME--
# The steps below will not work correctly without properly specifying the insert size mean and stdev
##########
%.pe.bedpe : %.pe.bam %.pe.histo
$(LUMPY)/bin/lumpy -mw 4 -tt 1e-3 -pe bam_file:$*.pe.bam,histo_file:$*.pe.histo,mean:500,stdev:50,read_length:$(READ_LENGTH),min_non_overlap:150,discordant_z:4,back_distance:20,weight:1,id:1,min_mapping_threshold:1 > $@
%.pesr.bedpe : %.pe.bam %.sr.bam %.pe.histo
$(LUMPY)/bin/lumpy -mw 4 -tt 1e-3 -pe bam_file:$*.pe.bam,histo_file:$*.pe.histo,mean:500,stdev:50,read_length:$(READ_LENGTH),min_non_overlap:150,discordant_z:4,back_distance:20,weight:1,id:1,min_mapping_threshold:1 -sr bam_file:$*.sr.bam,back_distance:20,weight:1,id:1,min_mapping_threshold:1 > $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment