Skip to main content

Microsplit

Microsplit is a command-line tool designed for processing Micro-C data by identifying and managing chimeric reads in BAM files. It follows the logic and structure of the Parasplit tool but is tailored for Micro-C data. The tool reads alignment files (SAM, BAM, or CRAM) using pysam and identifies events of soft-clipping or hard-clipping. The identified clipping points are treated as restriction sites to generate new pairs of sequences.

Features

  • Parallel Processing: Microsplit utilizes parallel processing to enhance performance and efficiency.
  • Soft-Clipping and Hard-Clipping Detection: It detects soft-clipping ('S') and hard-clipping ('H') in CIGAR strings to identify chimeric reads.
  • Fragment Generation: Generates new fragments by considering the identified clipping points as restriction sites.
  • Error Margin Handling: Adds a fixed number of base pairs to new fragments to account for potential over-mapping by Bowtie2, ensuring more accurate downstream analysis.
  • Output Paired Reads: Outputs both end-to-end aligned pairs and newly generated fragment pairs.

Installation

Microsplit is available on PyPI and can be installed using pip:

pip install microsplit

Usage

Before using Microsplit, you need to perform an initial alignment of reads using Bowtie2 with the --local-very-sensitive mode and the -xeq option to obtain explicit CIGAR strings. Below is an example of how to use Microsplit from the command line:

microsplit --bam_for_file path/to/forward.bam \
           --bam_rev_file path/to/reverse.bam \
           --output_forward path/to/output_forward.fastq.gz \
           --output_reverse path/to/output_reverse.fastq.gz \
           --num_threads 8 \
           --seed_size 20 \
           --length_added 10

Command-Line Arguments

  • --bam_for_file: Path to the forward BAM file.
  • --bam_rev_file: Path to the reverse BAM file.
  • --output_forward: Path to the output forward FastQ file.
  • --output_reverse: Path to the output reverse FastQ file.
  • --num_threads: Total number of threads for parallel processing.
  • --seed_size: Minimum size of a fragment to be generated.
  • --length_added: Number of base pairs added to the new fragment after soft clipping to account for potential over-mapping by Bowtie2.

Methodology

Microsplit processes Micro-C data by:

  1. Reading BAM Files: Reads the forward and reverse BAM files simultaneously.
  2. Identifying Clipping Events: Identifies soft-clipping and hard-clipping events from the CIGAR strings in the BAM files.
  3. Generating Fragments: Uses the clipping points as restriction sites to generate new fragments, adding a fixed number of base pairs (length_added) to account for potential over-mapping by Bowtie2.
  4. Outputting Paired Reads: Outputs both end-to-end aligned pairs and the newly generated fragment pairs.

The length added to new fragments helps to handle potential misalignments due to Bowtie2's tendency to over-map reads and not soft-clip enough, ensuring more accurate results.

License

Microsplit is released under the AGPLv3 license. The code is freely available on Gitbio.

Contributing

We welcome contributions! If you'd like to contribute, please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.

Contact

For any questions or issues, please contact samir.bertache.djenadi@gmail.com

Thank you for using Microsplit!

Metadata

Release files for microsplit 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for microsplit 1.1.0
File Size Uploaded Provenance Actions
microsplit-1.1.0.tar.gz 34.2 kB Without provenance Details for microsplit-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for microsplit 1.1.0
File Interpreter ABI Platform Actions
microsplit-1.1.0-py3-none-any.whl Python 3 none any Details for microsplit-1.1.0-py3-none-any.whl

Total release size: 65.0 kB

Release files / microsplit-1.1.0.tar.gz

Download URL microsplit-1.1.0.tar.gz
Size 34.2 kB
Tags Source
SHA-256 checksum
How to use checksums
828943c0bdd7d38ed19375fdba87a00435c1025fb65c4adf0126e1eba439822f
BLAKE2b-256 checksum
How to use checksums
bbf44cf9677b107461eb9cffbd6e66d4506c5c70a8071bfd8855bc2434305b21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / microsplit-1.1.0-py3-none-any.whl

Download URL microsplit-1.1.0-py3-none-any.whl
Size 30.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b81626babbe53288882c8240719b0819852dad27db665f9a4f4306b2418d2a3f
BLAKE2b-256 checksum
How to use checksums
537c4ed663d352fb7018f8842da6ce5fcd1d78a97343c55145d9e2dd3c08f0aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Security for microsplit 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page