https://github.com/jslfree080/bamscope
A command line tool (in Kotlin/JVM) for intuitively visualizing BAM alignments. (Currently unmaintained)
https://github.com/jslfree080/bamscope
bam bam-files bioinformatics genomics genomics-visualization samtools vcf
Last synced: 7 months ago
JSON representation
A command line tool (in Kotlin/JVM) for intuitively visualizing BAM alignments. (Currently unmaintained)
- Host: GitHub
- URL: https://github.com/jslfree080/bamscope
- Owner: jslfree080
- License: mit
- Created: 2023-01-22T19:09:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-07T19:30:00.000Z (over 2 years ago)
- Last Synced: 2024-04-16T02:40:31.021Z (about 2 years ago)
- Topics: bam, bam-files, bioinformatics, genomics, genomics-visualization, samtools, vcf
- Language: Java
- Homepage:
- Size: 207 MB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-genome-visualization - bamscope - genome-visualization/bamscope.png) (Alignments)
README
# bamscope

[](https://github.com/jslfree080/bamscope/blob/main/LICENSE)
A command line tool (in Kotlin/JVM) for intuitively visualizing BAM alignments.

## Interpretation of Output Image
The images produced display the alignment of the bases using colored blocks. The opacity of each block reflects the quality score of the base, with blocks valued near 1 displayed for high-quality scores near 40 and those valued near 0 for low-quality scores close to 0. The strandedness of each read's alignment is indicated in both the leftmost and rightmost columns, where '→' indicates a forward strand alignment and '←' indicates a reverse strand alignment.
## Prerequisites
Bamscope requires **Java 11** or later versions to build and run.
Also, [samtools](https://github.com/samtools/samtools) should be pre-installed to support accessing file formats such as BAM and FASTA.
## Building
* Clone the repo:
```
git clone https://github.com/jslfree080/bamscope.git
cd bamscope/
```
* Build an executable Bamscope jar with all dependencies packaged:
```
./gradlew build
```
## Usage
### Command line
The resulting jar will be in `build/libs`.
```
Usage: java -jar build/libs/bamscope.jar [options]
Parameters:
Input chromosomal position ex) (chr)N:XXXXXXXX
or path to a VCF file. or path/to/x.vcf
Path to an indexed BAM file. ex) path/to/x.bam
Options:
-f, --format= File format of an output image. default) png
-h, --help Show this help message and exit.
-o, --outPath= Path to an output image. default) .
-r, --refPath= Path to a reference FASTA. ex) path/to/x.fasta(.fa)
-s, --sPath= Path to the samtools. ex) /usr/local/bin/samtools
-w, --width= Width of start to interest position. default) 50
```
* Example usage for a specific position:
```
java -jar build/libs/bamscope.jar 18:53254446 ~/Downloads/x.bam -r ~/Downloads/x.fasta -o ~/Desktop/
```
* Example usage with VCF file (⚠️ This option may be computationally intensive):
```
java -jar build/libs/bamscope.jar ~/Desktop/x.vcf ~/Downloads/x.bam -r ~/Downloads/x.fasta -o ~/Desktop/
```
## License
Code and documentation released under the [MIT license](https://github.com/jslfree080/bamscope/blob/master/LICENSE).