Skip to content

Commit c64a6a2

Browse files
jslitjslit
authored andcommitted
write documentation
1 parent f277c40 commit c64a6a2

File tree

37 files changed

+80
-28
lines changed

37 files changed

+80
-28
lines changed
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
100 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
170 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
234 Bytes
Binary file not shown.

.gradle/file-system.probe

0 Bytes
Binary file not shown.

README.md

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,56 @@
11
# bamscope
2-
<img
3-
src="example.png"
4-
alt="Alt text"
5-
style="display: inline-block; margin: 0 auto; max-width: 300px">
2+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/jslfree080/bamscope/blob/main/LICENSE)
3+
4+
<img alt="demonstration" src="https://github.com/jslfree080/jslfree080/blob/main/example2.png" width=550>
5+
6+
A command line tool (in Kotlin/JVM) for visualizing BAM alignments.
7+
8+
## Prerequisites
9+
10+
Bamscope requires **Java 11** or later versions to build and run.
11+
12+
Also, [samtools](https://github.com/samtools/samtools) should be pre-installed to support accessing file formats such as BAM and FASTA.
13+
14+
## Building
15+
16+
* Clone the repo:
17+
```
18+
git clone https://github.com/jslfree080/bamscope.git
19+
cd bamscope/
20+
```
21+
22+
* Build an executable Bamscope jar with all dependencies packaged:
23+
```
24+
./gradlew build
25+
```
26+
27+
## Usage
28+
29+
### Command line
30+
31+
The resulting jar will be in `build/libs`.
32+
33+
```
34+
Usage: java -jar build/libs/bamscope.jar <chrPos> <bamPath> [options]
35+
36+
Parameters:
37+
<chrPos> Input chromosomal position. ex) (chr)N:XXXXXXXX
38+
<bamPath> Path to an indexed bam file. ex) path/to/x.bam
39+
40+
Options:
41+
-f, --format=<format> File format of an output image. default) png
42+
-h, --help Show this help message and exit.
43+
-o, --outPath=<outPath> Path to an output image. default) .
44+
-r, --refPath=<refPath> Path to a reference fasta. ex) path/to/x.fasta
45+
-s, --sPath=<sPath> Path to the samtools. ex) /usr/local/bin/samtools
46+
-w, --width=<width> Width of start to interest position. default) 50
47+
```
48+
49+
* Example usage:
50+
```
51+
java -jar build/libs/bamscope.jar 18:53254446 ~/Downloads/x.bam -r ~/Downloads/x.fasta -o ~/Desktop/
52+
```
53+
54+
## License
55+
56+
Code and documentation released under the [MIT license](https://github.com/jslfree080/bamscope/blob/master/LICENSE).

build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ tasks.withType<Jar> {
7373
// Otherwise you'll get a "No main manifest attribute" error
7474
manifest {
7575
attributes["Main-Class"] = "com.jslfree080.bamscope.RunBAMScopeKt"
76+
archiveFileName.set("bamscope.jar")
7677
}
7778

7879
// To avoid the duplicate handling strategy error
@@ -88,4 +89,4 @@ tasks.withType<Jar> {
8889
}
8990

9091
// ./gradlew build |or| ./gradlew clean build (Delete all the previous version of the dependencies)
91-
// java -jar build/libs/bamscope*.jar 18:53253385 ~/Downloads/*.bam -r ~/Downloads/human_g1k_v37_decoy.fasta -o ~/Desktop/
92+
// java -jar build/libs/bamscope.jar 18:53253385 ~/Downloads/*.bam -r ~/Downloads/human_g1k_v37_decoy.fasta -o ~/Desktop/

0 commit comments

Comments
 (0)