Skip to main content

Local Reassembly

Local Reassembly is a tool for locally reassembling reads from a mapped BAM file. We have two modes of operation: "assembly" and "haplotype". In "assembly" mode, we use SPAdes to perform de novo assembly of the mapped reads. In "haplotype" mode, we use whatshap to perform haplotype assembly of the mapped reads. The output is a FASTA file containing the assembled contigs.

Installation

Local Reassembly is a Python package that can be installed using pip. To install the package, run the following command:

pip install local_reassembly

We also recommend installing with Docker, please see Dockerfile for more information.

Usage

  • Assembly
usage: reloc reassm [-h] [-o OUTPUT_DIR] [-d] [-m {assembly,haplotype}] [-p] [-a {spades,megahit}] input_genome_file input_bam_file region

Local reassembly

positional arguments:
  input_genome_file     input genome file in FASTA format
  input_bam_file        input BAM file
  region                genomic region in the format chr:start-end

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT_DIR, --output_dir OUTPUT_DIR
                        output directory for the reassembly files
  -d, --debug           debug mode, default False
  -m {assembly,haplotype}, --mode {assembly,haplotype}
                        mode of operation: "assembly" for local assembly, "haplotype" for haplotype reconstruction
  -p, --polish          whether to polish the assembly with Pilon, default False
  -a {spades,megahit}, --assembler {spades,megahit}
                        assembler to use, default is megahit
  • Annotation
usage: reloc reanno [-h] [-o OUTPUT_PREFIX] [-t TMP_WORK_DIR] [-d] local_assem_fasta ref_pt_fasta ref_cDNA_fasta

Local reannotation

positional arguments:
  local_assem_fasta     local assembly FASTA file
  ref_pt_fasta          reference point FASTA file
  ref_cDNA_fasta        reference cDNA FASTA file

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT_PREFIX, --output_prefix OUTPUT_PREFIX
                        output prefix for the reannotation files
  -t TMP_WORK_DIR, --tmp_work_dir TMP_WORK_DIR
                        temporary working directory, default is current directory
  -d, --debug           debug mode, default False
  • Gene pipeline

Build gene database

usage: reloc genedb [-h] [-g GENE_FLANK] [-i INTRON_FLANK] input_genome_file gene_gff_file db_path

Gene database generation

positional arguments:
  input_genome_file     input genome file in FASTA format
  gene_gff_file         gene annotation GFF file
  db_path               output database path

optional arguments:
  -h, --help            show this help message and exit
  -g GENE_FLANK, --gene_flank GENE_FLANK
                        gene flanking region size, default 2000
  -i INTRON_FLANK, --intron_flank INTRON_FLANK
                        intron flanking region size, default 500

run local reassembly and reannotation for a gene

usage: reloc genepipe [-h] [-w WORK_DIR] [-d] [-m ASSEMBLY_MODE] [-a {spades,megahit}] [-p] gene_id genome_file gene_db_path bam_file

Gene pipeline

positional arguments:
  gene_id               gene ID to process
  genome_file           input genome file in FASTA format
  gene_db_path          path to the gene database, should be generated by genedb command
  bam_file              input BAM file

optional arguments:
  -h, --help            show this help message and exit
  -w WORK_DIR, --work_dir WORK_DIR
                        working directory, default is current directory
  -d, --debug           debug mode, default False
  -m ASSEMBLY_MODE, --assembly_mode ASSEMBLY_MODE
                        assembly mode, default is assembly
  -a {spades,megahit}, --assembler {spades,megahit}
                        assembler to use, default is megahit
  -p, --polish          whether to polish the assembly with Pilon, default False

Metadata

Release files for local-reassembly 0.0.7

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

Source distribution (sdist)

Source distribution for local-reassembly 0.0.7
File Size Uploaded Provenance
local_reassembly-0.0.7.tar.gz 20.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for local-reassembly 0.0.7
File Interpreter ABI Platform
local_reassembly-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 40.9 kB

Release files / local_reassembly-0.0.7.tar.gz

Download URL local_reassembly-0.0.7.tar.gz
Size 20.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c9d180be3e0e08cb192094dd9f9813cee8d3779a1dcaa66b9519a065fafab931
BLAKE2b-256 checksum
How to use checksums
c0eaaa99b0a6f05a2ef693a51af4477ff5399f8fa04033ecff3512086abde084
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release files / local_reassembly-0.0.7-py3-none-any.whl

Download URL local_reassembly-0.0.7-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9f85c1868e72743f01a6e1d5bc43b10aa569fe22834ab37c485f1fd67080d9c
BLAKE2b-256 checksum
How to use checksums
2b3b7e0571ae133cf301113b7908c12ef717fcfc11f75afd9171f2cc178bcc0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Security for local-reassembly 0.0.7

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