Skip to main content

Filters .gtf file of suspected HIV isoforms and confirms the isoform identities

Project description

HIV Isoform Checker

Overview

This package is a module in the APHIX pipeline. HIV_Isoform_Checker takes a .gtf file of preliminarily filtered HIV transcripts and filters them to include only correctly assigned transcripts using the following filters. It also calculates the usage counts and percentages for each isoform type, donor site, acceptor site, and pairwise splice site combination.

  • FILTER 1: only include class codes =, J, and m
  • FILTER 2: only include samples with end values >= min_end_bp and start values <= max_start_bp
  • FILTER 3: get rid of any samples with read errors/small gaps
  • FILTER 4: keep only correct Env samples
  • FILTER 5: keep only correct Nef samples(long samples added to possible_misassigned)
  • FILTER 6: keep only correct Rev samples(long samples added to possible_misassigned)
  • FILTER 7: keep only correct Tat samples(long samples added to possible_misassigned)
  • FILTER 8: keep only correct Vif samples
  • FILTER 9: keep only correct Vpr samples
  • FILTER 10: check possible_misassigned for fully spliced then partial splice compatibility (tat -> rev -> nef - > vif -> vpr -> unspliced_tat -> env)

Note: This code currently relies on a very specific setup of the gtf file to work properly. The note must be in the order designated in the []. transcript entry = ref genome, analysis_pathway, transcript, start, end, ".", "+", ".", [transcript id; gene id; gene_name; xloc; ref_gene_id; contained_in; cmp_ref; class_code; tss_id] exon entry = ref genome, analysis_pathway, exon, start, end, ".", "+", ".", [transcript id; gene id; exon number]


Installation

Quick Install

pip install HIV_Isoform_Checker

Manual Install

git clone https://github.com/JessicaA2019/HIV_Isoform_Checker.git 
cd HIV_Isoform_Checker
python setup.py install

Dependencies

Some dependencies currently do not install with Chimera_Buster. Please pip install the following dependencies:

  • mappy
  • regex
  • argparse

Testing

To test if the installation was successful run the following command with the test files provided:

HIV_Isoform_Checker HIC_test.gtf HIV_Isoform_Checker_test NL43.fa

Usage

HIV Isoform Checker [options] input_file_name output_file_prefix ref_file

Inputs

To run the pipeline the following input files are required:

Input Description
input_file_name Designates .gtf to be filtered. This is required.
output_file_prefix Designates output file prefix. This is required.
ref_file The location of the reference genome fasta file.

The following input files are optional:

Arguement Function
-h, --help Prints help message to terminal.
-g value, --gap value Sets gap tolerance. If a read has a gap longer than this value that is not associated with known splice sites, the read will be filtered out as a sequencing error. The default value is 15.
-a value, --startBP value Sets maximum starting bp in order to insure the presence of the first exon and by proxy a full read. Default is 700.
-z value, --endBP value Sets minimum ending bp in order to insure the presence of the last exon and by proxy a full read. Default is 9500.
-l value, --lengthFS value Sets maximum fully spliced transcript length. If a read is longer than this value, then it will be considered partial spliced. This is based off HIV-1 references without any major insertions or deletions. If your sequences have larger deletions (ex: deltaENV or deltaMA) or insertions (ex: multiple markers such as eGFP), this value may need to be adjusted. Default is 2500.
-n value, --NCE value When set to True, the output csv file will have y/n columns for the precence of NCEs. Default is False.

Outputs

The main output files created by the pipeline are:

Output Description
{output_file_prefix}.csv A csv containing the sample ID, cluster size, isoform ID, starting and ending base pair, gffcompare class code, exon boundaries, coverage length, size normalized counts, precence of NCEs (optional), and any additional notes for each sample.
{output_file_prefix}_altered.txt A list of all sample IDs with altered exons to fill in small gaps.
{output_file_prefix}_pass.txt A list of all sample IDs that passed all filters.
{output_file_prefix}_fail.txt A list of all sample IDs that failed one or more filters.
{output_file_prefix}_isoform_counts.csv A csv of the usage counts and percentages for each isoform type.
{output_file_prefix}_splice_site_usage.csv A csv of the the usage counts and percentages for each donor site, acceptor site, and pairwise splice site combination.
{output_file_prefix}_ref_coordinates.txt A list of splice site and CDS coordinates for given reference.
{output_file_prefix}.log A log of the arguments given to the script.

Help

For issues or bugs, please report them on the issues page.

License

MIT - Copyright (c) 2024 Jessica Lauren Albert

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

hiv_isoform_checker-1.1.8.4.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

HIV_Isoform_Checker-1.1.8.4-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file hiv_isoform_checker-1.1.8.4.tar.gz.

File metadata

  • Download URL: hiv_isoform_checker-1.1.8.4.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for hiv_isoform_checker-1.1.8.4.tar.gz
Algorithm Hash digest
SHA256 d8f7e7a89dc0562d7dc5477e45b727f5d1a1304120c4dc69511ea1cfa504f55a
MD5 e3e8f14525ccc8b39070481610d6f59b
BLAKE2b-256 9675df522f172c79da2a8c2821bed24b557672efd52a426fb903ace69b286765

See more details on using hashes here.

File details

Details for the file HIV_Isoform_Checker-1.1.8.4-py3-none-any.whl.

File metadata

File hashes

Hashes for HIV_Isoform_Checker-1.1.8.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f4efbf384764f0b4745d148c5cf4d3664995a52580d04901fc9bc3d03fd5feb8
MD5 3548415e051e312a42bfdd69c9bda3b2
BLAKE2b-256 25776dfcc0ba3b34b0b6c68d4e0ad57f8620046da47180ba62d5bf20aa95c0b2

See more details on using hashes here.

Supported by

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