Locityper implements quick read recruitment to one or multiple target loci.
This ability can be utilized independently using a flexible locityper recruit module.
If you want to recruit reads for one locus (multiple locus haplotypes allowed), please use the following command
locityper recruit -i/-a/-I input -s targets.fa -o recruited.fastqFor paired-end reads, output reads will be interleaved, however, most tools can process interleaved reads. Additionally, you can split the file into two:
awk '(NR - 1) % 8 < 4' recruited.fastq > recruited.1.fastq
awk '(NR - 1) % 8 >= 4' recruited.fastq > recruited.2.fastqAdditional arguments
By default, all (k,w)-minimizers from input haplotypes are collected.
Then, reads with appropriate number of matches are recruited.
Minimizer size and match fraction are controlled by -m and -M arguments, but can be specified using
preset argument (-x) based on your sequencing technology.
Note that preset overrides -m, -M and -c values, if they were set before it.
Input minimizers are not filtered by default. However, you can either manually mask them with Ns in the input haplotypes,
or provide Jellyfish counts file using -j argument.
Then, all k-mers that appear too many times (-t) across the genome, are automatically masked.
Finally, if you recruit reads from a mapped BAM/CRAM file, consider providing regions file (-R) to speed up read recruitment.
Then, only reads with primary alignments to these regions are recruited, as well as reads from alternative contigs (--alt-contig)
and unmapped reads.
Multiple loci
Suppose, there are target haplotypes in target/gene1.fa, target/gene2.fa and target/gene3.fa
and you want to put recruited reads to output/*.fastq. Then, please run
locityper recruit -i/-a/-I input -s target/{}.fa -o output/{}.fastqThen, all possible target/*.fa files will be found and processed.
Recruited read filenames will mirror loci names, for example reads,
recruited to gene1, will be placed to output/gene1.fastq.
If you have one input FASTA file, but still want to recruit reads to multiple loci, you can use -S argument:
locityper recruit -i/-a/-I input -S multi_targets.fa -o output/{}.fastqSequence names in multi_targets.fa must follow format locus*anything_else, where locus can be repeated multiple times.
Finally, you can provide a two column file of input FASTA and output FASTQ files with
locityper recruit -i/-a/-I input -l listSince v1.2.0 it is possible to output all reads into a single (possibly gzipped) fastq file,
even when multiple target loci are present.
In addition, you can now specify --distinct when using -S single_input.fa.
This tells Locityper to treat each Fasta sequence as a separate target, with its own minimizers.
Unfortunately, be wary of a large memory usage when too many targets are used.