Repository navigation
PySNV v1.0.0 - Release for "PySNV for complex intra-host variation detection" paper
This release corresponds to the version of PySNV described in the paper "PySNV for complex intra-host variation detection" published in Bioinformatics (2024).
About PySNV
PySNV is a Python-based software tool for detecting complex intra-host variation from tNGS data.
Requirements
Ensure you have the following Python libraries installed:
numpypandaspsutilBiohirolascipy
Python Usage
- Download and unzip the project code
- Modify the
running_dirvariable inexample.pyto set the running directory. - Set the sample file(s) and genome file in
example.py. - Run
example.py.
Example Files
example.py: Demonstrates basic usage of the PySNV tool.detect_sample.py: Main function of processing for a single sample.example_multi_files.py: Illustrates how to process multiple input files simultaneously. Paired samples should include '_R1' and '_R2' in the file names. Adjust the number of kernels to use parallel processing.detect_sample.py: Main function of processing for a sample folder.
Note: Before running the examples, make sure to set the necessary parameters in the file.
Bash Usage
Command
python detect_sample.py --sample1 path/to/sample1.fastq --sample2 path/to/sample2.fastq --reference path/to/reference_genome.fa --output output_filename
Parameters
--sample1: Path to single-end sample or first paired-end sample. Fasta, fastq and gz files are supported.--sample2(optional): Path to the second paired-end sample.--reference(required): Path to the reference genome.--output: Output file path and name (default is current working directory, using sample name as output filename).
Additional Parameters
--threshold: Detection Threshold (Default: 0.02)- The recommended detection threshold should be larger than the sequencing error rate.
--kmer_length: Kmer Length (Default: 21)- This parameter specifies the length of k-mers to be considered during the analysis and must be an odd number smaller than 31. Kmer length should be set to ensure no duplicate kmer exists on the genome.
--downsample: Downsample Factor (Default: 1)- Downsampling of sequencing reads could enhance detection speed and reduce RAM usage, which could be used for high-depth sequencing samples.
--error_rate: Sequencing Error Rate (Default: 0.01)- Used to filter out possible false positive detection.
--indel_limit: Maximum Indel Length (Default: 300)- To mitigate false positive indels, especially in the case of challenging long insertions and potential impacts on estimated sequencing depths due to long deletions, a default maximum indel length of 300 is set. The recommended length threshold is 2*average_read_length.
Citation
If you use PySNV in your research, please cite the following paper:
Li, L., Fu, H., Ma, W., & Li, M. (2024). PySNV for complex intra-host variation detection. Bioinformatics, btae116.
Support
For any questions, issues, or feature requests, please open a new issue on the PySNV GitHub repository.
License
PySNV is released under the MIT License.