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.0.tar.gz (5.5 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.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: GPatch-0.3.0.tar.gz
  • Upload date:
  • Size: 5.5 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.0.tar.gz
Algorithm Hash digest
SHA256 512eff3702a2cbfb01b03a8b195b44562f74cd6203b769dd08095f6bc3741b8f
MD5 a2705b848157b377f37122634a0ef67d
BLAKE2b-256 b99e921228555747155c9f1e174589dfca5c10aadfcb3c74b30b9823c8e7c89e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: GPatch-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9caa2ba53a87095c411b6ce0a298de0559764f8e59f2afbbedd306396aad8e2f
MD5 8146caa70ca467287d4ae7c3ef6780b0
BLAKE2b-256 e1b5d0991ce4f2efde7a82eb2dbf66690872a7a14af0340f1ff755ba54b47662

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