Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion align/align.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Package align is a package for aligning (comparing) DNA, RNA, and protein sequen
Biology is fickle and full of quirks that make it hard to do even the most basic of tasks
which we would normally take for granted when working with other kinds of data.

Comparing two biogical sequences to see if they're roughly equivalent is one of those tasks.
Comparing two biological sequences to see if they're roughly equivalent is one of those tasks.

Essentially two almost identical sequences with almost identical functionality can contain
small insertions or deletions that shift the entire string such that a meaningful comparison via
Expand Down
2 changes: 1 addition & 1 deletion clone/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ While simulation is simple for simple cases, there are a lot of edge cases to ha
- Which input sequences are circular? How do we handle their rotations?
- Is the enzyme that is cutting directional? How do we handle that directionality?
- Are there multiple possible outputs of our ligation reaction? For example, ligations may be
to create a "library" of plasmids, in which there are millions of valid combinations.
able to create a "library" of plasmids, in which there are millions of valid combinations.
- How do we handle sequences that get ligated in multiple orientations?

These cloning functions handle all those problems so that they appear simple to the end user.
Expand Down
4 changes: 2 additions & 2 deletions io/rebase/rebase.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,14 @@ func Parse(file io.Reader) (map[string]Enzyme, error) {
// the line
commercialName := trimmedString[9:]

// Add both to commercialSuppliermap
// Add both to commercialSupplierMap
commercialSupplierMap[singleLetterCommercialCode] = commercialName
}
}

// If we are parsing references, continue appending to the current enzyme's references
if startReferenceParsing && line != "" {
// Break reference parsing if we encounter a new enzyime
// Break reference parsing if we encounter a new enzyme
if strings.Contains(line, "<1>") {
enzymeMap[enzyme.Name] = enzyme
enzyme = Enzyme{}
Expand Down
2 changes: 1 addition & 1 deletion random/random.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Package random provides functions to generate randon DNA and protein sequences.
Package random provides functions to generate random DNA and protein sequences.
*/
package random

Expand Down
15 changes: 7 additions & 8 deletions seqhash/seqhash.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ a human operator can quickly identify problems with hashing.

If the sequence is DNA or RNA, the Seqhash algorithm needs to know whether or not the nucleic
acid is circular and/or double stranded. If circular, the sequence is rotated to a deterministic
point. If double stranded, the sequence is compared to its reverse complement, and the lexiographically
point. If double stranded, the sequence is compared to its reverse complement, and the lexicographically
minimal sequence is taken (whether or not the min or max is used doesn't matter, just needs to
be consistent).

Expand Down Expand Up @@ -52,7 +52,6 @@ hash of the sequence (once rotated and complemented, as stated above).

Seqhash is a simple algorithm that allows for much better indexing of genetic sequences than what is
currently available.

*/
package seqhash

Expand All @@ -70,8 +69,8 @@ import (
type SequenceType string

const (
DNA SequenceType = "DNA"
RNA SequenceType = "RNA"
DNA SequenceType = "DNA"
RNA SequenceType = "RNA"
PROTEIN SequenceType = "PROTEIN"
)

Expand All @@ -81,7 +80,7 @@ func boothLeastRotation(sequence string) int {
// https://en.wikipedia.org/wiki/Lexicographically_minimal_string_rotation
// this is generally over commented but I'm keeping it this way for now. - Tim

// first concatenate the sequence to itself to avoid modular arithmateic
// first concatenate the sequence to itself to avoid modular arithmetic
sequence += sequence // maybe do this as a buffer just for speed? May get annoying with larger sequences.
leastRotationIndex := 0

Expand Down Expand Up @@ -110,16 +109,16 @@ func boothLeastRotation(sequence string) int {
// if character does not equal whatever character is at leastRotationIndex plus failure.
if character != sequence[leastRotationIndex+failure+1] {

// if character is lexically less then what is rotated least leastRotatationIndex gets value of character index.
// if character is lexically less then what is rotated least leastRotationIndex gets value of character index.
if character < sequence[leastRotationIndex] {
leastRotationIndex = characterIndex
}
// assign -1 to whatever is at the index of difference between character and rotation indeces.
// assign -1 to whatever is at the index of difference between character and rotation indices.
failureSlice[characterIndex-leastRotationIndex] = -1

// if character does equal whatever character is at leastRotationIndex plus failure.
} else {
// assign failure + 1 at the index of difference between character and rotation indeces.
// assign failure + 1 at the index of difference between character and rotation indices.
failureSlice[characterIndex-leastRotationIndex] = failure + 1
}
} // end loop
Expand Down