-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_example.sh
More file actions
executable file
·137 lines (118 loc) · 3.03 KB
/
Copy pathrun_example.sh
File metadata and controls
executable file
·137 lines (118 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#!/bin/bash
# test script - product different format output using example file
#####
CHROM="chrM"
START=1000
END=3000
BAM="example/sim.mapping.sort.bam"
FASTA="example/chm13v2.chrM.fasta"
echo "测试 Bamsnap-LRS 输出功能..."
echo "使用文件: $BAM"
echo "参考序列: $FASTA"
echo "区域: ${CHROM}:${START}-${END}"
echo ""
# SVG
echo "1. single pos, output SVG"
python bin/bamsnap-lrs dna \
--bam "$BAM" \
--pos "${CHROM}:1-10000" \
--out example/chrM_1_10000.bamsnapLRS.svg \
--fa "$FASTA" \
-g example/chrM.mitos2.gff \
--show-axis \
--show-coverage \
--track-title "Test Reads - SVG" \
--width 1500
if [ $? -eq 0 ]; then
echo "✓ SVG output success: example/chrM_1000_3000.bamsnapLRS.svg"
else
echo "✗ SVG output failed"
fi
# PDF
echo "2. single pos, output PDF"
python bin/bamsnap-lrs dna \
--bam "$BAM" \
--pos "${CHROM}:${START}-${END}" \
--out example/chrM_1000_3000.bamsnapLRS.pdf \
--fa "$FASTA" \
--bed example/chrM.annot.bed \
--show-axis \
--show-coverage \
--track-title "Test Reads - PDF" \
--width 1500 \
--detail high
if [ $? -eq 0 ]; then
echo "✓ PDF output success: example/chrM_1000_3000.bamsnapLRS.pdf"
else
echo "✗ PDF output failed"
fi
#region.bed
# PDF
echo "2.1, multiple pos, output PDF"
python bin/bamsnap-lrs dna \
--bam "$BAM" \
--regions example/region.bed \
--out-prefix example/batch \
--fa "$FASTA" \
--bed example/chrM.annot.bed \
--show-axis \
--show-coverage \
--track-title "Test Reads - PDF" \
--width 1500 \
--detail high
if [ $? -eq 0 ]; then
echo "✓ PDF output success: example/batch_*"
else
echo "✗ PDF output failed"
fi
# PDF
echo "3. Multiple Bam..."
python bin/bamsnap-lrs dna \
--bam "$BAM" \
--bam "$BAM" \
--pos "${CHROM}:${START}-${END}" \
--out example/chrM_1000_3000.double.bamsnapLRS.pdf \
--fa "$FASTA" \
--show-axis \
--show-coverage \
--track-title "Test Reads - PDF" \
--width 1500
if [ $? -eq 0 ]; then
echo "✓ PDF output success: example/chrM_1000_3000.double.bamsnapLRS.pdf"
else
echo "✗ PDF output failed"
fi
# RNA
echo "4. RNA 比对可视化..."
python bin/bamsnap-lrs rna \
--bam example/rna/test.rna.bam \
--pos Cdec_SDR_X:200000-300000 \
--out example/rna/test.rna.svg \
--fa example/rna/ref.fasta \
--show-axis \
--width 4000
if [ $? -eq 0 ]; then
echo "✓ SVG output success: example/rna/testbam.look/output.svg"
else
echo "✗ SVG output failed"
fi
python bin/bamsnap-lrs dna \
--bam "$BAM" \
--pos "${CHROM}:${START}-${END}" \
--out example/chrM_1000_3000.gff.bamsnapLRS.pdf \
--fa "$FASTA" \
--show-axis \
--show-coverage \
--track-title "Test Reads - PDF" \
--width 1500 \
-g example/test.gff
python bin/bamsnap-lrs dna \
--bam "$BAM" \
--pos "${CHROM}:${START}-${END}" \
--out example/chrM_1000_3000.gff.bamsnapLRS.svg \
--fa "$FASTA" \
--show-axis \
--show-coverage \
--track-title "Test Reads - SVG" \
--width 1500 \
-g example/test.gff