-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
4 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,3 @@ | ||
const DNAComplementMap = require("./DNAComplementMap"); | ||
// const ac = require('ve-api-check'); | ||
// ac.throw([ac.string,ac.bool],arguments); | ||
module.exports = function getReverseSequenceString(sequence) { | ||
// ac.throw([ac.string],arguments); | ||
let reverseSequenceString = ""; | ||
for (let i = sequence.length - 1; i >= 0; i--) { | ||
let revChar = sequence[i]; | ||
if (!revChar) { | ||
revChar = sequence[i]; | ||
// throw new Error('trying to get the reverse of an invalid base'); | ||
} | ||
reverseSequenceString += revChar; | ||
} | ||
return reverseSequenceString; | ||
module.exports = function getReverseSequenceString(s) { | ||
return [...s].reverse().join(""); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters