### Execute Genotyping with Input List Source: https://context7.com/tprodanov/locityper/llms.txt Runs the genotyping command using a pre-configured input list file. ```bash # Use input list locityper genotype \ -I input_list.txt \ -p preproc_output \ -d database_dir \ -o genotype_output ``` -------------------------------- ### Preprocess WGS Data with Locityper Preproc Source: https://context7.com/tprodanov/locityper/llms.txt The 'preproc' command preprocesses WGS data to estimate background distributions. It supports FASTQ files (paired-end or single-end), indexed BAM files, and PacBio HiFi reads. A jellyfish counts file is required. ```bash locityper preproc \ -i reads_1.fq.gz reads_2.fq.gz \ -r reference.fa \ -j jellyfish_counts.jf \ -o preproc_output ``` ```bash locityper preproc \ -a aligned.bam \ -r reference.fa \ -j jellyfish_counts.jf \ -o preproc_output ``` ```bash locityper preproc \ -i hifi_reads.fq.gz \ -r reference.fa \ -j jellyfish_counts.jf \ -t hifi \ -o preproc_output ``` ```bash locityper preproc \ -i reads_1.fq.gz reads_2.fq.gz \ -~ similar_preproc_dir \ -r reference.fa \ -j jellyfish_counts.jf \ -o preproc_output ``` -------------------------------- ### Configure Sequencing Technology Source: https://context7.com/tprodanov/locityper/llms.txt Sets technology-specific parameters for preprocessing and genotyping workflows. ```bash # Illumina short reads (default) locityper preproc -t illumina ... locityper genotype ... # Automatically detected from preproc # PacBio HiFi locityper preproc -t hifi ... # PacBio CLR locityper preproc -t pacbio ... # Oxford Nanopore locityper preproc -t ont ... ``` -------------------------------- ### Configure Input List File Source: https://context7.com/tprodanov/locityper/llms.txt Defines the format for batch processing input files, supporting various read types and alignment formats. ```text # Example input list file (input_list.txt) # Format: [] # Paired-end reads (two files) p sample_R1.fq.gz sample_R2.fq.gz # Paired-end reads (pattern with asterisk) p sample_R*.fq.gz # Paired-end interleaved pi sample_interleaved.fq.gz # Single-end reads s sample.fq.gz # Indexed alignment file a sample.bam sample.bam.bai # Unindexed BAM/CRAM u sample.bam # Unindexed interleaved BAM ui sample.bam ``` -------------------------------- ### Add Loci to Database with Locityper Target Source: https://context7.com/tprodanov/locityper/llms.txt Use the 'target' command to create a database for target loci. It can process a single locus from a VCF pangenome or multiple loci from a BED file. Ensure you have reference FASTA and jellyfish counts. ```bash locityper target \ -d database_dir \ -r reference.fa \ -j jellyfish_counts.jf \ -v pangenome.vcf.gz \ -l HLA-A chr6:29941260-29945884 ``` ```bash locityper target \ -d database_dir \ -r reference.fa \ -j jellyfish_counts.jf \ -L loci.bed ``` ```bash # BED file format (when no VCF provided): # chr6 29941260 29945884 HLA-A /path/to/HLA-A_haplotypes.fa ``` -------------------------------- ### Recruit Reads to Loci with Locityper Recruit Source: https://context7.com/tprodanov/locityper/llms.txt The 'recruit' command extracts reads mapping to specified loci. It supports FASTQ or BAM input, target sequences (FASTA), and can use pattern matching for multiple loci or target regions from a BED file. A jellyfish counts file is required. ```bash locityper recruit \ -i reads_1.fq.gz reads_2.fq.gz \ -s target_sequences.fa \ -j jellyfish_counts.jf \ -o recruited_reads.fq ``` ```bash locityper recruit \ -i reads_1.fq.gz reads_2.fq.gz \ -s "loci/{}/sequences.fa" \ -j jellyfish_counts.jf \ -o "output/{}.fq" ``` ```bash locityper recruit \ -a aligned.bam aligned.bam.bai \ -s target_sequences.fa \ -j jellyfish_counts.jf \ -R target_regions.bed \ -o recruited_reads.fq ``` ```bash locityper recruit \ -i hifi_reads.fq.gz \ -s target_sequences.fa \ -j jellyfish_counts.jf \ -x hifi \ -o recruited_reads.fq ``` -------------------------------- ### Genotype Target Loci with Locityper Genotype Source: https://context7.com/tprodanov/locityper/llms.txt Use the 'genotype' command to genotype complex loci. It requires preprocessed data ('-p'), a database ('-d'), and input reads (FASTQ or BAM). Options include specifying multiple databases, subsetting loci, and custom parameters. ```bash locityper genotype \ -i reads_1.fq.gz reads_2.fq.gz \ -p preproc_output \ -d database_dir \ -o genotype_output ``` ```bash locityper genotype \ -a aligned.bam \ -p preproc_output \ -d database_dir \ -o genotype_output ``` ```bash locityper genotype \ -i reads_1.fq.gz reads_2.fq.gz \ -p preproc_output \ -d database1 database2 \ --subset-loci HLA-A HLA-B HLA-C \ -o genotype_output ``` ```bash locityper genotype \ -i reads_1.fq.gz reads_2.fq.gz \ -p preproc_output \ -d database_dir \ -P 2 \ --threads 16 \ --seed 42 \ -o genotype_output ``` -------------------------------- ### Prune Similar Haplotypes with Locityper Prune Source: https://context7.com/tprodanov/locityper/llms.txt Use the 'prune' command to remove redundant haplotypes from a database. You can specify a divergence threshold, a target number of clusters, or generate only a phylogenetic tree without pruning. ```bash locityper prune \ -i input_database \ -o pruned_database ``` ```bash locityper prune \ -i input_database \ -o pruned_database \ -t 0.001 ``` ```bash locityper prune \ -i input_database \ -o pruned_database \ --n-clusters 50 ``` ```bash locityper prune \ -i input_database \ --only-tree ``` -------------------------------- ### Genotyping Output Directory Structure Source: https://context7.com/tprodanov/locityper/llms.txt Visual representation of the directory hierarchy generated by the genotyping process. ```text genotype_output/ ├── loci/ │ ├── HLA-A/ │ │ ├── res.json.gz # Genotyping results with probabilities │ │ ├── aln.bam # Read alignments to haplotypes │ │ └── _success # Success marker │ ├── HLA-B/ │ │ └── ... │ └── ... └── ... ``` -------------------------------- ### Convert PAF Alignments to VCF Source: https://context7.com/tprodanov/locityper/llms.txt Translates PAF alignment files into multiple VCF files for downstream analysis. ```bash # Convert PAF to VCF locityper paf-vcf \ -i alignments.paf \ -r reference.fa \ -o output_vcfs/ ``` -------------------------------- ### Align Haplotype Sequences Source: https://context7.com/tprodanov/locityper/llms.txt Aligns medium-size sequences to compute pairwise divergences. Requires the align feature to be enabled. ```bash # Align haplotype sequences (requires align feature) locityper align \ -i haplotypes.fa \ -o alignments.paf.gz ``` -------------------------------- ### Genotyping Result JSON Schema Source: https://context7.com/tprodanov/locityper/llms.txt The structure of the JSON output file containing genotyping results, probabilities, and statistics. ```json { "locus": "HLA-A", "genotypes": [ { "haplotypes": ["HLA-A*01:01:01:01", "HLA-A*02:01:01:01"], "probability": 0.9876, "log_likelihood": -1234.56 } ], "warnings": [], "stats": { "total_reads": 1500, "recruited_reads": 1200, "mapped_reads": 1150 } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.