annotate pyPRADA_1.2/tools/samtools-0.1.16/examples/Makefile @ 3:f17965495ec9 draft default tip

Uploaded
author siyuan
date Tue, 11 Mar 2014 12:14:01 -0400
parents acc2ca1a3ba4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
1 all:../libbam.a ../samtools ../bcftools/bcftools \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
2 ex1.glf ex1.pileup.gz ex1.bam.bai ex1f-rmduppe.bam ex1f-rmdupse.bam ex1.glfview.gz ex1.bcf calDepth
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
3 @echo; echo \# You can now launch the viewer with: \'samtools tview ex1.bam ex1.fa\'; echo;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
4
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
5 ex1.fa.fai:ex1.fa
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
6 ../samtools faidx ex1.fa
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
7 ex1.bam:ex1.sam.gz ex1.fa.fai
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
8 ../samtools import ex1.fa.fai ex1.sam.gz ex1.bam
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
9 ex1.bam.bai:ex1.bam
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
10 ../samtools index ex1.bam
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
11 ex1.pileup.gz:ex1.bam ex1.fa
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
12 ../samtools pileup -cf ex1.fa ex1.bam | gzip > ex1.pileup.gz
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
13 ex1.glf:ex1.bam ex1.fa
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
14 ../samtools pileup -gf ex1.fa ex1.bam > ex1.glf
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
15 ex1.glfview.gz:ex1.glf
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
16 ../samtools glfview ex1.glf | gzip > ex1.glfview.gz
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
17 ex1a.bam:ex1.bam
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
18 ../samtools view -h ex1.bam | awk 'BEGIN{FS=OFS="\t"}{if(/^@/)print;else{$$1=$$1"a";print}}' | ../samtools view -bS - > $@
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
19 ex1b.bam:ex1.bam
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
20 ../samtools view -h ex1.bam | awk 'BEGIN{FS=OFS="\t"}{if(/^@/)print;else{$$1=$$1"b";print}}' | ../samtools view -bS - > $@
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
21 ex1f.rg:
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
22 (echo "@RG ID:ex1 LB:ex1 SM:ex1"; echo "@RG ID:ex1a LB:ex1 SM:ex1"; echo "@RG ID:ex1b LB:ex1b SM:ex1b") > $@
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
23 ex1f.bam:ex1.bam ex1a.bam ex1b.bam ex1f.rg
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
24 ../samtools merge -rh ex1f.rg $@ ex1.bam ex1a.bam ex1b.bam
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
25 ex1f-rmduppe.bam:ex1f.bam
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
26 ../samtools rmdup ex1f.bam $@
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
27 ex1f-rmdupse.bam:ex1f.bam
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
28 ../samtools rmdup -S ex1f.bam $@
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
29
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
30 ex1.bcf:ex1.bam ex1.fa.fai
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
31 ../samtools mpileup -gf ex1.fa ex1.bam > $@
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
32
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
33 ../bcftools/bcftools:
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
34 (cd ../bcftools; make bcftools)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
35
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
36 ../samtools:
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
37 (cd ..; make samtools)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
38
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
39 ../libbam.a:
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
40 (cd ..; make libbam.a)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
41
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
42 calDepth:../libbam.a calDepth.c
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
43 gcc -g -Wall -O2 -I.. calDepth.c -o $@ -L.. -lbam -lm -lz
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
44
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
45 clean:
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
46 rm -fr *.bam *.bai *.glf* *.fai *.pileup* *~ calDepth *.dSYM ex1*.rg ex1.bcf
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
47
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
48 # ../samtools pileup ex1.bam|perl -ape '$_=$F[4];s/(\d+)(??{".{$1}"})|\^.//g;@_=(tr/A-Z//,tr/a-z//);$_=join("\t",@F[0,1],@_)."\n"'
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
49
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
50 # ../samtools pileup -cf ex1.fa ex1.bam|perl -ape '$_=$F[8];s/\^.//g;s/(\d+)(??{".{$1}"})|\^.//g;@_=(tr/A-Za-z//,tr/,.//);$_=join("\t",@F[0,1],@_)."\n"'