Skip to content

mendezg/bamsnap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BamSnap (Fork)

BamSnap: A lightweight command-line visualization tool for sequencing reads in BAM files.

This is a fork of the original BamSnap tool developed by the Park Lab.


About This Fork

This fork was created to address specific issues with the original BamSnap tool when working with short reference sequences and to update the codebase for compatibility with newer versions of the Pillow library (version 10 and above).

Why Fork?

  • Handling Short References: The original BamSnap encountered errors when processing BAM files aligned to small reference sequences (e.g., viral genomes, small plasmids). This fork implements fixes to allow BamSnap to handle short reference sequences gracefully without errors.

  • Compatibility with Pillow 10+: The original code used methods from the Pillow library that have been deprecated or removed in version 10 and above. This fork updates the code to be compatible with Pillow 10+, ensuring continued functionality with the latest versions of the library.

Changes Made

  • Bounds Checking for Short References: Implemented bounds checking and position adjustments throughout the code to ensure genomic positions stay within valid ranges of the reference sequence.

  • Updated Pillow Method Calls: Replaced deprecated methods such as getsize() with their modern equivalents like getbbox() to maintain compatibility with Pillow 10+.

  • Code Refactoring: Minor refactoring and cleanup to improve code readability and maintainability.


Installation

Prerequisites

Install from GitHub

Clone this forked repository and install BamSnap:

*bash*
git clone https://github.com/mendezg/bamsnap.git
cd bamsnap
pip install -e .
*/bash*

Note on Installation

This fork is not currently available via PyPI. Please install it directly from this repository using the instructions above.


Usage

Simple Usage

*bash*
bamsnap -bam test.bam -pos 1:7364529 -out test.png
*/bash*

For more details, refer to the BamSnap Documentation.

Note: The documentation refers to the original BamSnap. While most functionalities remain the same, some details may differ due to the changes in this fork.


Example Use Case

Note: These resources are from the original BamSnap and are provided for reference.


License

BamSnap is licensed under the MIT License. See the LICENSE file for details.


Acknowledgments

This fork is based on the original BamSnap tool developed by the Park Lab. We thank the original authors for their work and contributions to the bioinformatics community.


Contact

For questions or comments about this fork, please contact mendezg.


Contributing

Contributions to improve this fork are welcome. Please submit pull requests or open issues on GitHub.


Changelog

Version 0.3.0 (Fork)

  • Fixed: Issues with processing BAM files aligned to short reference sequences.
  • Updated: Codebase for compatibility with Pillow 10+.
  • Improved: Code readability and maintainability.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 53.0%
  • Python 46.5%
  • Other 0.5%