MIRABAIT(1)

okay so bestie, you just typed man mirabait and landed here β€” that's MIRABAIT(1), a User Command, section 1, and honestly? iconic. πŸ¦‹ let's get into it.

πŸŽ€ NAME πŸŽ€

mirabait β€” a 'grep' like tool to select reads with kmers up to 256 bp ✨

πŸ“œ SYNOPSIS πŸ“œ

mirabait [options] {-b baitfile [-b ...] | -B file | -j joblibrary} {-p
file_1 file_2 | -P file3}* [file4 ...]

πŸ’« DESCRIPTION πŸ’«

so mirabait is literally grep but for reads. it goes through a read collection and pulls out the reads that are partly similar or straight-up equal to sequences you've defined as target baits. πŸ’…

and how do we decide "similar"? by finding a user-adjustable number of common k-mers β€” a k-mer being a sequence of k consecutive bases 🧬 β€” that are the same in the bait sequences and in the screened sequences you want to keep. that match can be in forward direction or in forward/reverse complement direction. your call, kind of. πŸ”₯

oh and there's an optional DUST-like repeat filter for repeats up to 4 bases, if you want it. it's optional. don't stress. 🌸

πŸ‘‘ and when you run it on paired files, it selects sequences where at least one mate matches. that's the rule, no cap.

✨ OPTIONS ✨

πŸ’– Main options:

  • -b file β€” load bait sequences from file. and yes, you can stack it: multiple -b allowed πŸ’–
  • -B file β€” load baits from a kmer statistics file, not from sequence files. only one -B allowed, and it cannot be combined with -b. (peep -K if you need to make a file like this πŸ‘€)
  • -j job β€” set options for a predefined job from the supplied MIRA library. currently available jobs are:
    • rrna β€” bait rRNA sequences 🧬
  • -p file1 file2 β€” load paired sequences to search from file1 and file2. the files must contain the same number of sequences, and the sequence names must be in the same order. multiple -p allowed, but they must come before non-paired files. ⚠️
  • -P file β€” load paired sequences from file. this one must be interleaved: pairs have to follow each other, and non-pairs are not allowed. multiple -p allowed, but must come before non-paired files. 🫢
  • -k int β€” kmer length of bait, in bases. <=256, default is 31. πŸ“
  • -n int β€” here's the tea:
    • if >0: minimum number of k-mer baits needed (default=1)
    • if <=0: allowed number of missed kmers over sequence length
  • -d β€” do not use kmers with microrepeats (DUST-like, see also -D) 🚫
  • -D int β€” set the length of microrepeats in kmers to discard from bait:
    • int > 0 β†’ microrepeat len in percentage of kmer length. e.g.: -k 17 -D 67 --> 11.39 bases --> 12 bases.
    • int < 0 β†’ microrepeat len in bases.
    • int != 0 implies -d, and int=0 turns the DUST filter off. πŸ”₯
  • -i β€” selects sequences that do not hit bait πŸ™ˆ
  • -I β€” selects sequences that hit and do not hit bait (goes to different files) ✨
  • -r β€” no checking of reverse complement direction πŸ”„
  • -t β€” number of threads to use (default=0 -> up to 4 CPU cores) ⚑

🌸 Options for output definition:

normally mirabait writes separate result files β€” named bait_match_* and bait_miss_* β€” for each input, into the current directory. if you wanna change that behaviour (or anything else output-related), these are your girls:

  • -c β€” no case change of sequence to denote bait hits πŸ”‘
  • -l int β€” length of a line (FASTA only, default 0 = unlimited) πŸ“
  • -K file β€” save kmer statistics to file (see also -B) πŸ’Ύ
  • -N name β€” change the prefix bait to name. has no effect if -o/-O is used and the targets are not directories. ⚠️
  • -o <path> β€” save sequences matching bait to path. if path is a directory, write separate files into that directory. if not, combine all matching sequences from the input file(s) into a single file specified by the path. 🫢
  • -O <path> β€” like -o, but for sequences not matching πŸ™…

πŸ¦‹ Other options:

  • -T dir β€” use dir as the directory for temporary files instead of the current working directory. πŸ“
  • -m integer β€” memory to use for computing kmer statistics:
    • 0..100 = use percentage of free system memory
    • >100 = amount of MiB to use (e.g. 16384 for 16 GiB)
    • default is 75 (that's 75% of free system memory). πŸ’Ύ

🌈 Defining files types to load/save:

normally mirabait recognises file types from the file extension (even when packed, bestie, it's smart like that πŸ’…). but when you need to force a certain file type because the extension is non-standard, use the EMBOSS notation to force it: <filetype>::<name_of_file>. e.g., to tell that "somefile.dat" is FASTQ, use: fastq::somefile.dat

recognised types are: caf, fasta, fastq, gbf, gbk, gbff, maf and phd. ✨

MIRABAIT will write files in the same file type as the corresponding input files. examples, and yes, all of them, no skipping πŸŽ€:

mirabait -b b.fasta file.fastq

mirabait -I -j rrna -p file_1.fastq file_2.fastq

mirabait -b b1.fasta -b b2.gbk file.fastq

mirabait -b fasta::baits.dat -p fastq::file_1.dat fastq::file_2.dat

mirabait -b b.fasta -p file_1.fastq file_2.fastq -P file3.fasta file4.caf

mirabait -I -b b.fasta -p file_1.fastq file_2.fastq -P file3.fasta file4.caf

mirabait -k 27 -n 10 -b b.fasta file.fastq

mirabait -b fasta::b.dat fastq::file.dat

mirabait -o /dev/shm/ -b b.fasta -p file_1.fastq file_2.fastq

mirabait -o /dev/shm/match -b b.fasta -p file_1.fastq file_2.fastq

mirabait -b human_genome.fasta -K HG_kmerstats.mhs.gz -p file1.fastq file2.fastq

mirabait -B HG_kmerstats.mhs.gz -p file1.fastq file2.fastq

mirabait -d -B HG_kmerstats.mhs.gz -p file1.fastq file2.fastq

πŸ‘€ SEE ALSO πŸ‘€

mira(1), miraconvert(1) 🫢

there's also a way more extensive documentation in the MIRA manual, available online at

http://mira-assembler.sourceforge.net/docs/DefinitiveGuideToMIRA.html

on Debian, you can install that with the mira-doc package, and then it's chillin' at /usr/share/doc/mira-assembler/DefinitiveGuideToMIRA.html. on other systems, maybe check /usr/local/share/mira/doc or run "locate DefinitiveGuideToMIRA" to find it locally. πŸ”

you can also subscribe to one of the MIRA mailing lists at

http://www.chevreux.org/mira_mailinglists.html

after subscribing, mail your general questions to the MIRA talk mailing list:

mira_talk@freelists.org

πŸ’€ BUGS πŸ’€

to report bugs or ask for features, please use the ticketing system at:

http://sourceforge.net/projects/mira-assembler/

πŸ’œ AUTHOR πŸ’œ

Bastien Chevreux <bach@chevreux.org> πŸ‘‘

this manual page was written by Bastien Chevreux <bach@chevreux.org> but can be freely used for any documentation purpose. periodt. πŸŽ€


and that's the whole page, bestie β€” this was mirabait 5.0.x, dated May 2016. go grep some reads, you absolute icon πŸ’…βœ¨πŸ¦‹