Skip to main content

A package for aligning RNA-seq data without reference biases

Project description

RNA-APoGee

RNA-APoGee (RNA Alignment to Personal Genomes) is a package to align RNA-seq data while minimizing reference biases. It can also be used to align RNA-seq data to haplotype resolved variants. Currently, RNA-APoGee relies on the Olego aligner, although other aligners could be used instead.

Pre-requisites:

  • RNA-APoGee has only been tested on Linux and requires Python 3.
  • Olego must be installed and on your PATH.
  • samtools

Installation

pip install RNA-APoGee

Command line utilities

Alignment involves two steps:

  1. Generating a "personalized" genome that has the variants of the individual embedded into the reference genome.
  2. Aligning against the reference and the personal genome (or against two haplotypes) and then merging the two sets of alignment to pick the best alignment for each read.

Generating a personal genome

create_genomes creates versions of an input FASTA with sample-specific SNVs replacing reference bases.

If you have phased variants, you can create two VCFs corresponding to the variants of each haplotype and then create two versions of the reference by calling create_genomes twice, once for each haplotype (unfortunately currently this script ignores the phasing of the variants.)

create_genomes --fasta FASTA
               --vcf VCF
               --outdir OUTDIR
               [--samples SAMPLES]
               [--min_gq MIN_GQ]
               [--chunk CHUNK]

  --fasta FASTA      FASTA file that will be used as the base for generating
                     personal genomes. For each sample in the input VCF, an
                     individual genome will be created by substituting the
                     sample's SNVs into this base FASTA. SNVs will be
                     considered only if the FILTER field is PASS, and the
                     genotype quality is greater than <min_gq>.

  --vcf VCF          VCF with variant calls. Can have multiple samples.

  --outdir OUTDIR    Personal genome for sample <sample> will be in
                     <outdir>/<sample>.fa

  --samples SAMPLES  (Optional) Comma separated list of samples from the input VCF. If
                     provided, only the personal genomes for these samples
                     will be created, otherwise personal genomes for all
                     samples in the input VCF will be created.

  --min_gq MIN_GQ    (Optional) Minimum genotype quality to consider a variant

  --chunk CHUNK      (Optional) How many bases to keep in memory. Reduce if running OOM.

Aligning against the reference and the personal genome

apogee aligns RNA-seq data to a personalized genome. Each read (or read-pair in case of paired data) is aligned against two FASTAs (correponding to two haplotypes or to a reference with and without an individual's variants). Then for each read (or read-pair) the best alignment across the two FASTAs is chosen. The order in which the two references are given (i.e. which one is specified as ref_fasta and which one is specified as alt_fasta) does not matter. Note that a lot of intermediate files are created. If tmp_dir is specified, all intermediate files will be stored there, with a prefix matching the prefix of the output BAM. In this case, it's up to you to delete that directory. If tmp_dir is not specified a temporary directory will be created, in the same directory as the output BAM and then deleted (so all intermediate files will be lost).

apogee --fq1 FQ1
       --ref_fasta REF_FASTA
       --alt_fasta ALT_FASTA
       --bam BAM
       [--fq2 FQ2]
       [--tmp_dir TMP_DIR]

  --fq1 FQ1              FASTQ file with all reads (for single-end) or read1
                         reads (for paired-end)
  --fq2 FQ2              (Optional) FASTQ file with read2 reads
  --ref_fasta REF_FASTA
                         First FASTA against which to align
  --alt_fasta ALT_FASTA
                         Second FASTA against which to align
  --bam BAM              Output BAM
  --tmp_dir TMP_DIR      (Optional) Directory of intermediate files
  --threads THREADS      (Optional) Number of threads for alignment [1]

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

RNA-APoGee-0.0.10.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

RNA_APoGee-0.0.10-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file RNA-APoGee-0.0.10.tar.gz.

File metadata

  • Download URL: RNA-APoGee-0.0.10.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for RNA-APoGee-0.0.10.tar.gz
Algorithm Hash digest
SHA256 71d2ab29ee95e555eafd33267926a267adb20ac60546af6f9cd674cd44cb84b2
MD5 92eaa53c2d4d7e577073666106f59ad4
BLAKE2b-256 3272f56ddaa5f4d5cc0a2a046e1cdd73fa86d4a7646f7fb0a1f107ace8028b90

See more details on using hashes here.

File details

Details for the file RNA_APoGee-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: RNA_APoGee-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for RNA_APoGee-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 6d79c2e54443246f3addd8938f3aa0c5da26cb69cd6c814d3650d038c2d21723
MD5 6a36d87936e4ecc357feb83390f67e96
BLAKE2b-256 08c93d30d19b5d1e34e1151a71347380dab58f3540e356e25c865ae64a728ac0

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