Package Elprep - internal and external symbols

See only external symbols
A library for efficiently executing sequencing pipelines on SAM/BAM/CRAM files, taking advantage of modern multi-core processors.

Modifications to headers and alignments are expressed as filters. The library comes with a number of commonly used pre-defined filters, but you can also define and use your own filters. A pipeline can be executed with run-pipeline, which accepts SAM/BAM/CRAM files as input and/or output sources, but can also operate on an in-memory representation of such files. run-pipeline can be extended to also operate on other input/output sources, such as databases.

Refer to the documentation of run-pipeline as a starting point.
Package Elprep uses the packages Cl-Date-Time-Parser, Common-Lisp, Stream and String-Case. It has 928 total symbols and 152 external ones.

Class

bounded-mailboxA mailbox with an upper bound on the number of objects that can be simultaneously present.
Add...
bufferA buffer can be used to create simple-base-strings that can grow arbitrarily large in size.
It...
handleAn indirection for compare-and-swap operations.
The struct handle has a constructor make-handl...
pairA pair consisting of two fragment sam-alignment instances.
The struct pair has a constructor m...
processThis struct represents the return values of sys:run-shell-command in LispWorks.
It has defau...
samA complete SAM data set that can be contained in a SAM file.
See http://samtools.github.io/hts...
sam-alignmentA single read alignment with mandatory and optional fields that can be contained in a SAM file al...
sam-headerThe information stored in the header section of a SAM file.
See http://samtools.github.io/hts...
scannerA scanner to scan/parse string of type simple-base-string.
The struct scanner has a constructo...
sim-streamA pseudo string stream to allow for more low-level efficient implementations of formatting functi...
simple-treeA simple balanced tree.
The struct simple-tree has a constructor that takes the rank and optio...
split-hash-tableA collection of hash tables distributing the entries based on a permutation of the same hash func...
temporary-fileAn internal representation for temporary files.
The struct temporary-file has a constructor ma...

Variable

*cigar-consumes-reference-bases-table*Map CIGAR operations to boolean flags indicating whether they consume reference bases.
*cigar-list-cache*Cache CIGAR Strings to association lists.
See http://samtools.github.io/hts-specs/SAMv1.pdf - ...
*cigar-operations*Map CIGAR operations represented as characters to upcase characters.
See http://samtools.githu...
*cigar-vector-cache*Cache CIGAR strings to assocation vectors.
See http://samtools.github.io/hts-specs/SAMv1.pdf -...
*fixnum-optimization*Standard optimizations settings with fixnum optimizations.
*integer-types*Integer types supported in SAM file numeric arrays.
See http://samtools.github.io/hts-specs/...
*keyword*The :keyword package.
*merge-program-help*Help string for the elprep-merge-script binary.
*number-of-threads*The number of threads used by run-pipeline and run-pipeline-in-situ to parallelize the filtering ...
*optimization*Standard optimization settings without fixnum optimizations.
*program-help*Help string for the elprep-script binary.
*program-name*Name of the elprep binary.
*program-url*URL for more information about elprep.
*program-version*Version of the elprep binary.
*reference-fai*The reference FAI that samtools may need for generating a CRAM file.
*reference-fasta*The reference FASTA that samtools may need for generating a CRAM file.
*sam-alignment-line-output-length-factor*Default factor for increase in length of the string representing a sam-alignment instance after a...
*sam-file-format-date*The date of the SAM file format version supported by this library.
See http://samtools.github....
*sam-file-format-version*The SAM file format version string supported by this library.
This is entered by default in a ...
*samtools*Location of the samtools binary.
*split-program-help*Help string for the elprep-split-script binary.
*stderr*Standard error stream of the underlying Common Lisp implementation.
*unique-value*A unique value for use in the functions presentp and unique.

Constant

+buffer-chunk-size+Size of buffer chunks.
+default-chunk-size+The number of alignments to read from an input source at a time.
Default is 8192.
+duplicate+Bit value for sam-alignment-flag: PCR or optical duplicate.
See http://samtools.github.io/hts-...
+first+Bit value for sam-alignment-flag: the first segment in the template.
See http://samtools.githu...
+high-bits+An arbitrary number of bits in the high portion of a fixnum, used for split hash tables.
+highest-bits+Bit mask for the highest bits of a fixnum, used for split hash tables.
+last+Bit value for sam-alignment-flag: the last segment in the template.
See http://samtools.github...
+low-bits+An arbitrary number of bits in the low portion of a fixnum, used for split hash tables.
+lowest-bits+Bit mask for the lowest bits of a fixnum, used for split hash tables.
+max-cigar-operation+The largest CIGAR operation.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Section 1.4.6...
+max-optional-field-type-tag+The largest optional field type tag.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Secti...
+max-upcase-cigar-operation+The largest CIGAR operation, upper case only.
See http://samtools.github.io/hts-specs/SAMv1.pd...
+min-cigar-operation+The smallest CIGAR operation.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Section 1.4....
+min-optional-field-type-tag+The smallest optional field type tag.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Sect...
+min-upcase-cigar-operation+The smallest CIGAR operation, upper case only.
See http://samtools.github.io/hts-specs/SAMv1.p...
+multiple+Bit value for sam-alignment-flag: template having multiple segments in sequencing.
See http://...
+next-reversed+Bit value for sam-alignment-flag: SEQ of the next segment in the template being reversed.
See ...
+next-unmapped+Bit value for sam-alignment-flag: next segment in the template unmapped.
See http://samtools.g...
+proper+Bit value for sam-alignment-flag: each segment properly aligned according to the aligner.
See ...
+qc-failed+Bit value for sam-alignment-flag: not passing quality controls.
See http://samtools.github.io/...
+reversed+Bit value for sam-alignment-flag: SEQ being reversed complemented.
See http://samtools.github....
+secondary+Bit value for sam-alignment-flag: secondary alignment.
See http://samtools.github.io/hts-specs...
+supplementary+Bit value for sam-alignment-flag: supplementary alignment.
See http://samtools.github.io/hts-s...
+total-bits+Number of bits that make up a fixnum in the current Common Lisp implementation.
+unmapped+Bit value for sam-alignment-flag: segment unmapped.
See http://samtools.github.io/hts-specs/SA...

Function

%compose-filtersLow-level filter composition, used by compose-global-filters and compose-thread-filters.
%make-bufferDefault constructor for struct buffer.
%make-split-hash-tableConstructor for struct split-hash-table that takes a hash function and a vector of splits as para...
%open-samOpen a SAM file for :input or :output. If kind is :bam or :cram, use samtools view for input or o...
adapt-alignmentAdapt the sam-alignment: Make read group unique; fill in unclipped position; fill in Phred score.
add-or-replace-read-groupA filter for adding or replacing the read group both in sam-header and each sam-alignment.
add-pg-lineA filter for adding a @PG tag to a sam-header, and ensuring that it is the first one in the chain...
add-refidA filter for adding the refid (index in the reference sequence dictionary) to sam-alignment insta...
advanceAdvance scanner by one character if possible.
bounded-mailbox-mailboxRead the bounded-mailbox underlying actual mailbox.
bounded-mailbox-pDefault predicate for struct bounded-mailbox.
bounded-mailbox-semaphoreRead the bounded-mailbox semaphore that controls the number of elements that are present in the m...
buffer-copyCopy the active contents of one buffer to another.
buffer-emptypReturns true if the active size of the buffer is 0.
buffer-extendAdd a base-string to a buffer.
buffer-hashGet the hash code for a buffer; once a hash code is computed, the buffer shouldn't change anymore...
buffer-hash-valueThe hash-value for the active contents of a buffer. If -1, the hash-value hasn't been computed ye...
buffer-pDefault predicate for struct buffer.
buffer-parse-integerParse a buffer as an integer.
buffer-partitionGet substrings from a buffer and feed them to target buffers after reinitializing them;
separa...
buffer-posThe current active size of a buffer.
buffer-pushAdd a single character to a buffer.
buffer-strAn array of string chunks holding the contents of a buffer.
buffer-stringReturn a string representation of the active contents of a buffer.
Use this only for debugging...
buffer=Compare the active contents of two buffers.
call-with-threadsSet up the filter threads for a filter pipeline, and execute the input thread.
check-file-sorting-orderAssert that no sorting is asked for files.
check-refid-typeEnsure that value is probably an int32.
check-stdinReturn true if pathname represents stdin.
check-stdoutReturn true if pathname represents stdout.
chunk-output-loopAbstract loop for writing chunks of alignments. Each chunk has a sequence number prepended to it....
cigar-aux-posPosition in a vector of CIGAR operations, starting with the smallest CIGAR operation, upper case ...
classify-fragmentFor each list of sam-alignment instances with the same unclipped position and direction, all exce...
classify-pairFor each list of pairs with the same unclipped positions and directions, all except the one with ...
clean-samA filter for soft-clipping a sam-alignment at the end of a reference sequence, and set MAPQ to 0 ...
close-samClose the stream for a SAM/BAM/CRAM file, and the optional process representation for samtools.
...
command-line-argumentsWrapper for sys:*line-arguments-list* in LispWorks, and sb-ext:*posix-argv* in SBCL.
common-number-typeDetermine the smallest numeric type supported by SAM file numeric arrays that can represent all n...
compare-sam-filesA function for comparing two sam files. The input files must be sorted by coordinate order.
compare-samsParse both SAM files, then compare the mandatory fields of all alignments one by one.
compose-global-filtersCompose global (header) filters, and return thread-local filters, a global initialization thunk, ...
compose-thread-filtersCompose thread-local filters, and return alignment filters, a thread-local initialization thunk, ...
compose-thunksReturn a single thunk that executes the given thunks in sequence.
compute-phred-scoreSum the adapted Phred qualities of a sam-alignment.
compute-unclipped-positionCompute unclipped position of a sam-alignment, based on its POS and CIGAR string.
coordinate<Compare two alignments according to their coordinate.
See http://samtools.github.io/hts-specs/...
copy-bounded-mailboxDefault copier function for struct bounded-mailbox.
copy-handleDefault copier function for struct handle.
copy-pairDefault copier function for struct pair.
copy-processDefault copier for struct process.
copy-samDefault copier function for struct sam.
copy-sam-alignmentDefault copier function for struct sam-header.
copy-sam-headerDefault copier function for struct sam-header.
copy-sim-streamDefault copier function for struct sim-stream.
copy-simple-treeDefault copier function for struct simple-tree.
copy-split-hash-tableDefault copier function for struct split-hash-table.
copy-streamEfficient copying of the contents of a buffered-stream to an output stream.
copy-temporary-fileDefault copier function for struct temporary-file.
count-duplicatesReturn the number of alignments in the SAM file that are marked as duplicates.
create-log-filenameCreate a log filename for writing error messages from within the elPrep binary.
effective-sorting-orderDetermine effective sorting order: Some filters may destroy the sorting order recorded in the inp...
element-stradless-clipped-read
elprep-debugger-hookWrite an error report to a log file and exist the elPrep binary.
elprep-filter-scriptCommand line script for elprep filter script.
elprep-merge-scriptCommand line script for elprep merge script.
elprep-scriptCommand line script for elPrep.
elprep-split-scriptCommand line script for elprep split script.
end-of-entry-pIs the character a tab or end of line, delimiting an entry in a tab-delimited text file?
ensure-chunkEnsure that buffer-str has enough chunks (internal).
ensure-sim-spaceEnsure there is enough space in the target string of sim-stream out, with length additional chara...
ensure-strEnsure that buffer-str holds enough chunks (internal).
estimate-sam-alignment-output-lengthMake an estimate how much longer the string will be representing this sam-alignment instance,
...
explain-flagReturn a symbolic representation of the FLAG entry in a SAM file alignment line.
This is prima...
fast-scan-cigar-string-to-listConvert a cigar string to an association list, fast path.
See http://samtools.github.io/hts-sp...
fast-scan-cigar-string-to-vectorConvert a cigar string to an association vector, fast path.
See http://samtools.github.io/hts-...
filterFilter out each element from the list, optionally bounded by tail, for which filter returns nil.
filter-duplicate-readsA filter for removing duplicate sam-alignment instances, based on FLAG.
filter-optional-header-infoA filter for removing header entries that represent optional information in elPrep.
filter-optional-readsA filter for removing sam-alignment instances that represent optional information in elPrep.
filter-unmapped-readsA filter for removing unmapped sam-alignment instances, based on FLAG.
filter-unmapped-reads-strictA filter for removing unmapped sam-alignment instances, based on FLAG, or POS=0, or RNAME=*.
filtermapApply the following steps to each element in the list, optionally bounded by tail:
- Filter ou...
format-samWrite a complete SAM file.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Section 1.
format-sam-alignmentWrite a SAM file read alignment line.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Sect...
format-sam-byte-arrayWrite a SAM file TAG of type byte array.
See http://samtools.github.io/hts-specs/SAMv1.pdf - S...
format-sam-commentsWrite the @CO lines in a SAM file header section.
See http://samtools.github.io/hts-specs/SAMv...
format-sam-datetimeWrite a SAM file TAG of type date/time.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Se...
format-sam-headerWrite a SAM file header section.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Section 1...
format-sam-header-lineWrite an @HD line in a SAM file header section.
See http://samtools.github.io/hts-specs/SAMv1....
format-sam-header-user-tagWrite a user-defined SAM file TAG of type string.
format-sam-integerWrite a SAM file TAG of type integer.
format-sam-programsWrite the @PG lines in a SAM file header section.
See http://samtools.github.io/hts-specs/SAMv...
format-sam-read-groupsWrite the @RG lines in a SAM file header section.
See http://samtools.github.io/hts-specs/SAMv...
format-sam-reference-sequence-dictionaryWrite the @SQ lines in a SAM file header section.
See http://samtools.github.io/hts-specs/SAMv...
format-sam-stringWrite a SAM file TAG of type string.
format-sam-tagWrite a SAM file TAG, dispatching on actual type of the given value.
See http://samtools.githu...
format-sam-user-tagsWrite the user-defined header lines.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Secti...
fragment-hashHash function that corresponds to handle-fragment=, but operates an a sam-alignment directly.
get-functionGet a function object from a function (returned as is) or a function name.
get-read-length-from-cigarSums the lengths of all CIGAR operations that consume read bases.
get-samtoolsDetermine location of the samtools binary.
handle-fragment=Do the two handles refer to sam-alignment instances at the same unclipped position and with the s...
handle-hashRead the handle hash value of type fixnum.
handle-objectAccess the handle object.
handle-pDefault predicate for struct handle.
handle-pair=Do the two handles refer to pair instances at the same unclipped positions and with the same dire...
hash-table-splitReturn a split of a split-hash-table for a given key.
insert-nodeInsert a node into the given simple-tree. Returns the tree unless it is fully occupied.
If it ...
intern-keyIntern a string in the :keyword package.
intern-key/copyFind a symbol in the :keyword package or, if not found, intern a copy of the string in the :keywo...
invoke-with-open-samCall a function and pass it a stream for reading or writing a SAM file.
make-bounded-mailboxConstructor for struct bounded-mailbox that takes a capacity as a parameter.
make-bufferCreate a buffer with an optional initial string
make-cigar-operationParse a CIGAR length + operation from position i in the cigar string.
Return a cons cell with ...
make-cigar-operations-tableMap CIGAR operations represented as characters to upcase characters.
See http://samtools.githu...
make-cigar-operations-table-consumes-reference-basesMap CIGAR operations to boolean flags indicating whether they consume reference bases.
make-handleConstructor for struct handle that takes an object and a hash value as parameters.
make-integer-type-descriptorsCreate descriptors for the integer types in SAM file numeric arrays.
Types with smaller inde...
make-mailboxCreate a mailbox. If the optional capacity parameter is provided and is not nil, then a bounded-m...
make-optional-field-scan-tableCreate a dispatch table for scanning optional fields in a SAM file read alignment line.
See ht...
make-pairConstructor for struct pair that takes a score and two sam-alignment instances as parameters.
make-phred-score-tableMap Phred qualities to a reasonable range and an error flag indicating if it is outside a valid r...
make-processDefault constructor for struct process.
make-samDefault constructor for struct sam.
make-sam-alignmentDefault constructor for struct sam-alignment.
make-sam-headerDefault constructor for struct sam-header.
make-scannerCreate a scanner to scan/parse strings of type simple-base-string. Takes an optional string to sc...
make-sim-streamConstructor for struct sim-stream that takes an optional initial size for the target string as a ...
make-simple-treeConstructor for struct simple-tree that takes the rank and optionally the depth as parameters.
make-single-thread-hash-tableLike make-hash-table, but ensure it is single-thread, not synchronized.
make-split-hash-tableConstructor for split-hash-table that takes the number of splits and initialization arguments as ...
make-subtreeCreate a subtree for the given simple-tree.
make-super-treeCreate a super tree for the given simple-tree, and add the given tree to the new super tree as it...
make-synchronized-hash-tableLike make-hash-table, but ensure it is synchronized, not single-thread.
make-temporary-fileConstructor for struct temporary-file that takes a sibling file as a parameter.
make-unclipped-aux-tablesMap CIGAR operations to flags indicating whether they are clipped and/or reference operations, up...
mapcar*Like mapcar, except operates on only one list, optionally bounded by tail.
mapfilterApply the following steps to each element in the list, optionally bounded by tail:
- Apply map...
mapfiltermapApply the following steps to each element in the list, optionally bounded by tail:
- Apply inm...
mark-as-duplicateSet the PCR/optical duplicate FLAG in the sam-alignment.
mark-duplicatesA filter for marking duplicate sam-alignment instances. Depends on the add-refid filter being cal...
merge-sorted-files-split-per-chromosomeA function for merging files that were split with elPrep and sorted in coordinate order.
merge-unsorted-files-split-per-chromosomeA function for merging files that were split with elPrep and are unsorted
nfilterDestructively filter out each element from the list, optionally bounded by tail, for which filter...
nfiltermapDestructively apply the following steps to each element in the list, optionally bounded by tail:
...
nmapcar*Like mapcar, except destructively operates on only one list, optionally bounded by tail.
nmapfilterDestructively apply the following steps to each element in the list, optionally bounded by tail:
...
nmapfiltermapDestructively apply the following steps to each element in the list, optionally bounded by tail:
...
nthdiffReturn a copy of the first n elements of list, and the nth cdr of the list.
open-samOpen a SAM file for :input or :output. If the file is .bam or .cram, use samtools view for input ...
open-temporary-samOpen a temporary SAM file for :output in the same folder as the sibling file. If the file is .bam...
operator-consumes-read-bases-pDoes the CIGAR operation consume read bases?
operator-consumes-reference-bases-pDoes the CIGAR operation consume reference bases?
pair-aln1Read the first fragment of type sam-alignment from a pair.
pair-aln2Read the second fragment of type sam-alignment from a pair.
pair-hashHash function that corresponds to handle-pair=, but operates on a pair directly.
pair-pDefault predicate for struct pair.
pair-pos1Access the first unclipped position of a pair.
pair-pos2Access the second unclipped position of a pair.
pair-refid1Access the first REFID of a pair.
pair-refid2Access the second REFID of a pair.
pair-reversed1-pAccess the first direction of a pair.
pair-reversed2-pAccess the second direction of a pair.
pair-rgAccess the read group of a pair.
pair-scoreRead the pair score of type fixnum.
parse-read-group-from-stringParse an @RG line in a string.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Section 1.3...
parse-samParse a complete SAM file.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Section 1.
parse-sam-alignmentParse a SAM file read alignment line.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Sect...
parse-sam-alignment-from-streamRead a line from a stream and parse it as a SAM alignment line.
Return NIL if stream is at end...
parse-sam-byte-arrayParse a byte array in a SAM file.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Section ...
parse-sam-commentParse an @CO line in a SAM file.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Section 1...
parse-sam-headerParse a SAM file header section.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Section 1...
parse-sam-header-codeParse the record type code of a SAM header line.
parse-sam-header-lineParse an @HD line in a SAM file.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Section 1...
parse-sam-numeric-arrayParse a numeric array in a SAM file.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Secti...
parse-sam-programParse an @PG line in a SAM file.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Section 1...
parse-sam-read-groupParse an @RG line in a SAM file.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Section 1...
parse-sam-reference-sequence-dictionary-entryParse an @SQ line in a SAM file.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Section 1...
parse-sam-tagParse the TAG: portion of a SAM file tag.
peekcPeek current character in scanner if possible, or return #EOT.
presentpIs the indicator present in the property list?
process-closeClose all streams of an external process, wait for the process to finish if requested, and return...
process-errorThe error stream of an external process.
process-inputReturns the result of process-stream. Exists for compatibility with SBCL's sb-ext:process-input.
process-outputReturns the result of process-stream. Exists for compatibility with SBCL's sb-ext:process-output.
process-pDefault predicate for struct process.
process-pidThe PID of an external process.
process-streamThe stream of an external process.
read-line-into-bufferRead a line from a stream into a buffer, after reinitializing it.
readcRead current character in scanner if possible, or return #EOT.
real-diffsReturn a list of sam-alignments in alns1 for which no alignments in alns2 exist that have the sam...
reference-sequence-lengthGet reference sequence length for the given sam-alignment.
reinitialize-bufferReset buffer-pos and buffer-hash-value, so this buffer can be reused.
reinitialize-scannerReinitialize the scanner so it can be reused.
rename-chromosomesA filter for prepending “chr” to the reference sequence names in a sam-header, and in RNAME and R...
replace-reference-sequence-dictionaryA filter for replacing the reference sequence dictionary in a sam-header.
replace-reference-sequence-dictionary-from-sam-fileA filter for replacing the reference sequence dictionary in a sam-header with one parsed from the...
rotate-1Rotate a fixnum by one position.
rotate-15Rotate a fixnum by 15 bits, used for split hash tables.
run-best-practices-pipelineRun the best practices pipeline. Version that doesn't use an intermediate list when neither sorti...
run-best-practices-pipeline-intermediate-listRun the best practices pipeline. Version that uses an intermediate list so that sorting and mark-...
run-programA wrapper for sys:run-shell-command in LispWorks to make it behave more like SBCL's sb-ext:run-pr...
sam-alignment-adapted-posAccess the unclipped position temporary field in the sam-alignment.
sam-alignment-adapted-scoreAccess adapted Phred score temporary field in the sam-alignment.
sam-alignment-cigarAccess the sam-alignment CIGAR string of type base-string.
sam-alignment-differReturn false if the two sam-alignments have the same mandatory fields.
Otherwise, return a sym...
sam-alignment-duplicate-pCheck for PCR or optical duplicate in sam-alignment-flag.
See http://samtools.github.io/hts-sp...
sam-alignment-endSums the lengths of all CIGAR operations that consume reference bases.
sam-alignment-first-pCheck for being the first segment in the template in sam-alignment-flag.
See http://samtools.g...
sam-alignment-flagAccess the sam-alignment bitwise FLAG of type fixnum.
sam-alignment-flag-everyCheck for every bit in flag being set in sam-alignment-flag.
sam-alignment-flag-notanyCheck for not any bit in flag being set in sam-alignment-flag.
sam-alignment-flag-noteveryCheck for not every bit in flag being set in sam-alignment-flag.
sam-alignment-flag-someCheck for some bits in flag being set in sam-alignment-flag.
sam-alignment-last-pCheck for being the last segment in the template in sam-alignment-flag.
See http://samtools.gi...
sam-alignment-line
sam-alignment-mapqAccess the sam-alignment MAPping quality of type fixnum.
sam-alignment-multiple-pCheck for template having multiple segments in sequencing in sam-alignment-flag.
See http://sa...
sam-alignment-next-reversed-pCheck for SEQ of the next segment in the template being reversed in sam-alignment-flag.
See ht...
sam-alignment-next-unmapped-pCheck for next segment in the template unmapped in sam-alignment-flag.
See http://samtools.git...
sam-alignment-pDefault predicate for struct sam-alignment.
sam-alignment-pair-hashHash function that corresponds to sam-alignment-pair=.
sam-alignment-pair=Are the two sam-alignment fragments part of the same pair?
sam-alignment-pnextAccess the sam-alignment 1-based leftmost mapping Position of the mate/NEXT read of type int32.
sam-alignment-posAccess the sam-alignment 1-based leftmost mapping POSition of type int32.
sam-alignment-proper-pCheck for each segment being properly aligned according to the aligner in sam-alignment-flag.
...
sam-alignment-qc-failed-pCheck for not passing quality controls in sam-alignment-flag.
See http://samtools.github.io/ht...
sam-alignment-qnameAccess the sam-alignment Query template NAME of type base-string.
sam-alignment-qualAccess the sam-alignment ASCII of Phred-scaled base QUALity+33 of type base-string.
sam-alignment-refidAccess the commonly used REFID temporary field in the sam-alignment.
sam-alignment-reversed-pCheck for SEQ being reversed complemented in sam-alignment-flag.
See http://samtools.github.io...
sam-alignment-rgAccess the read group optional field of a sam-alignment.
sam-alignment-rnameAccess the sam-alignment Reference sequence NAME of type base-string.
sam-alignment-rnextAccess the sam-alignment Reference sequence name of the mate/NEXT read of type base-string.
sam-alignment-sameReturn true if the two sam-alignments have the same mandatory fields, false otherwise.
sam-alignment-secondary-pCheck for secondary alignment in sam-alignment-flag.
See http://samtools.github.io/hts-specs/S...
sam-alignment-seqAccess the sam-alignment segment SEQuence of type base-string.
sam-alignment-supplementary-pCheck for supplementary alignment in sam-alignment-flag.
See http://samtools.github.io/hts-spe...
sam-alignment-tagAccess a sam-alignment optional field in the sam-alignment.
sam-alignment-tagsAccess the sam-alignment optional fields of type property list.
sam-alignment-tempAccess a sam-alignment temporary value in the sam-alignment.
sam-alignment-tempsAccess the sam-alignment temporary values of type property list.
sam-alignment-tlenAccess the sam-alignment observed Template LENgth of type int32.
sam-alignment-unmapped-pCheck for segment unmapped in sam-alignment-flag.
See http://samtools.github.io/hts-specs/SAMv...
sam-alignmentsAccess the sam list of sam-alignment instances.
sam-file-kindDetermine whether the file is :bam for .bam, :cram for .cram, or :sam in all other cases.
sam-headerAccess the sam header of type sam-header.
sam-header-coAccess the sam-header @CO lines of type list of strings.
sam-header-ensure-hdEnsure an @HD line is present in the given sam-header.
See http://samtools.github.io/hts-specs...
sam-header-hdAccess the sam-header @HD line of type property list.
sam-header-pDefault predicate for struct sam-header.
sam-header-pgAccess the sam-header @PG lines of type list of property lists.
sam-header-rgAccess the sam-header @RG lines of type list of property lists.
sam-header-sqAccess the sam-header @SQ lines of type list of property lists.
sam-header-user-tagAccess a sam-header user tag.
sam-header-user-tag-pDoes this tag string represent a user-defined tag?
sam-header-user-tagsAccess the sam-header user-defined header lines of type property list.
sam-pDefault predicate for struct sam.
scan-cigar-stringConvert a cigar string to an association 'list or 'vector.
See http://samtools.github.io/hts-s...
scan-errorSignal invalid type tag for optional field in SAM alignment.
scan-floatScan a floating point number from scanner. Returns either an integer or a single-float.
scan-integerScan an integer from scanner.
scan-stringRead a tab-delimited entry as string from scanner.
scancRead current character in scanner, ensuring it is the given one.
scanner-indexThe current index into the string while scanning/parsing it.
scanner-stringThe string being scanned/parsed.
set buffer-hash-value
set buffer-pos
set buffer-str
set handle-object
set sam-alignment-cigar
set sam-alignment-flag
set sam-alignment-line
set sam-alignment-mapq
set sam-alignment-pnext
set sam-alignment-pos
set sam-alignment-qname
set sam-alignment-qual
set sam-alignment-rname
set sam-alignment-rnext
set sam-alignment-seq
set sam-alignment-tags
set sam-alignment-temps
set sam-alignment-tlen
set sam-alignments
set sam-header
set sam-header-co
set sam-header-hd
set sam-header-pg
set sam-header-rg
set sam-header-sq
set sam-header-user-tags
set scanner-index
set scanner-string
set sim-stream-%floats
set sim-stream-index
set sim-stream-string
set simple-tree-index
set temporary-file-sibling
setup-standard-streamsBind standard streams to standard error.
sim-format-samWrite a complete SAM file.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Section 1.
sim-format-sam-alignmentWrite a SAM file read alignment line.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Sect...
sim-format-sam-byte-arrayWrite a SAM file TAG of type byte array.
See http://samtools.github.io/hts-specs/SAMv1.pdf - S...
sim-format-sam-commentsWrite the @CO lines in a SAM file header section.
See http://samtools.github.io/hts-specs/SAMv...
sim-format-sam-datetimeWrite a SAM file TAG of type date/time.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Se...
sim-format-sam-headerWrite a SAM file header section.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Section 1...
sim-format-sam-header-lineWrite an @HD line in a SAM file header section.
See http://samtools.github.io/hts-specs/SAMv1....
sim-format-sam-header-user-tagWrite a user-defined SAM file TAG of type string.
sim-format-sam-integerWrite a SAM file TAG of type integer.
sim-format-sam-programsWrite the @PG lines in a SAM file header section.
See http://samtools.github.io/hts-specs/SAMv...
sim-format-sam-read-groupsWrite the @RG lines in a SAM file header section.
See http://samtools.github.io/hts-specs/SAMv...
sim-format-sam-reference-sequence-dictionaryWrite the @SQ lines in a SAM file header section.
See http://samtools.github.io/hts-specs/SAMv...
sim-format-sam-stringWrite a SAM file TAG of type string.
sim-format-sam-tagWrite a SAM file TAG, dispatching on actual type of the given value.
See http://samtools.githu...
sim-format-sam-user-tagsWrite the user-defined header lines.
See http://samtools.github.io/hts-specs/SAMv1.pdf - Secti...
sim-stream-%floatsAccess the optional sim-stream string-stream for formatting floating point numbers.
sim-stream-floatsRead the sim-stream string-stream for formatting floating point numbers, creating a new one if no...
sim-stream-indexAccess the sim-stream index into sim-stream-string.
sim-stream-pDefault predicate for struct sim-stream.
sim-stream-stringAccess the sim-stream target string.
sim-write-byteWrite a byte in hex notation to sim-stream out.
sim-write-fixed-size-fixnumWrite a positive fixnum of known maximum width to sim-stream out.
sim-write-floatWrite a floating point number to sim-stream out.
sim-write-integerWrite a decimal integer to sim-stream out.
sim-write-newlineWrite a newline to sim-stream out.
sim-write-tabWrite a tab to sim-stream out.
sim-writecWrite a character c to sim-stream out.
sim-writestrWrite a string to sim-stream out.
simple-tree-depthRead the simple-tree depth of type fixnum.
simple-tree-indexAccess the simple-tree index of type fixnum.
simple-tree-nodesRead the simple-tree nodes of type simple-vector.
simple-tree-pDefault predicate for struct simple-tree.
simple-tree-rankRead the simple-tree rank of type fixnum.
skip-lineSkip characters from stream until a newline is reached.
Can be used in place of read-line wh...
skip-sam-headerSkip the SAM file header section.
slow-buffer-extendAdd a simple-base-string to a buffer (internal slow path).
slow-ensure-sim-spaceEnsure there is enough space in the target string of sim-stream out at index with a required-leng...
slow-scan-cigar-string-to-listConvert a cigar string to an association list, slow path.
See http://samtools.github.io/hts-sp...
slow-scan-cigar-string-to-vectorConvert a cigar string to an assocation vector, slow path.
See http://samtools.github.io/hts-s...
soft-clip-end-of-read
sorting-criterionDetermine sorting criterion for given sorting order, which is a list of parameters to be passed t...
split-file-per-chromosomeA function for splitting a sam file into : a file containing all unmapped reads, a file containin...
split-hash-table-hash-functionRead the split-hash-table hash function.
split-hash-table-pDefault predicate for struct split-hash-table.
split-hash-table-vectorRead the split-hash-table vector of splits of type simple-vector.
temporary-file-pDefault predicate for struct temporary-file.
temporary-file-siblingAccess the temporary-file sibling.
thread-joinSimilar to LispWorks's mp:process-join.
thread-runWrapper around mp:process-run-function in LispWorks, and sb-thread:make-thread in SBCL.
tree-reducePerform a parallel map/reduce traversal over the given simple-tree.
true-fragment-pIs this sam-alignment definitely not part of a pair?
true-pair-pIs this sam-alignment definitely part of a pair?
uniqueAssert that the indicator is not present in the property list.
unwrap-displaced-arrayUnwrap a displaced array and return the underlying actual array and an offset into that array whi...
verify-order-keptAssume the SAM file is sorted by coordinate order. Verify that this is stil the case.
write-bufferWrite the active contents of a buffer to a stream
write-newlineWrite a newline to an output stream.
write-tabWrite a tabulator to an output stream.
writecWrite a character to an output stream.
writelnWrite a simple-base-string to an output stream, but only up to a #Newline.
writestrWrite a base-string to an output stream.

Generic-Function

create-chunk-filterCombines an optional alignment input mapper, a list of alignment filters, and an optional output ...
get-output-functionsSets up the output thread, feeds the given header to the output data set, and returns four functi...
mailbox-readRead an object from a mailbox. May block if there are no objects in the mailbox.
mailbox-sendSend an object to a mailbox.
run-pipelineReads a SAM data set from input, applies filters to the header and the alignments,
and writes...
run-pipeline-in-situApplies filters destructively and returns the first argument.
This is like run-pipeline, exce...

Macro

defglobalDefine a global variable.
in-simple-base-string-syntaxMake literal strings produce simple-base-string instead of (array character (*)) in SBCL.
unwind-protectnLike unwind-protect, except that all forms but the last are protected, and only the last form is ...
with-alignment-filtersMacro version of compose-thread-filters.
with-ascii-stream-input-bufferSpecialize a body of code for different types of a buffered-ascii-input-stream's input buffer in ...
with-buffer-dispatchSpecialize a body of code for different types of buffers in SBCL.
with-chunk-outputMacro version of chunk-output-loop.
with-modify-hashMacro version of LispWorks's modify-hash function.
with-open-samMacro version of invoke-with-open-sam.
with-output-functionsMacro for receiving results from get-output-functions.
with-prepared-headerPrepare the header for further processing, when input is in memory.
with-sam-chunkAccess the components of a chunk of sam-alignment instances.
with-thread-filtersMacro version of compose-global-filters.