From 8d197fd77ba4d2730be2d37efffc0e085131fb79 Mon Sep 17 00:00:00 2001 From: ysung6 Date: Mon, 20 Mar 2023 20:47:04 +0000 Subject: [PATCH] fix comment typos --- align/align.go | 2 +- clone/clone.go | 2 +- io/rebase/rebase.go | 4 ++-- random/random.go | 2 +- seqhash/seqhash.go | 15 +++++++-------- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/align/align.go b/align/align.go index cf7f6470..cb575958 100644 --- a/align/align.go +++ b/align/align.go @@ -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 diff --git a/clone/clone.go b/clone/clone.go index 2adb8c2d..edbd0bd4 100644 --- a/clone/clone.go +++ b/clone/clone.go @@ -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. diff --git a/io/rebase/rebase.go b/io/rebase/rebase.go index 6863b7f1..4ad57220 100644 --- a/io/rebase/rebase.go +++ b/io/rebase/rebase.go @@ -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{} diff --git a/random/random.go b/random/random.go index dc4e9ac1..f450a8cc 100644 --- a/random/random.go +++ b/random/random.go @@ -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 diff --git a/seqhash/seqhash.go b/seqhash/seqhash.go index 2b5f62fd..7e02e27e 100644 --- a/seqhash/seqhash.go +++ b/seqhash/seqhash.go @@ -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). @@ -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 @@ -70,8 +69,8 @@ import ( type SequenceType string const ( - DNA SequenceType = "DNA" - RNA SequenceType = "RNA" + DNA SequenceType = "DNA" + RNA SequenceType = "RNA" PROTEIN SequenceType = "PROTEIN" ) @@ -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 @@ -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