annotate PsiCLASS-1.0.2/samtools-0.1.19/examples/Makefile @ 0:903fc43d6227 draft default tip

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