GSNAPL(1)
π GSNAPL(1) π
okay so bestie, welcome to the manual page for gsnapl β the Large Genome Short-read Nucleotide Alignment Program. no cap, this is the whole vibe. let's get into it.
β¨ NAME β¨
gsnapl β Large Genome Short-read Nucleotide Alignment Program. that's it, that's the name. iconic.
β¨ SYNOPSIS β¨
the way you run this? literally:
gsnap [OPTIONS...] <FASTA file>, or cat <FASTA file> | gmap [OPTIONS...]
periodt. that's the whole synopsis, bestie. π
β¨ OPTIONS β¨
π Input options (must include -d)
okay so you must include -d here. like, it's not optional. no cap.
-D,--dir=directoryβ this is your genome directory. default (as specified by--with-gmapdbto the configure program) is/var/cache/gmap. so if you don't say anything, that's where it looks. π-d,--db=STRINGβ your genome database. you literally cannot skip this one. must include. periodt.--two-passβ two-pass mode, bestie. the sequences get processed first to identify splice sites and introns, and then aligned using this splicing info. it's giving extra careful. β¨--use-localdb=INTβ whether to use the local suffix arrays. these help with finding extensions to the ends of alignments when there's splicing or indels.0=no,1=yes if available (default). so default is yes if it can. π¦
πΈ Transcriptome-guided options (optional)
these are optional, bestie. but if you have a transcriptome, they're kinda slay.
-C,--transcriptdir=directoryβ transcriptome directory. default is the value for--dirabove. so it just follows that. π-c,--transcriptdb=STRINGβ transcriptome database. give it a string. π--transcriptome-mode=STRINGβ okay so options are:assist,only,annotate(default). let me break it down:assistmeans try transcriptome alignment first, but then use genomic alignment if nothing is found.onlymeans try transcriptome alignment only. no genomic fallback. periodt.annotatemeans try only genomic alignment, and use the transcriptome only for annotation. this is the fastest option. in the other two options, annotation is also performed. so yeah, annotate is the speed demon. π₯
𧬠Computation options
okay so these are the computation vibes. get ready.
-k,--kmer=INTβ kmer size to use in genome database. allowed values:16or less. if not specified, the program will find the highest available kmer size in the genome database. so it's like, "i got you, bestie." π--sampling=INTβ sampling to use in genome database. if not specified, the program will find the smallest available sampling value in the genome database within selected k-mer size. it's lowkey doing the most for you. β¨--align-fraction=FLOATβ process only the given fraction of reads, selected at random. if--align-fractionand--partare given,--align-fractiontakes precedence. so it's the main character here. π-q,--part=INT/INTβ process only the i-th out of every n sequences. e.g.,0/100or99/100. useful for distributing jobs to a computer farm. so if you're running a farm, this is your bestie. π--input-buffer-size=INTβ size of input buffer (program reads this many sequences at a time for efficiency). default10000. so it's chunky but efficient. π--barcode-length=INTβ amount of barcode to remove from start of every read before alignment. default0. so if you have barcodes, set this. π--endtrim-length=INTβ amount of trim to remove from the end of every read before alignment. default0. trim the ends, bestie. βοΈ--orientation=STRINGβ orientation of paired-end reads. allowed values:FR(fwd-rev, or typical Illumina; default),RF(rev-fwd, for circularized inserts), orFF(fwd-fwd, same strand), or10X(single-cell where read 1 has barcode information; read 2 is rev). so many orientations, so little time. π--10x-whitelist=FILEβ whitelist of 10X Genomics GEM bead barcodes, needed to perform correction of cellular barcodes. this file can be obtained atcellranger-x.y.z/lib/python/cellranger/barcodes(for Cell Ranger version >= 4) orcellranger-x.y.z/lib/cellranger-cs/x.y.z/lib/python/cellranger/barcodes(<= 3). so yeah, go grab that file. π§¬--10x-well-position=INTβ position of well information in the accession, when separated by colons. if set to0, then no well information will be printed in the CB field (default:4). so default is 4, but you can turn it off. π--fastq-id-start=INTβ starting position of identifier in FASTQ header, space-delimited (>=1). so it's 1-indexed, bestie. no zero here. π--fastq-id-end=INTβ ending position of identifier in FASTQ header, space-delimited (>=1). same vibe. π
Examples, bestie:
@HWUSI-EAS100R:6:73:941:1973#0/1
start=1, end=1 (default) => identifier is
HWUSI-EAS100R:6:73:941:1973#0
@SRR001666.1 071112_SLXA-EAS1_s_7:5:1:817:345 length=36
start=1, end=1 => identifier is SRR001666.1 start=2, end=2 =>
identifier is 071112_SLXA-EAS1_s_7:5:1:817:345 start=1, end=2 =>
identifier is SRR001666.1 071112_SLXA-EAS1_s_7:5:1:817:345
so you can see how the start and end positions pick out parts of the header. it's giving precise. β¨
--force-single-endβ when multiple FASTQ files are provided on the command line, GSNAP assumes they are matching paired-end files. this flag treats each file as single-end. so if you're like "no, they're single", use this. π¦--filter-chastity=STRINGβ skips reads marked by the Illumina chastity program. expecting a string after the accession having a'Y'after the first colon, like this:
@accession 1:Y:0:CTTGTA
where the 'Y' signifies filtering by chastity. values: off (default), either, both. for 'either', a 'Y' on either end of a paired-end read will be filtered. for 'both', a 'Y' is required on both ends of a paired-end read (or on the only end of a single-end read). so it's like a little filter, bestie. π
--allow-pe-name-mismatchβ allows accession names of reads to mismatch in paired-end files. so if they don't match, it's fine. no cap. π--interleavedβ input is in interleaved format (one read per line, tab-delimited. yes, the parenthesis is not closed in the original. we keep it exactly. so it's giving unclosed parenthesis. iconic. π--gunzipβ uncompress gzipped input files. so if you have .gz, this does the thing. π₯--bunzip2β uncompress bzip2-compressed input files. same but for bzip2. π
𧬠Computation options
okay so there's another computation options section. yes, bestie, the original has it twice. we keep it. periodt.
-B,--batch=INTβ batch mode (default =5). here's the table of modes:
0 allocate mmap mmap allocate
mmap mmap
1 allocate mmap & preload mmap allocate
mmap & preload mmap
2 allocate mmap & preload mmap & preload allocate
mmap & preload mmap
3 allocate allocate mmap & preload allocate
allocate mmap
4 allocate allocate allocate allocate
allocate mmap
(default)
5 allocate allocate allocate allocate
allocate allocate
Note: For a single sequence, all data structures use mmap. A batch level of 5 means the same as 4, and is kept only for backward compatibility.
so yeah, 5 is basically 4, but for the OGs. π
--use-shared-memory=INTβ if1, then allocated memory is shared among all processes on this node. if0(default), then each process has private allocated memory. so you can share the love, or not. π«Ά--preload-shared-memoryβ load files indicated by--batchmode into shared memory for use by other GMAP/GSNAP processes on this node, and then exit. ignore any input files. so it's a one-and-done vibe. β¨--unload-shared-memoryβ unload files indicated by--batchmode into shared memory, or allow them to be unloaded when existing GMAP/GSNAP processes on this node are finished with them. ignore any input files. so it's the cleanup crew. π§Ή-m,--max-mismatches=FLOATβ maximum number of mismatches allowed. if not specified, then GSNAP tries to find the best possible match in the genome. if specified between0.0and1.0, then treated as a fraction of each read length. otherwise, treated as an integral number of mismatches (including indel and splicing penalties). default is0.3. so default is 0.3, which is a fraction. slay. π₯--query-unk-mismatch=INTβ whether to count unknown (N) characters in the query as a mismatch (0=no (default),1=yes). so default is no. π--genome-unk-mismatch=INTβ whether to count unknown (N) characters in the genome as a mismatch (0=no,1=yes). if--use-maskis specified, default is no, otherwise yes. so it depends on the mask. π--maxsearch=INTβ maximum number of alignments to find (default1000). should be larger than--npaths, which is the number to report. keeping this number large will allow for random selection among multiple alignments. reducing this number can speed up the program. so if you want speed, lower it. but you might lose the random selection vibe. π--indel-endlength=INTβ minimum length at end required for indel alignments (default4). so indels need a little length at the end. π--max-insertions=INTβ maximum number of insertions allowed (default6). so up to 6. π--max-deletions=INTβ maximum number of deletions allowed (default9). so up to 9. π-M,--suboptimal-levels=INTβ report suboptimal hits beyond best hit (default0). all hits with best score plus suboptimal-levels are reported. > Note: Not currently implemented. so it's like, a vibe, but not yet real. π-a,--adapter-strip=STRINGβ method for removing adapters from reads. currently allowed values:off,paired. default is"off". to turn on, specify"paired", which removes adapters from paired-end reads if they appear to be present. so it's like, "are you there, adapter?" and then it strips. π-e,--use-mask=STRINGβ use genome containing masks (e.g. for non-exons) for scoring preference. so it's like a preference thing. π-V,--snpsdir=STRINGβ directory for SNPs index files (created usingsnpindex). default is location of genome index files specified using-Dand-d. so if you don't specify, it follows those. π§¬-v,--use-snps=STRINGβ use database containing known SNPs (in<STRING>.iit, built previously usingsnpindex) for tolerance to SNPs. so it's like, "i tolerate SNPs." π--cmetdir=STRINGβ directory for methylcytosine index files (created usingcmetindex). default is location of genome index files specified using-D,-V, and-d. so it follows those. π§ͺ--atoidir=STRINGβ directory for A-to-I RNA editing index files (created usingatoiindex). default is location of genome index files specified using-D,-V, and-d. so same vibe. β¨--mode=STRINGβ alignment mode:standard(default),cmet-stranded,cmet-nonstranded,atoi-stranded,atoi-nonstranded,ttoc-stranded, orttoc-nonstranded. non-standard modes requires you to have previously run thecmetindexoratoiindexprograms (which also cover the ttoc modes) on the genome. so you gotta do the prep work first, bestie. π-t,--nthreads=INTβ number of worker threads. so you can parallelize. slay. π₯
𧬠Splicing options for DNA-Seq
--find-dna-chimeras=INTβ look for distant splicing involving poor splice sites (0=no,1=yes). if not specified, then default is to be on unless only known splicing is desired (--use-splicingis specified and--novelsplicingis off). so it's like, on by default unless you're being strict. π§¬
𧬠Splicing options for RNA-Seq
-N,--novelsplicing=INTβ look for novel splicing (0=no (default),1=yes). so default is no. but you can turn it on. β¨--splicingdir=STRINGβ directory for splicing involving known sites or known introns, as specified by the-sor--use-splicingflag. default is directory computed from-Dand-dflags. > Note: can just give full pathname to the-sflag instead. so you have options. π-s,--use-splicing=STRINGβ look for splicing involving known sites or known introns (in<STRING>.iit), at short or long distances. seeREADMEinstructions for the distinction between known sites and known introns. so yeah, read the README for the tea. π--splices-noevalβ bestie, this one says do not go evaluating splices for probability or intron length, okay? Just trust the sequence alignment and nothing else. no vibes, only alignments π--splices-dump=FILEβ spills all the splice junction tea intoFILE, in the exact same format as STAR plus MaxEnt probabilities for the two intron positions. β οΈ heads up though: in this dump file, the annotation column is reserved strictly for known introns β novel introns that passed some criterion from a first pass do not get in there, periodt.--splices-exclude-knownβ in the file you made with--splices-dump, exclude all known introns. bye known introns π-w,--localsplicedist=INTβ the definition of a local novel splicing event (default200000). it's giving "how far is too far" πΈ--merge-distant-samechrβ report distant splices on the same chromosome as a single splice, if possible. you get a single SAM line instead of two SAM lines β which is also what happens for translocations, inversions, and scramble events. iconic behavior honestly π₯
π Options for paired-end reads π
--pairmax-dna=INTβ max total genomic length for DNA-Seq paired reads, or other reads without splicing (default2000). used if-Nor-sis not specified. this value is also used for circular chromosomes when splicing in linear chromosomes is allowed π§¬--pairmax-rna=INTβ max total genomic length for RNA-Seq paired reads, or other reads that could have a splice (default200000). used if-Nor-sis specified. should probably match the value for-w,--localsplicedistβ like, match them, bestie π«Ά--resolve-inner=INTβ whether to resolve soft-clipping on the insides of paired-end reads (default1)--pairexpect=INTβ expected paired-end length, used for resolving soft-clipping on the insides of paired-end reads, and for pairing DNA-seq reads (default200)--pairdev=INTβ allowable deviation from expected paired-end length, used for resolving soft-clipping on the insides of paired-end reads (default100).--pass1-min-support=INTβ threshold read support for learning an intron during pass 1 of--two-passmode (default20)
β¨ Options for quality scores β¨
--quality-protocol=STRINGβ protocol for input quality scores. allowed values:illumina(ASCII 64-126) (equivalent to-J 64 -j -31)sanger(ASCII 33-126) (equivalent to-J 33 -j 0)
Default is sanger (no quality print shift). SAM output files should have quality scores in sanger protocol. π
Or you can customize this behavior with these flags:
-J,--quality-zero-score=INTβ FASTQ quality scores are zero at this ASCII value (default is33for sanger protocol; for Illumina, select64)-j,--quality-print-shift=INTβ shift FASTQ quality scores by this amount in output (default is0for sanger protocol; to change Illumina input to Sanger output, select-31)
π Output options π
-n,--npaths=INTβ maximum number of paths to print (default100).-Q,--quiet-if-excessiveβ if more than the maximum number of paths are found, then nothing is printed. silence, but make it a feature π-O,--orderedβ print output in the same order as input (relevant only if there is more than one worker thread)--show-refdiffβ for GSNAP output in SNP-tolerant alignment, shows all differences relative to the reference genome as lower case (otherwise, it shows all differences relative to both the reference and alternate genome)--clip-overlapβ for paired-end reads whose alignments overlap, clip the overlapping region. βοΈ--merge-overlapβ for paired-end reads whose alignments overlap, merge the two ends into a single end (beta implementation β so like, be nice to it, it's trying π)--print-snpsβ print detailed information about SNPs in reads (works only if-valso selected) (not fully implemented yet β baby steps, bestie)--failsonlyβ print only failed alignments, those with no results π--nofailsβ exclude printing of failed alignments--only-concordantβ print only concordant alignments (concordant_uniq,concordant_mult,concordant_circular)--omit-concordant-uniqβ do not print anyconcordant_uniqalignments--omit-concordant-multβ do not print anyconcordant_multalignments--omit-softclippedβ do not allow any alignments with soft clips--only-tr-consistentβ print only alignments with consistent transcripts (XX field present, identical if paired-end)-A,--format=STRINGβ another format type, other than default. currently implemented:sam,m8(BLAST tabular format)--split-output=STRINGβ basename for multiple-file output, separately fornomapping,halfmapping_uniq,halfmapping_mult,unpaired_uniq,unpaired_mult,paired_uniq,paired_mult,concordant_uniq, andconcordant_multresults. so many files. so much organization. slay ποΈ-o,--output-file=STRINGβ file name for a single stream of output results.--failed-input=STRINGβ print completely failed alignments as input FASTA or FASTQ format, to the given file, appending.1or.2, for paired-end data. if the--split-outputflag is also given, this file is generated in addition to the output in the.nomappingfile.--append-outputβ when--split-outputor--failed-inputis given, this flag will append output to the existing files. otherwise, the default is to create new files.--order-among-best=STRINGβ among alignments tied with the best score, order those alignments in this order. allowed values:genomic,random(default)--output-buffer-size=INTβ buffer size, in queries, for the output thread (default1000). when the number of results to be printed exceeds this size, worker threads wait until the backlog is cleared. like a queue at the club fr fr π«Ά
π Options for SAM output π
--no-sam-headersβ do not print headers beginning with'@'--add-paired-nomappersβ add nomapper lines as needed to make all paired-end results alternate between first end and second end--paired-flag-means-concordant=INTβ whether the paired bit in the SAM flags means concordant only (1) or paired plus concordant (0, default)--sam-headers-batch=INTβ print headers only for this batch, as specified by-q--sam-hardclip-use-Sβ useSinstead ofHfor hardclips--sam-use-0M=INTβ if1(default), then insert0Min CIGAR between adjacent indels and introns. If0, do not allow0M. Picard disallows0M, but other tools may require it--sam-extended-cigarβ use extended CIGAR format (usingXand=symbols instead ofM, to indicate matches and mismatches, respectively)--sam-multiple-primariesβ allows multiple alignments to be marked as primary if they have equally good mapping scores--sam-sparse-secondariesβ for secondary alignments (in multiple mappings), uses'*'for SEQ and QUAL fields, to give smaller file sizes. However, the output will give warnings in Picard to give warnings and may not work with downstream tools. β οΈ smaller files, bigger problems, no cap--force-xs-dirβ for RNA-Seq alignments, disallowsXS:A:?when the sense direction is unclear, and replaces this value arbitrarily withXS:A:+. may be useful for some programs, such as Cufflinks, that cannot handleXS:A:?. However, if you use this flag, the reported value ofXS:A:+in these cases will not be meaningful. π¨ read that twice, bestie--md-report-snpsβ in MD string, when known SNPs are given by the-vflag, prints difference nucleotides when they differ from reference but match a known alternate allele--no-soft-clipsβ does not allow soft clips at ends. mismatches will be counted over the entire query--extend-soft-clipsβ extends alignments through soft clipped regions. CIGAR string and coordinates will be revised, but mismatches and the MD string will reflect the clipped CIGAR--action-if-cigar-errorβ action to take if there is a disagreement between CIGAR length and sequence length. allowed values:ignore,warning(default),noprint,abort. note that thenoprintoption does not print the CIGAR string at all if there is an error, so it may break a SAM parser π--read-group-id=STRINGβ value to put into read-group id (RG-ID) field--read-group-name=STRINGβ value to put into read-group name (RG-SM) field--read-group-library=STRINGβ value to put into read-group library (RG-LB) field--read-group-platform=STRINGβ value to put into read-group library (RG-PL) field
πΈ Help options πΈ
--checkβ check compiler assumptions--versionβ show version--helpβ show this help message
Other tools of the GMAP suite are located in /usr/lib/gmap π¦
and that's the whole page, bestie β you ate π
this was gsnapl version 2025-07-31+ds-1, from October 2025, and honestly? iconic. go align something gorgeous π«Άβ¨
π¦ where this page comes from
- ubuntu resolute: gmap 2025-07-31+ds-1 Β· Apache-2.0
- ubuntu stonking: gmap 2025-07-31+ds-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms