central-dogma
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "central-dogma", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "used to manipulate and convert genetic strings from nucleotide to codon to protein", | ||
"main": "index.js", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"build": "webpack --mode production" | ||
}, | ||
@@ -26,3 +26,9 @@ "repository": { | ||
}, | ||
"homepage": "https://github.com/NathanEscandor/codon#readme" | ||
"homepage": "https://github.com/NathanEscandor/codon#readme", | ||
"devDependencies": { | ||
"@babel/core": "^7.7.2", | ||
"babel-loader": "^8.0.6", | ||
"webpack": "^4.41.2", | ||
"webpack-cli": "^3.3.10" | ||
} | ||
} |
@@ -23,3 +23,3 @@ # central-dogma | ||
const dnaSequence = 'CCTATTAATAAA'; | ||
const dnaCodons = nuc.toCodon(dnaSequence); // toCodon = ['CCT', 'ATT', 'AAT', 'AAA'] | ||
const dnaCodons = nuc.toCodon(dnaSequence); // dnaCodons = ['CCT', 'ATT', 'AAT', 'AAA'] | ||
const aminoAcids = cod.sequenceToAminoAcid(dnaCodons); | ||
@@ -39,8 +39,8 @@ console.log(aminoAcids) // --> ['P', 'I', 'N', 'K'] | ||
const dnaSequence = 'GTGCTTGAGGACCGA'; | ||
const complement = nuc.toComplement(dnaSequence); //complement = 'GTGCTTGAGGACCGA' | ||
const rnaComplement = nuc.dnaToRna(complement); //rnaComplement = 'GUGCUUGAGGACCGA' | ||
const rnaCodons = nuc.toCodon(rnaComplement); //rnaCodons = ['GUG', 'CUU', 'GAG', 'GAC', 'CGA'] | ||
const complement = nuc.toComplement(dnaSequence); // complement = 'GTGCTTGAGGACCGA' | ||
const rnaComplement = nuc.dnaToRna(complement); // rnaComplement = 'GUGCUUGAGGACCGA' | ||
const rnaCodons = nuc.toCodon(rnaComplement); // rnaCodons = ['GUG', 'CUU', 'GAG', 'GAC', 'CGA'] | ||
cod.setBase('rna') //change the lookup table from DNA to RNA | ||
const rnaCodonNumbers = cod.toNumber(rnaCodons); //rnaCodonNumbers = [ 25, 58, 17, 19, 52 ] | ||
cod.setBase('rna') // change the lookup table from DNA to RNA | ||
const rnaCodonNumbers = cod.toNumber(rnaCodons); // rnaCodonNumbers = [ 25, 58, 17, 19, 52 ] | ||
const aminoAcids = cod.numberToAminoAcid(rnaCodonNumbers); | ||
@@ -50,3 +50,54 @@ console.log(aminoAcids) // --> ['H', 'E', 'L', 'L', 'A'] | ||
### Future Directions | ||
# Functions | ||
### Nucleotide | ||
`nuc.setBase(baseType)` | ||
- input: 'dna' or 'rna' | ||
- changes lookup table to DNA or RNA (swap thymine for uracil) | ||
`nuc.toValue(nucSeq)` | ||
- input: nucleotide string sequence (eg "TCCTTG") | ||
- Converts sequence of nucleotides to number representation | ||
`nuc.toSequence(nucSeq)` | ||
- input: number representation string sequence (eg "011003") | ||
- Converts sequence of numbers [0-3] to nucleotides | ||
`nuc.toComplement(nucSeq)` | ||
- input: nucleotide string sequence | ||
- Returns the complement sequence of the input string (T <-> C, A <-> G) | ||
`nuc.toCodon(nucSeq)` | ||
- input: nucleotide string sequence | ||
- Splits into an array of triplet codons | ||
`nuc.dnaToRna(nucSeq)` | ||
- input: nucleotide string sequence | ||
- Replaces Thymine (T) with Uracil (U) | ||
`nuc.rnaToDna(nucSeq)` | ||
- input: nucleotide string sequence | ||
- Replaces Uracil (U) with Thymine (T) | ||
### Codon | ||
`cod.setBase(baseType)` | ||
- input: 'dna' or 'rna' | ||
- changes lookup table to DNA or RNA (swap thymine for uracil) | ||
`cod.toNumber(codArray)` | ||
- input: array of nucleotide string codons (eg ['TCC', 'ATT']) | ||
- Converts each codon in the array to number representation [0-63] | ||
`cod.toSequence(codArray)` | ||
- input: array of codon numbers (eg [5, 32]) | ||
- Converts each number to its nucleotide codon | ||
`cod.numberToAminoAcid(codArray)` | ||
- input: array of codon numbers (eg [5, 32]) | ||
- Returns array of amino acids that the codons encode for | ||
`cod.sequenceToAminoAcid(codArray)` | ||
- input: array of nucleotide string codons | ||
- Returns array of amino acids that the codons encode for | ||
# Future Directions | ||
In future versions, I intend to implement: | ||
@@ -57,3 +108,2 @@ - a conversion from single character amino acid representation to 3 character and full amino acid name (eg: 'Y' --> 'TYR' --> 'Tyrosine') | ||
[Central Dogma of Biology]: <https://en.wikipedia.org/wiki/Central_dogma_of_molecular_biology> | ||
[Central Dogma of Biology]: <https://en.wikipedia.org/wiki/Central_dogma_of_molecular_biology> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
11942
1
106
4
4
0
2