Various sequence transformation and generation functions.
Various sequence transformation and generation functions.
These are the codes for "bases" used in alignments
These are the codes for "bases" used in alignments
These are the codes for all non standard "bases" used in alignments
These are the codes for all non standard "bases" used in alignments
Map for translating DNA and RNA seqs to purine and pyrimidine seqs. Assumes normed-elements (for which see)
Map for translating DNA and RNA seqs to purine and pyrimidine seqs. Assumes normed-elements (for which see)
(alphabet type)
(check-limit start len ss newseq nts-map)
(cut-cols sq secol)
(cut-cols sq s e)
Cut bases in columns from sequence SQ
Cut bases in columns from sequence SQ
(degap-seqs seqs)
(degap-seqs seqs gap-chars)
Remove gap characters from a sequence or set of sequences. These would be from an alignment set. It is not clear how / where useful this is/would be as it destroys the alignment spacing. Other than a single sequence situation, use degap-tuples instead!!
Gap chars are either the defaults . - or those in gap-chars (a seqable collection).
Remove gap characters from a sequence or set of sequences. These would be from an alignment set. It is not clear how / where useful this is/would be as it destroys the alignment spacing. Other than a single sequence situation, use degap-tuples instead!! Gap chars are either the defaults \. \- or those in gap-chars (a seqable collection).
(dint-seq-shuffle limit s)
(dint-shuffle start len nts-map legal-ends ss newseq & base-starters)
THIS NEEDS TO BE REDONE! NOTE IT CAN'T BE CALLED OUTSIDE OF WHERE IT IS CALLED IN dint-seq-shuffle, DUE TO EGREGIOUSLY POOR GLOBAL BINDINGS AND SUCH.
THIS NEEDS TO BE REDONE! NOTE IT CAN'T BE CALLED OUTSIDE OF WHERE IT IS CALLED IN dint-seq-shuffle, DUE TO EGREGIOUSLY POOR GLOBAL BINDINGS AND SUCH.
(filter-pgap seqs pgap)
(filter-pgap seqs pgap gap-chars)
Filter the sequence set seqs, by returning only those that have less than a pgap percentage of gap characters. Gap chars are either the defaults . - or those in gap-chars (a seqable collection).
Filter the sequence set seqs, by returning only those that have less than a pgap percentage of gap characters. Gap chars are either the defaults \. \- or those in gap-chars (a seqable collection).
(gap-count sq)
(gap-count sq gap-chars)
Return the number of "gap characters" in sq. For the single parameter case gap chars are taken as, a . or -. For the gap-chars case gap characters are the elements (characters) in gap-chars (a seqable collection).
Return the number of "gap characters" in sq. For the single parameter case gap chars are taken as, a \. or \-. For the gap-chars case gap characters are the elements (characters) in gap-chars (a seqable collection).
(gap-percent sq)
(gap-percent sq gap-chars)
Return the percentage of sq (typically an aligned variant of a genome sequence) that is comprised of gap characters. For the single parameter case, gaps are taken as . and -. For the gap-chars case, gap characters are the elements (characters) in gap-chars (a seqable collection).
Return the percentage of sq (typically an aligned variant of a genome sequence) that is comprised of gap characters. For the single parameter case, gaps are taken as \. and \-. For the gap-chars case, gap characters are the elements (characters) in gap-chars (a seqable collection).
(gaps? k)
(gaps? k gap-chars)
Return whether K, a char, string, or coll, contains a "gap character". For the single parameter case gap chars are taken as, a . or -. For the gap-chars case gap characters are the elements (characters) in gap-chars (a seqable collection).
Return whether K, a char, string, or coll, contains a "gap character". For the single parameter case gap chars are taken as, a \. or \-. For the gap-chars case gap characters are the elements (characters) in gap-chars (a seqable collection).
(gen-random-bioseq type size & seed)
(monte-carlo-subseq-cnts
&
{:keys [type size sseq sample-size seed]
:or {type :dna size 1024 sseq "" sample-size 10000 seed nil}})
(monte-carlo-subseq-cnts-body type sample-size seqsize sseq len seed)
(monte-carlo-subseq-freq
&
{:keys [type size sseq sample-size seed par]
:or {type :dna size 1024 sseq "" sample-size 10000 seed nil par 10}})
(norm-elements seqs)
"Normalize" elements in sequences by ensuring each character is mapped to its uppercase variant.
"Normalize" elements in sequences by ensuring each character is mapped to its uppercase variant.
(nt-cntn n sequence)
Frequencies of N-(nucleotides/amino-acids) of sequence SEQUENCE, i.e., for N=2 and bases freq of dinucleotides. Effectively a rename of utils:freqn.
Frequencies of N-(nucleotides/amino-acids) of sequence SEQUENCE, i.e., for N=2 and bases freq of dinucleotides. Effectively a rename of utils:freqn.
(ntseq->aaseq ntseq & {:keys [stop rna-dna] :or {stop true rna-dna :rna}})
Translate the nucleotide sequence NTSEQ into its corresponding amino acid (protein) sequence. STOP true implies ntseq has its stop codon at the end, otherwise ntseq is assumed to not have its stop codon. Defaults to true.
RNA-DNA = :rna implies that ntseq is given as rna (with uracil bases); = :dna implies ntseq given as dna (with thymine bases). Defaults to :rna
Precondition: ntseq must have a multiple of 3 bases!!
Returns the amino acid (protein) sequence for ntseq (sans start stop codon translations, if they were included)
Translate the nucleotide sequence NTSEQ into its corresponding amino acid (protein) sequence. STOP true implies ntseq has its stop codon at the end, otherwise ntseq is assumed to not have its stop codon. Defaults to true. RNA-DNA = :rna implies that ntseq is given as rna (with uracil bases); = :dna implies ntseq given as dna (with thymine bases). Defaults to :rna Precondition: ntseq must have a multiple of 3 bases!! Returns the amino acid (protein) sequence for ntseq (sans start stop codon translations, if they were included)
(pmonte-carlo-subseq-cnts
&
{:keys [type size sseq sample-size seed par]
:or {type :dna size 1024 sseq "" sample-size 10000 seed nil par 10}})
(reduce-seqcnt-results cntmaps)
(reverse-compliment sq)
Reverse compliment of DNA/RNA sequence SQ. Return the sequence that would pair with (reverse SQ).
Ex: (reverse-compliment "AAGGAAUUCC") => "GGAAUUCCUU"
Reverse compliment of DNA/RNA sequence SQ. Return the sequence that would pair with (reverse SQ). Ex: (reverse-compliment "AAGGAAUUCC") => "GGAAUUCCUU"
(seqXlate sqs & {:keys [xmap] :or {xmap +RY-XLATE+}})
Translate sqs according to the translation map xmap. SQS is either a single sequence (string) or a collection of such. It cannot be a file. Each sequence has its elements transformed according xmap and each is returned as a string.
Translate sqs according to the translation map xmap. SQS is either a single sequence (string) or a collection of such. It cannot be a file. Each sequence has its elements transformed according xmap and each is returned as a string.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close