Skip to main content

Assemble contigs into a chromosome-scalse pseudo-assembly using alignments to a reference sequence.

Project description

GPatch

Assemble contigs into a chromosome-scalse pseudo-assembly using alignments to a reference sequence.

Starting with alignments of contigs to a reference genome, produce a chromosome-scale pseudoassembly by patching gaps between mapped contigs with sequences from the reference.

Dependencies

We recommend using minimap2 for alignment, using the -a option to generate SAM output.

Installation

We recommend installing with conda, into a new environment:

conda create -n GPatch -c conda-forge -c bioconda Bio pysam minimap2 samtools GPatch

Install with pip:

pip install GPatch

Installation from the github repository is not recommended. However, if you must, follow the steps below:

  1. git clone https://github.com/adadiehl/GPatch
  2. cd GPatch/
  3. python3 -m pip install -e .

Usage

usage: GPatch [-h] -q SAM/BAM -r FASTA [-x BED] [-b FILENAME] [-m N]
                       [-d N] [-f FLOAT] [-e FLOAT]

Starting with alignments of contigs to a reference genome, produce a chromosome-scale pseudoassembly by patching gaps between mapped contigs with sequences from the reference. Reference chromosomes with no mapped contigs are printed to output unchanged.

Required Arguments

Argument Description
-q SAM/BAM, --query_bam SAM/BAM Path to SAM/BAM file containing non-overlapping contig mappings to the reference genome.
-r FASTA, --reference_fasta FASTA Path to reference genome fasta.

Optional Arguments:

Argument Description
-h, --help Show this help message and exit.
-x STR, --prefix STR Prefix to add to output file names. Default=None
-b FILENAME, --store_final_bam FILENAME Store the final set of primary contig alignments to the given file name. Default: Do not store the final BAM.
-m N, --min_qual_score N Minimum mapping quality score to retain an alignment. Default=30

Output

GPatch produces three output files:

File Description
patched.fasta The final patched genome.
contigs.bed Location of contigs in the coordinate frame of the patched genome.
patches.bed Location of patches in the coordinate frame of the reference genome.

Citing GPatch

Please use the following citation if you use this software in your work:

CITATION_HERE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

GPatch-0.3.4.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

GPatch-0.3.4-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file GPatch-0.3.4.tar.gz.

File metadata

  • Download URL: GPatch-0.3.4.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.4

File hashes

Hashes for GPatch-0.3.4.tar.gz
Algorithm Hash digest
SHA256 243b63181500dabdc4934cb2433e13448f710fff2211e28af46ca365ca418c5a
MD5 b813387730b8c678d680b83845243b7d
BLAKE2b-256 a4d139b708bad75e79c873b3eba4fc8c73d92e614efb43bc42974c3d27379433

See more details on using hashes here.

File details

Details for the file GPatch-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: GPatch-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.4

File hashes

Hashes for GPatch-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 24a64864ccd818907a716f757446568274f7c168b4663e0aeefe80d3f3fa9255
MD5 5219fe338870f6b77dc372cc33941895
BLAKE2b-256 085c3d97f05cfcdc77120d3532e0cd95595086ad908a261aac0c7af3ebb7c083

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page